[INFO] fetching crate mountpoint-s3-crt-sys 0.16.0...
[INFO] documenting mountpoint-s3-crt-sys-0.16.0 against beta-2026-01-26 for beta-1.94-rustdoc-2
[INFO] extracting crate mountpoint-s3-crt-sys 0.16.0 into /workspace/builds/worker-4-tc2/source
[INFO] started tweaking crates.io crate mountpoint-s3-crt-sys 0.16.0
[INFO] finished tweaking crates.io crate mountpoint-s3-crt-sys 0.16.0
[INFO] tweaked toml for crates.io crate mountpoint-s3-crt-sys 0.16.0 written to /workspace/builds/worker-4-tc2/source/Cargo.toml
[INFO] validating manifest of crates.io crate mountpoint-s3-crt-sys 0.16.0 on toolchain beta-2026-01-26
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+beta-2026-01-26" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }`
[INFO] crate crates.io crate mountpoint-s3-crt-sys 0.16.0 already has a lockfile, it will not be regenerated
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+beta-2026-01-26" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/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:61361fe0aef631f17e9d025a70c5a647956f8c671dd02950a60ad3f5cc5526d7" "/opt/rustwide/cargo-home/bin/cargo" "+beta-2026-01-26" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }`
[INFO] [stdout] 3c00a9158ca2a77ecdd83cbcd8cafd56811937506b0734b8dadbdcabcf262f04
[INFO] running `Command { std: "docker" "start" "-a" "3c00a9158ca2a77ecdd83cbcd8cafd56811937506b0734b8dadbdcabcf262f04", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "3c00a9158ca2a77ecdd83cbcd8cafd56811937506b0734b8dadbdcabcf262f04", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "3c00a9158ca2a77ecdd83cbcd8cafd56811937506b0734b8dadbdcabcf262f04", kill_on_drop: false }`
[INFO] [stdout] 3c00a9158ca2a77ecdd83cbcd8cafd56811937506b0734b8dadbdcabcf262f04
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/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:61361fe0aef631f17e9d025a70c5a647956f8c671dd02950a60ad3f5cc5526d7" "/opt/rustwide/cargo-home/bin/cargo" "+beta-2026-01-26" "doc" "--frozen" "--no-deps" "--document-private-items" "--message-format=json", kill_on_drop: false }`
[INFO] [stdout] e38364f062160aeab43fe9959855f98bcdecb0c7bf637f6aa322ca87adbcba44
[INFO] running `Command { std: "docker" "start" "-a" "e38364f062160aeab43fe9959855f98bcdecb0c7bf637f6aa322ca87adbcba44", kill_on_drop: false }`
[INFO] [stderr]    Compiling proc-macro2 v1.0.105
[INFO] [stderr]    Compiling glob v0.3.3
[INFO] [stderr]    Compiling quote v1.0.43
[INFO] [stderr]    Compiling libc v0.2.180
[INFO] [stderr]    Compiling bitflags v2.10.0
[INFO] [stderr]    Compiling regex-syntax v0.8.8
[INFO] [stderr]    Compiling rustix v1.1.3
[INFO] [stderr]    Compiling nom v7.1.3
[INFO] [stderr]    Compiling libloading v0.8.9
[INFO] [stderr]    Compiling either v1.15.0
[INFO] [stderr]    Compiling bindgen v0.72.1
[INFO] [stderr]    Compiling find-msvc-tools v0.1.8
[INFO] [stderr]    Compiling clang-sys v1.8.1
[INFO] [stderr]    Compiling itertools v0.13.0
[INFO] [stderr]    Compiling cc v1.2.53
[INFO] [stderr]    Compiling env_home v0.1.0
[INFO] [stderr]    Compiling syn v2.0.114
[INFO] [stderr]    Compiling rustc-hash v2.1.1
[INFO] [stderr]    Compiling rustflags v0.1.7
[INFO] [stderr]    Compiling regex-automata v0.4.13
[INFO] [stderr]    Compiling cexpr v0.6.0
[INFO] [stderr]    Compiling cmake v0.1.57
[INFO] [stderr]    Compiling which v8.0.0
[INFO] [stderr]    Compiling regex v1.12.2
[INFO] [stderr]    Compiling mountpoint-s3-crt-sys v0.16.0 (/opt/rustwide/workdir)
[INFO] [stderr]  Documenting mountpoint-s3-crt-sys v0.16.0 (/opt/rustwide/workdir)
[INFO] [stdout] warning: unclosed HTML tag `bool`
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/mountpoint-s3-crt-sys-ba8805edaea6a745/out/bindings.rs:5:164951
[INFO] [stdout]   |
[INFO] [stdout] 5 | ...nused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_new ...
[INFO] [stdout]   |                                                                  ^^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: `#[warn(rustdoc::invalid_html_tags)]` on by default
[INFO] [stdout] help: try marking as source code
[INFO] [stdout]   |
[INFO] [stdout] 5 | # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > where Storage : AsRef < [u8] > + AsMut < [u8] >, { # [inline] fn extract_bit (byte : u8 , index : usize) -> bool { let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn get_bit (& self , index : usize) -> bool { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = self . storage . as_ref () [byte_index] ; Self :: extract_bit (byte , index) } # [inline] pub unsafe fn raw_get_bit (this : * const Self , index : usize) -> bool { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { * (core :: ptr :: addr_of ! ((* this) . storage) as * const u8) . offset (byte_index as isize) } ; Self :: extract_bit (byte , index) } # [inline] fn change_bit (byte : u8 , index : usize , val : bool) -> u8 { let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { byte | mask } else { byte & ! mask } } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; * byte = Self :: change_bit (* byte , index , val) ; } # [inline] pub unsafe fn raw_set_bit (this : * mut Self , index : usize , val : bool) { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { (core :: ptr :: addr_of_mut ! ((* this) . storage) as * mut u8) . offset (byte_index as isize) } ; unsafe { * byte = Self :: change_bit (* byte , index , val) } ; } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; val |= 1 << index ; } } val } # [inline] pub unsafe fn raw_get (this : * const Self , bit_offset : usize , bit_width : u8 ,) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if unsafe { Self :: raw_get_bit (this , i + bit_offset) } { let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; val |= 1 << index ; } } val } # [inline] pub fn set (& mut self , bit_offset : usize , bit_width : u8 , val : u64) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } # [inline] pub unsafe fn raw_set (this : * mut Self , bit_offset : usize , bit_width : u8 , val : u64 ,) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; unsafe { Self :: raw_set_bit (this , index + bit_offset , val_bit_is_set) } ; } } } pub const PRInSTR : & [u8 ; 5] = b"%.*s\0" ; pub const AWS_PACKAGE_SLOTS : i32 = 32 ; pub const AWS_C_COMMON_PACKAGE_ID : i32 = 0 ; pub const AWS_OP_SUCCESS : i32 = 0 ; pub const AWS_OP_ERR : i32 = - 1 ; pub const AWS_ERROR_ENUM_STRIDE_BITS : i32 = 10 ; pub const AWS_ERROR_ENUM_STRIDE : i32 = 1024 ; pub const SIZE_BITS : i32 = 64 ; pub const AWS_C_IO_PACKAGE_ID : i32 = 1 ; pub const AWS_THREAD_NAME_RECOMMENDED_STRLEN : i32 = 15 ; pub const AWS_THREAD_ONCE_STATIC_INIT : i32 = 0 ; pub const AWS_LOG_LEVEL_NONE : i32 = 0 ; pub const AWS_LOG_LEVEL_FATAL : i32 = 1 ; pub const AWS_LOG_LEVEL_ERROR : i32 = 2 ; pub const AWS_LOG_LEVEL_WARN : i32 = 3 ; pub const AWS_LOG_LEVEL_INFO : i32 = 4 ; pub const AWS_LOG_LEVEL_DEBUG : i32 = 5 ; pub const AWS_LOG_LEVEL_TRACE : i32 = 6 ; pub const AWS_C_SDKUTILS_PACKAGE_ID : i32 = 15 ; pub const AWS_C_AUTH_PACKAGE_ID : i32 = 6 ; pub const AWS_C_HTTP_PACKAGE_ID : i32 = 2 ; pub const AWS_SHA512_LEN : i32 = 64 ; pub const AWS_SHA256_LEN : i32 = 32 ; pub const AWS_SHA1_LEN : i32 = 20 ; pub const AWS_MD5_LEN : i32 = 16 ; pub const AWS_HTTP2_DEFAULT_MAX_CLOSED_STREAMS : i32 = 32 ; pub const AWS_HTTP2_PING_DATA_SIZE : i32 = 8 ; pub const AWS_HTTP2_SETTINGS_COUNT : i32 = 6 ; pub const AWS_C_S3_PACKAGE_ID : i32 = 14 ; pub const AWS_S3_CLIENT_VERSION : & [u8 ; 6] = b"0.1.x\0" ; pub const AWS_CACHE_LINE : _bindgen_ty_18 = _bindgen_ty_18 :: AWS_CACHE_LINE ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_18 { AWS_CACHE_LINE = 64 , } pub type __gnuc_va_list = __builtin_va_list ; pub type va_list = __gnuc_va_list ; unsafe extern "C" { pub fn aws_fatal_assert (cond_str : * const :: libc :: c_char , file : * const :: libc :: c_char , line : :: libc :: c_int) -> ! ; } pub type pthread_once_t = :: libc :: 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)] pub struct aws_allocator { pub mem_acquire : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , size : usize) -> * mut :: libc :: c_void > , pub mem_release : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , ptr : * mut :: libc :: c_void) > , pub mem_realloc : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , oldptr : * mut :: libc :: c_void , oldsize : usize , newsize : usize) -> * mut :: libc :: c_void > , pub mem_calloc : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , num : usize , size : usize) -> * mut :: libc :: c_void > , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_allocator"] [:: std :: mem :: size_of :: < aws_allocator > () - 40usize] ; ["Alignment of aws_allocator"] [:: std :: mem :: align_of :: < aws_allocator > () - 8usize] ; ["Offset of field: aws_allocator::mem_acquire"] [:: std :: mem :: offset_of ! (aws_allocator , mem_acquire) - 0usize] ; ["Offset of field: aws_allocator::mem_release"] [:: std :: mem :: offset_of ! (aws_allocator , mem_release) - 8usize] ; ["Offset of field: aws_allocator::mem_realloc"] [:: std :: mem :: offset_of ! (aws_allocator , mem_realloc) - 16usize] ; ["Offset of field: aws_allocator::mem_calloc"] [:: std :: mem :: offset_of ! (aws_allocator , mem_calloc) - 24usize] ; ["Offset of field: aws_allocator::impl_"] [:: std :: mem :: offset_of ! (aws_allocator , impl_) - 32usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Inexpensive (constant time) check of data-structure invariants."] pub fn aws_allocator_is_valid (alloc : * const aws_allocator) -> bool ; } unsafe extern "C" { pub fn aws_default_allocator () -> * mut aws_allocator ; } unsafe extern "C" { pub fn aws_aligned_allocator () -> * mut aws_allocator ; } unsafe 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\n NULL. In later versions, if allocator->mem_acquire() returns NULL, this function will assert and exit. To handle\n conditions where OOM is not a fatal error, allocator->mem_acquire() is responsible for finding/reclaiming/running a\n GC etc...before returning."] pub fn aws_mem_acquire (allocator : * mut aws_allocator , size : usize) -> * mut :: libc :: c_void ; } unsafe 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\n to zero. In versions v0.6.8 and prior, this function was allowed to return NULL.\n In later versions, if allocator->mem_calloc() returns NULL, this function will assert and exit. To handle\n conditions where OOM is not a fatal error, allocator->mem_calloc() is responsible for finding/reclaiming/running a\n GC etc...before returning."] pub fn aws_mem_calloc (allocator : * mut aws_allocator , num : usize , size : usize) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Allocates many chunks of bytes into a single block. Expects to be called with alternating void ** (dest), size_t\n (size). The first void ** will be set to the root of the allocation. Alignment is assumed to be sizeof(intmax_t).\n\n This is useful for allocating structs using the pimpl pattern, as you may allocate the public object and impl object\n in the same contiguous block of memory.\n\n Returns a pointer to the allocation.\n\n In versions v0.6.8 and prior, this function was allowed to return\n NULL. In later versions, if allocator->mem_acquire() returns NULL, this function will assert and exit. To handle\n conditions where OOM is not a fatal error, allocator->mem_acquire() is responsible for finding/reclaiming/running a\n GC etc...before returning."] pub fn aws_mem_acquire_many (allocator : * mut aws_allocator , count : usize , ...) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Releases ptr back to whatever allocated it.\n Nothing happens if ptr is NULL."] pub fn aws_mem_release (allocator : * mut aws_allocator , ptr : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Attempts to adjust the size of the pointed-to memory buffer from oldsize to\n newsize. The pointer (*ptr) may be changed if the memory needs to be\n reallocated.\n\n In versions v0.6.8 and prior, this function was allowed to return\n NULL. In later versions, if allocator->mem_realloc() returns NULL, this function will assert and exit. To handle\n conditions where OOM is not a fatal error, allocator->mem_realloc() is responsible for finding/reclaiming/running a\n GC etc...before returning."] pub fn aws_mem_realloc (allocator : * mut aws_allocator , ptr : * mut * mut :: libc :: c_void , oldsize : usize , newsize : usize) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_mem_trace_level { AWS_MEMTRACE_NONE = 0 , AWS_MEMTRACE_BYTES = 1 , AWS_MEMTRACE_STACKS = 2 , } unsafe 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 ; } unsafe extern "C" { pub fn aws_mem_tracer_destroy (trace_allocator : * mut aws_allocator) -> * mut aws_allocator ; } unsafe extern "C" { pub fn aws_mem_tracer_dump (trace_allocator : * mut aws_allocator) ; } unsafe extern "C" { pub fn aws_mem_tracer_bytes (trace_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_mem_tracer_count (trace_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_small_block_allocator_new (allocator : * mut aws_allocator , multi_threaded : bool) -> * mut aws_allocator ; } unsafe extern "C" { pub fn aws_small_block_allocator_destroy (sba_allocator : * mut aws_allocator) ; } unsafe extern "C" { pub fn aws_small_block_allocator_bytes_active (sba_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_small_block_allocator_bytes_reserved (sba_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_small_block_allocator_page_size (sba_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_small_block_allocator_page_size_available (sba_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_explicit_aligned_allocator_new (alignment : usize) -> * mut aws_allocator ; } unsafe extern "C" { pub fn aws_explicit_aligned_allocator_destroy (aligned_alloc : * mut aws_allocator) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_error_info { pub error_code : :: libc :: c_int , pub literal_name : * const :: libc :: c_char , pub error_str : * const :: libc :: c_char , pub lib_name : * const :: libc :: c_char , pub formatted_name : * const :: libc :: c_char , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_error_info"] [:: std :: mem :: size_of :: < aws_error_info > () - 40usize] ; ["Alignment of aws_error_info"] [:: std :: mem :: align_of :: < aws_error_info > () - 8usize] ; ["Offset of field: aws_error_info::error_code"] [:: std :: mem :: offset_of ! (aws_error_info , error_code) - 0usize] ; ["Offset of field: aws_error_info::literal_name"] [:: std :: mem :: offset_of ! (aws_error_info , literal_name) - 8usize] ; ["Offset of field: aws_error_info::error_str"] [:: std :: mem :: offset_of ! (aws_error_info , error_str) - 16usize] ; ["Offset of field: aws_error_info::lib_name"] [:: std :: mem :: offset_of ! (aws_error_info , lib_name) - 24usize] ; ["Offset of field: aws_error_info::formatted_name"] [:: std :: mem :: offset_of ! (aws_error_info , formatted_name) - 32usize] ; } ; 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)] pub struct aws_error_info_list { pub error_list : * const aws_error_info , pub count : u16 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_error_info_list"] [:: std :: mem :: size_of :: < aws_error_info_list > () - 16usize] ; ["Alignment of aws_error_info_list"] [:: std :: mem :: align_of :: < aws_error_info_list > () - 8usize] ; ["Offset of field: aws_error_info_list::error_list"] [:: std :: mem :: offset_of ! (aws_error_info_list , error_list) - 0usize] ; ["Offset of field: aws_error_info_list::count"] [:: std :: mem :: offset_of ! (aws_error_info_list , count) - 8usize] ; } ; 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 : :: libc :: c_int , ctx : * mut :: libc :: c_void) > ; unsafe extern "C" { pub fn aws_last_error () -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_error_str (err : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { pub fn aws_error_name (err : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { pub fn aws_error_lib_name (err : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { pub fn aws_error_debug_str (err : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { pub fn aws_raise_error_private (err : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_raise_error (err : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_reset_error () ; } unsafe extern "C" { pub fn aws_restore_error (err : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_set_global_error_handler_fn (handler : aws_error_handler_fn , ctx : * mut :: libc :: c_void) -> aws_error_handler_fn ; } unsafe extern "C" { pub fn aws_set_thread_local_error_handler_fn (handler : aws_error_handler_fn , ctx : * mut :: libc :: c_void) -> aws_error_handler_fn ; } unsafe extern "C" { # [doc = " TODO: this needs to be a private function (wait till we have the cmake story\n better before moving it though). It should be external for the purpose of\n other libs we own, but customers should not be able to hit it without going\n out of their way to do so."] pub fn aws_register_error_info (error_info : * const aws_error_info_list) ; } unsafe extern "C" { pub fn aws_unregister_error_info (error_info : * const aws_error_info_list) ; } unsafe extern "C" { # [doc = " Convert a c library io error into an aws error, and raise it.\n If no conversion is found, fallback_aws_error_code is raised.\n Always returns AWS_OP_ERR."] pub fn aws_translate_and_raise_io_error_or (error_no : :: libc :: c_int , fallback_aws_error_code : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Convert a c library io error into an aws error, and raise it.\n If no conversion is found, AWS_ERROR_SYS_CALL_FAILURE is raised.\n Always returns AWS_OP_ERR."] pub fn aws_translate_and_raise_io_error (error_no : :: libc :: c_int) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_common_error { AWS_ERROR_SUCCESS = 0 , AWS_ERROR_OOM = 1 , AWS_ERROR_NO_SPACE = 2 , AWS_ERROR_UNKNOWN = 3 , AWS_ERROR_SHORT_BUFFER = 4 , AWS_ERROR_OVERFLOW_DETECTED = 5 , AWS_ERROR_UNSUPPORTED_OPERATION = 6 , AWS_ERROR_INVALID_BUFFER_SIZE = 7 , AWS_ERROR_INVALID_HEX_STR = 8 , AWS_ERROR_INVALID_BASE64_STR = 9 , AWS_ERROR_INVALID_INDEX = 10 , AWS_ERROR_THREAD_INVALID_SETTINGS = 11 , AWS_ERROR_THREAD_INSUFFICIENT_RESOURCE = 12 , AWS_ERROR_THREAD_NO_PERMISSIONS = 13 , AWS_ERROR_THREAD_NOT_JOINABLE = 14 , AWS_ERROR_THREAD_NO_SUCH_THREAD_ID = 15 , AWS_ERROR_THREAD_DEADLOCK_DETECTED = 16 , AWS_ERROR_MUTEX_NOT_INIT = 17 , AWS_ERROR_MUTEX_TIMEOUT = 18 , AWS_ERROR_MUTEX_CALLER_NOT_OWNER = 19 , AWS_ERROR_MUTEX_FAILED = 20 , AWS_ERROR_COND_VARIABLE_INIT_FAILED = 21 , AWS_ERROR_COND_VARIABLE_TIMED_OUT = 22 , AWS_ERROR_COND_VARIABLE_ERROR_UNKNOWN = 23 , AWS_ERROR_CLOCK_FAILURE = 24 , AWS_ERROR_LIST_EMPTY = 25 , AWS_ERROR_DEST_COPY_TOO_SMALL = 26 , AWS_ERROR_LIST_EXCEEDS_MAX_SIZE = 27 , AWS_ERROR_LIST_STATIC_MODE_CANT_SHRINK = 28 , AWS_ERROR_PRIORITY_QUEUE_FULL = 29 , AWS_ERROR_PRIORITY_QUEUE_EMPTY = 30 , AWS_ERROR_PRIORITY_QUEUE_BAD_NODE = 31 , AWS_ERROR_HASHTBL_ITEM_NOT_FOUND = 32 , AWS_ERROR_INVALID_DATE_STR = 33 , AWS_ERROR_INVALID_ARGUMENT = 34 , AWS_ERROR_RANDOM_GEN_FAILED = 35 , AWS_ERROR_MALFORMED_INPUT_STRING = 36 , AWS_ERROR_UNIMPLEMENTED = 37 , AWS_ERROR_INVALID_STATE = 38 , AWS_ERROR_ENVIRONMENT_GET = 39 , AWS_ERROR_ENVIRONMENT_SET = 40 , AWS_ERROR_ENVIRONMENT_UNSET = 41 , AWS_ERROR_STREAM_UNSEEKABLE = 42 , AWS_ERROR_NO_PERMISSION = 43 , AWS_ERROR_FILE_INVALID_PATH = 44 , AWS_ERROR_MAX_FDS_EXCEEDED = 45 , AWS_ERROR_SYS_CALL_FAILURE = 46 , AWS_ERROR_C_STRING_BUFFER_NOT_NULL_TERMINATED = 47 , AWS_ERROR_STRING_MATCH_NOT_FOUND = 48 , AWS_ERROR_DIVIDE_BY_ZERO = 49 , AWS_ERROR_INVALID_FILE_HANDLE = 50 , AWS_ERROR_OPERATION_INTERUPTED = 51 , AWS_ERROR_DIRECTORY_NOT_EMPTY = 52 , AWS_ERROR_PLATFORM_NOT_SUPPORTED = 53 , AWS_ERROR_INVALID_UTF8 = 54 , AWS_ERROR_GET_HOME_DIRECTORY_FAILED = 55 , AWS_ERROR_INVALID_XML = 56 , AWS_ERROR_FILE_OPEN_FAILURE = 57 , AWS_ERROR_FILE_READ_FAILURE = 58 , AWS_ERROR_FILE_WRITE_FAILURE = 59 , AWS_ERROR_INVALID_CBOR = 60 , AWS_ERROR_CBOR_UNEXPECTED_TYPE = 61 , AWS_ERROR_END_COMMON_RANGE = 1023 , } unsafe extern "C" { # [doc = " Returns whether each byte is zero."] pub fn aws_is_mem_zeroed (buf : * const :: libc :: c_void , bufsize : usize) -> bool ; } unsafe extern "C" { # [doc = " Securely zeroes a memory buffer. This function will attempt to ensure that\n the compiler will not optimize away this zeroing operation."] pub fn aws_secure_zero (pBuf : * mut :: libc :: c_void , bufsize : usize) ; } unsafe extern "C" { # [doc = " Initializes internal data structures used by aws-c-common.\n Must be called before using any functionality in aws-c-common."] pub fn aws_common_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Shuts down the internal data structures used by aws-c-common."] pub fn aws_common_library_clean_up () ; } unsafe extern "C" { pub fn aws_common_fatal_assert_library_initialized () ; } unsafe extern "C" { # [doc = " Multiplies a * b. If the result overflows, returns 2^64 - 1."] pub fn aws_mul_u64_saturating (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { # [doc = " If a * b overflows, returns AWS_OP_ERR; otherwise multiplies\n a * b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_mul_u64_checked (a : u64 , b : u64 , r : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Multiplies a * b. If the result overflows, returns 2^32 - 1."] pub fn aws_mul_u32_saturating (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { # [doc = " If a * b overflows, returns AWS_OP_ERR; otherwise multiplies\n a * b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_mul_u32_checked (a : u32 , b : u32 , r : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Adds a + b.  If the result overflows returns 2^64 - 1."] pub fn aws_add_u64_saturating (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { # [doc = " If a + b overflows, returns AWS_OP_ERR; otherwise adds\n a + b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_add_u64_checked (a : u64 , b : u64 , r : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Adds a + b. If the result overflows returns 2^32 - 1."] pub fn aws_add_u32_saturating (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { # [doc = " If a + b overflows, returns AWS_OP_ERR; otherwise adds\n a + b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_add_u32_checked (a : u32 , b : u32 , r : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Subtracts a - b. If the result overflows returns 0."] pub fn aws_sub_u64_saturating (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { # [doc = " If a - b overflows, returns AWS_OP_ERR; otherwise subtracts\n a - b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_sub_u64_checked (a : u64 , b : u64 , r : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Subtracts a - b. If the result overflows returns 0."] pub fn aws_sub_u32_saturating (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { # [doc = " If a - b overflows, returns AWS_OP_ERR; otherwise subtracts\n a - b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_sub_u32_checked (a : u32 , b : u32 , r : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Multiplies a * b. If the result overflows, returns SIZE_MAX."] pub fn aws_mul_size_saturating (a : usize , b : usize) -> usize ; } unsafe extern "C" { # [doc = " Multiplies a * b and returns the result in *r. If the result\n overflows, returns AWS_OP_ERR; otherwise returns AWS_OP_SUCCESS."] pub fn aws_mul_size_checked (a : usize , b : usize , r : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Adds a + b.  If the result overflows returns SIZE_MAX."] pub fn aws_add_size_saturating (a : usize , b : usize) -> usize ; } unsafe extern "C" { # [doc = " Adds a + b and returns the result in *r. If the result\n overflows, returns AWS_OP_ERR; otherwise returns AWS_OP_SUCCESS."] pub fn aws_add_size_checked (a : usize , b : usize , r : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Adds [num] arguments (expected to be of size_t), and returns the result in *r.\n 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 , ...) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Subtracts a - b. If the result overflows returns 0."] pub fn aws_sub_size_saturating (a : usize , b : usize) -> usize ; } unsafe extern "C" { # [doc = " If a - b overflows, returns AWS_OP_ERR; otherwise subtracts\n a - b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_sub_size_checked (a : usize , b : usize , r : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Function to check if x is power of 2"] pub fn aws_is_power_of_two (x : usize) -> bool ; } unsafe extern "C" { # [doc = " Function to find the smallest result that is power of 2 >= n. Returns AWS_OP_ERR if this cannot\n be done without overflow"] pub fn aws_round_up_to_power_of_two (n : usize , result : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Counts the number of leading 0 bits in an integer. 0 will return the size of the integer in bits."] pub fn aws_clz_u32 (n : u32) -> usize ; } unsafe extern "C" { pub fn aws_clz_i32 (n : i32) -> usize ; } unsafe extern "C" { pub fn aws_clz_u64 (n : u64) -> usize ; } unsafe extern "C" { pub fn aws_clz_i64 (n : i64) -> usize ; } unsafe extern "C" { pub fn aws_clz_size (n : usize) -> usize ; } unsafe extern "C" { # [doc = " Counts the number of trailing 0 bits in an integer. 0 will return the size of the integer in bits."] pub fn aws_ctz_u32 (n : u32) -> usize ; } unsafe extern "C" { pub fn aws_ctz_i32 (n : i32) -> usize ; } unsafe extern "C" { pub fn aws_ctz_u64 (n : u64) -> usize ; } unsafe extern "C" { pub fn aws_ctz_i64 (n : i64) -> usize ; } unsafe extern "C" { pub fn aws_ctz_size (n : usize) -> usize ; } unsafe extern "C" { pub fn aws_min_u8 (a : u8 , b : u8) -> u8 ; } unsafe extern "C" { pub fn aws_max_u8 (a : u8 , b : u8) -> u8 ; } unsafe extern "C" { pub fn aws_min_i8 (a : i8 , b : i8) -> i8 ; } unsafe extern "C" { pub fn aws_max_i8 (a : i8 , b : i8) -> i8 ; } unsafe extern "C" { pub fn aws_min_u16 (a : u16 , b : u16) -> u16 ; } unsafe extern "C" { pub fn aws_max_u16 (a : u16 , b : u16) -> u16 ; } unsafe extern "C" { pub fn aws_min_i16 (a : i16 , b : i16) -> i16 ; } unsafe extern "C" { pub fn aws_max_i16 (a : i16 , b : i16) -> i16 ; } unsafe extern "C" { pub fn aws_min_u32 (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { pub fn aws_max_u32 (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { pub fn aws_min_i32 (a : i32 , b : i32) -> i32 ; } unsafe extern "C" { pub fn aws_max_i32 (a : i32 , b : i32) -> i32 ; } unsafe extern "C" { pub fn aws_min_u64 (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { pub fn aws_max_u64 (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { pub fn aws_min_i64 (a : i64 , b : i64) -> i64 ; } unsafe extern "C" { pub fn aws_max_i64 (a : i64 , b : i64) -> i64 ; } unsafe extern "C" { pub fn aws_min_size (a : usize , b : usize) -> usize ; } unsafe extern "C" { pub fn aws_max_size (a : usize , b : usize) -> usize ; } unsafe extern "C" { pub fn aws_min_int (a : :: libc :: c_int , b : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_max_int (a : :: libc :: c_int , b : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_min_float (a : f32 , b : f32) -> f32 ; } unsafe extern "C" { pub fn aws_max_float (a : f32 , b : f32) -> f32 ; } unsafe extern "C" { pub fn aws_min_double (a : f64 , b : f64) -> f64 ; } unsafe extern "C" { pub fn aws_max_double (a : f64 , b : f64) -> f64 ; } pub const AWS_ARRAY_LIST_DEBUG_FILL : _bindgen_ty_19 = _bindgen_ty_19 :: AWS_ARRAY_LIST_DEBUG_FILL ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_19 { AWS_ARRAY_LIST_DEBUG_FILL = 221 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_array_list { pub alloc : * mut aws_allocator , pub current_size : usize , pub length : usize , pub item_size : usize , pub data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_array_list"] [:: std :: mem :: size_of :: < aws_array_list > () - 40usize] ; ["Alignment of aws_array_list"] [:: std :: mem :: align_of :: < aws_array_list > () - 8usize] ; ["Offset of field: aws_array_list::alloc"] [:: std :: mem :: offset_of ! (aws_array_list , alloc) - 0usize] ; ["Offset of field: aws_array_list::current_size"] [:: std :: mem :: offset_of ! (aws_array_list , current_size) - 8usize] ; ["Offset of field: aws_array_list::length"] [:: std :: mem :: offset_of ! (aws_array_list , length) - 16usize] ; ["Offset of field: aws_array_list::item_size"] [:: std :: mem :: offset_of ! (aws_array_list , item_size) - 24usize] ; ["Offset of field: aws_array_list::data"] [:: std :: mem :: offset_of ! (aws_array_list , data) - 32usize] ; } ; 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.\n\n a and b should be cast to pointers to the element type held in the list\n before being dereferenced. The function should compare the elements and\n return a positive number if a > b, zero if a = b, and a negative number\n if a < b."] pub type aws_array_list_comparator_fn = :: std :: option :: Option < unsafe extern "C" fn (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> :: libc :: c_int > ; unsafe extern "C" { # [doc = " Initializes an array list with an array of size initial_item_allocation * item_size. In this mode, the array size\n will grow by a factor of 2 upon insertion if space is not available. initial_item_allocation is the number of\n elements you want space allocated for. item_size is the size of each element in bytes. Mixing items types is not\n supported by this API."] pub fn aws_array_list_init_dynamic (list : * mut aws_array_list , alloc : * mut aws_allocator , initial_item_allocation : usize , item_size : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes an array list with a preallocated array of void *. item_count is the number of elements in the array,\n and item_size is the size in bytes of each element. Mixing items types is not supported\n by this API. Once this list is full, new items will be rejected."] pub fn aws_array_list_init_static (list : * mut aws_array_list , raw_array : * mut :: libc :: c_void , item_count : usize , item_size : usize) ; } unsafe extern "C" { # [doc = " Initializes an array list with a preallocated array of *already-initialized* elements. item_count is the number of\n elements in the array, and item_size is the size in bytes of each element.\n\n Once initialized, nothing further can be added to the list, since it will be full and cannot resize.\n\n Primary use case is to treat an already-initialized C array as an array list."] pub fn aws_array_list_init_static_from_initialized (list : * mut aws_array_list , raw_array : * mut :: libc :: c_void , item_count : usize , item_size : usize) ; } unsafe extern "C" { # [doc = " Set of properties of a valid aws_array_list."] pub fn aws_array_list_is_valid (list : * const aws_array_list) -> bool ; } unsafe extern "C" { # [doc = " Deallocates any memory that was allocated for this list, and resets list for reuse or deletion."] pub fn aws_array_list_clean_up (list : * mut aws_array_list) ; } unsafe extern "C" { # [doc = " Erases and then deallocates any memory that was allocated for this list, and resets list for reuse or deletion."] pub fn aws_array_list_clean_up_secure (list : * mut aws_array_list) ; } unsafe extern "C" { # [doc = " Pushes the memory pointed to by val onto the end of internal list"] pub fn aws_array_list_push_back (list : * mut aws_array_list , val : * const :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the element at the front of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised"] pub fn aws_array_list_front (list : * const aws_array_list , val : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Pushes the memory pointed to by val onto the front of internal list.\n This call results in shifting all of the elements in the list. Avoid this call unless that\n is intended behavior."] pub fn aws_array_list_push_front (list : * mut aws_array_list , val : * const :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Deletes the element at the front of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised.\n This call results in shifting all of the elements at the end of the array to the front. Avoid this call unless that\n is intended behavior."] pub fn aws_array_list_pop_front (list : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Delete N elements from the front of the list.\n Remaining elements are shifted to the front of the list.\n If the list has less than N elements, the list is cleared.\n This call is more efficient than calling aws_array_list_pop_front() N times."] pub fn aws_array_list_pop_front_n (list : * mut aws_array_list , n : usize) ; } unsafe extern "C" { # [doc = " Deletes the element this index in the list if it exists.\n If element does not exist, AWS_ERROR_INVALID_INDEX will be raised.\n This call results in shifting all remaining elements towards the front.\n Avoid this call unless that is intended behavior."] pub fn aws_array_list_erase (list : * mut aws_array_list , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the element at the end of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised."] pub fn aws_array_list_back (list : * const aws_array_list , val : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Deletes the element at the end of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised."] pub fn aws_array_list_pop_back (list : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Clears all elements in the array and resets length to zero. Size does not change in this operation."] pub fn aws_array_list_clear (list : * mut aws_array_list) ; } unsafe 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) -> :: libc :: c_int ; } unsafe 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\n in to will be overwritten in this copy."] pub fn aws_array_list_copy (from : * const aws_array_list , to : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Swap contents between two dynamic lists. Both lists must use the same allocator."] pub fn aws_array_list_swap_contents (list_a : * mut aws_array_list , list_b : * mut aws_array_list) ; } unsafe extern "C" { # [doc = " Returns the number of elements that can fit in the internal array. If list is initialized in dynamic mode,\n the capacity changes over time."] pub fn aws_array_list_capacity (list : * const aws_array_list) -> usize ; } unsafe extern "C" { # [doc = " Returns the number of elements in the internal array."] pub fn aws_array_list_length (list : * const aws_array_list) -> usize ; } unsafe extern "C" { # [doc = " Copies the memory at index to val. If element does not exist, AWS_ERROR_INVALID_INDEX will be raised."] pub fn aws_array_list_get_at (list : * const aws_array_list , val : * mut :: libc :: c_void , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the memory address of the element at index to *val. If element does not exist, AWS_ERROR_INVALID_INDEX will be\n raised."] pub fn aws_array_list_get_at_ptr (list : * const aws_array_list , val : * mut * mut :: libc :: c_void , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Ensures that the array list has enough capacity to store a value at the specified index. If there is not already\n enough capacity, and the list is in dynamic mode, this function will attempt to allocate more memory, expanding the\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the the memory pointed to by val into the array at index. If in dynamic mode, the size will grow by a factor\n of two when the array is full. In static mode, AWS_ERROR_INVALID_INDEX will be raised if the index is past the bounds\n of the array."] pub fn aws_array_list_set_at (list : * mut aws_array_list , val : * const :: libc :: c_void , index : usize) -> :: libc :: c_int ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Sort elements in the list in-place according to the comparator function."] pub fn aws_array_list_sort (list : * mut aws_array_list , compare_fn : aws_array_list_comparator_fn) ; } unsafe extern "C" { # [doc = " Returns 1 if machine is big endian, 0 if little endian.\n If you compile with even -O1 optimization, this check is completely optimized\n out at compile time and code which calls \"if (aws_is_big_endian())\" will do\n the right thing without branching."] pub fn aws_is_big_endian () -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Convert 64 bit integer from host to network byte order."] pub fn aws_hton64 (x : u64) -> u64 ; } unsafe extern "C" { # [doc = " Convert 64 bit integer from network to host byte order."] pub fn aws_ntoh64 (x : u64) -> u64 ; } unsafe extern "C" { # [doc = " Convert 32 bit integer from host to network byte order."] pub fn aws_hton32 (x : u32) -> u32 ; } unsafe extern "C" { # [doc = " Convert 32 bit float from host to network byte order."] pub fn aws_htonf32 (x : f32) -> f32 ; } unsafe extern "C" { # [doc = " Convert 64 bit double from host to network byte order."] pub fn aws_htonf64 (x : f64) -> f64 ; } unsafe extern "C" { # [doc = " Convert 32 bit integer from network to host byte order."] pub fn aws_ntoh32 (x : u32) -> u32 ; } unsafe extern "C" { # [doc = " Convert 32 bit float from network to host byte order."] pub fn aws_ntohf32 (x : f32) -> f32 ; } unsafe extern "C" { # [doc = " Convert 32 bit float from network to host byte order."] pub fn aws_ntohf64 (x : f64) -> f64 ; } unsafe extern "C" { # [doc = " Convert 16 bit integer from host to network byte order."] pub fn aws_hton16 (x : u16) -> u16 ; } unsafe extern "C" { # [doc = " Convert 16 bit integer from network to host byte order."] pub fn aws_ntoh16 (x : u16) -> u16 ; } # [doc = " Represents a length-delimited binary string or buffer. If byte buffer points\n to constant memory or memory that should otherwise not be freed by this\n struct, set allocator to NULL and free function will be a no-op.\n\n This structure used to define the output for all functions that write to a buffer.\n\n Note that this structure allocates memory at the buffer pointer only. The\n struct itself does not get dynamically allocated and must be either\n maintained or copied to avoid losing access to the memory."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_byte_buf { pub len : usize , pub buffer : * mut u8 , pub capacity : usize , pub allocator : * mut aws_allocator , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_byte_buf"] [:: std :: mem :: size_of :: < aws_byte_buf > () - 32usize] ; ["Alignment of aws_byte_buf"] [:: std :: mem :: align_of :: < aws_byte_buf > () - 8usize] ; ["Offset of field: aws_byte_buf::len"] [:: std :: mem :: offset_of ! (aws_byte_buf , len) - 0usize] ; ["Offset of field: aws_byte_buf::buffer"] [:: std :: mem :: offset_of ! (aws_byte_buf , buffer) - 8usize] ; ["Offset of field: aws_byte_buf::capacity"] [:: std :: mem :: offset_of ! (aws_byte_buf , capacity) - 16usize] ; ["Offset of field: aws_byte_buf::allocator"] [:: std :: mem :: offset_of ! (aws_byte_buf , allocator) - 24usize] ; } ; 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.\n\n This structure is used to define buffers for reading."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_byte_cursor { pub len : usize , pub ptr : * mut u8 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_byte_cursor"] [:: std :: mem :: size_of :: < aws_byte_cursor > () - 16usize] ; ["Alignment of aws_byte_cursor"] [:: std :: mem :: align_of :: < aws_byte_cursor > () - 8usize] ; ["Offset of field: aws_byte_cursor::len"] [:: std :: mem :: offset_of ! (aws_byte_cursor , len) - 0usize] ; ["Offset of field: aws_byte_cursor::ptr"] [:: std :: mem :: offset_of ! (aws_byte_cursor , ptr) - 8usize] ; } ; 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 > ; unsafe extern "C" { # [doc = " Compare two arrays.\n Return whether their contents are equivalent.\n NULL may be passed as the array pointer if its length is declared to be 0."] pub fn aws_array_eq (array_a : * const :: libc :: c_void , len_a : usize , array_b : * const :: libc :: c_void , len_b : usize) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of two arrays.\n Return whether their contents are equivalent.\n NULL may be passed as the array pointer if its length is declared to be 0.\n The \"C\" locale is used for comparing upper and lowercase letters.\n Data is assumed to be ASCII text, UTF-8 will work fine too."] pub fn aws_array_eq_ignore_case (array_a : * const :: libc :: c_void , len_a : usize , array_b : * const :: libc :: c_void , len_b : usize) -> bool ; } unsafe extern "C" { # [doc = " Compare an array and a null-terminated string.\n Returns true if their contents are equivalent.\n The array should NOT contain a null-terminator, or the comparison will always return false.\n 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 :: libc :: c_void , array_len : usize , c_str : * const :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of an array and a null-terminated string.\n Return whether their contents are equivalent.\n The array should NOT contain a null-terminator, or the comparison will always return false.\n NULL may be passed as the array pointer if its length is declared to be 0.\n The \"C\" locale is used for comparing upper and lowercase letters.\n Data is assumed to be ASCII text, UTF-8 will work fine too."] pub fn aws_array_eq_c_str_ignore_case (array : * const :: libc :: c_void , array_len : usize , c_str : * const :: libc :: c_char) -> bool ; } unsafe extern "C" { pub fn aws_byte_buf_init (buf : * mut aws_byte_buf , allocator : * mut aws_allocator , capacity : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes an aws_byte_buf structure base on another valid one.\n Requires: *src and *allocator are valid objects.\n Ensures: *dest is a valid aws_byte_buf with a new backing array dest->buffer\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Reads 'filename' into 'out_buf'. If successful, 'out_buf' is allocated and filled with the data;\n It is your responsibility to call 'aws_byte_buf_clean_up()' on it. Otherwise, 'out_buf' remains\n unused. In the very unfortunate case where some API needs to treat out_buf as a c_string, a null terminator\n 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 :: libc :: c_char) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Same as aws_byte_buf_init_from_file(), but for reading \"special files\" like /proc/cpuinfo.\n These files don't accurately report their size, so size_hint is used as initial buffer size,\n and the buffer grows until the while file is read."] pub fn aws_byte_buf_init_from_file_with_size_hint (out_buf : * mut aws_byte_buf , alloc : * mut aws_allocator , filename : * const :: libc :: c_char , size_hint : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Evaluates the set of properties that define the shape of all valid aws_byte_buf structures.\n 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 ; } unsafe extern "C" { # [doc = " Evaluates the set of properties that define the shape of all valid aws_byte_cursor structures.\n 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 ; } unsafe extern "C" { # [doc = " Copies src buffer into dest and sets the correct len and capacity.\n A new memory zone is allocated for dest->buffer. When dest is no longer needed it will have to be cleaned-up using\n aws_byte_buf_clean_up(dest).\n Dest capacity and len will be equal to the src len. Allocator of the dest will be identical with parameter allocator.\n If src buffer is null the dest will have a null buffer with a len and a capacity of 0\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Init buffer with contents of multiple cursors, and update cursors to reference the memory stored in the buffer.\n Each cursor arg must be an `struct aws_byte_cursor *`. NULL must be passed as the final arg.\n NOTE: Do not append/grow/resize buffers initialized this way, or the cursors will end up referencing invalid memory.\n Returns AWS_OP_SUCCESS in case of success.\n 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 , ...) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_byte_buf_clean_up (buf : * mut aws_byte_buf) ; } unsafe extern "C" { # [doc = " Equivalent to calling aws_byte_buf_secure_zero and then aws_byte_buf_clean_up\n on the buffer."] pub fn aws_byte_buf_clean_up_secure (buf : * mut aws_byte_buf) ; } unsafe extern "C" { # [doc = " Resets the len of the buffer to 0, but does not free the memory. The buffer can then be reused.\n 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) ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Compare two aws_byte_buf structures.\n Return whether their contents are equivalent."] pub fn aws_byte_buf_eq (a : * const aws_byte_buf , b : * const aws_byte_buf) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of two aws_byte_buf structures.\n Return whether their contents are equivalent.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 ; } unsafe extern "C" { # [doc = " Compare an aws_byte_buf and a null-terminated string.\n Returns true if their contents are equivalent.\n 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 :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of an aws_byte_buf and a null-terminated string.\n Return whether their contents are equivalent.\n The buffer should NOT contain a null-terminator, or the comparison will always return false.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " No copies, no buffer allocations. Iterates over input_str, and returns the\n next substring between split_on instances relative to previous substr.\n Behaves similar to strtok with substr being used as state for next split.\n\n Returns true each time substr is set and false when there is no more splits\n (substr is set to empty in that case).\n\n Example usage.\n struct aws_byte_cursor substr = {0};\n while (aws_byte_cursor_next_split(&input_str, ';', &substr)) {\n   // ...use substr...\n }\n\n Note: It is the user's responsibility zero-initialize substr before the first call.\n\n Edge case rules are as follows:\n empty input will have single empty split. ex. \"\" splits into \"\"\n if input starts with split_on then first split is empty. ex \";A\" splits into \"\", \"A\"\n adjacent split tokens result in empty split. ex \"A;;B\" splits into \"A\", \"\", \"B\"\n If the input ends with split_on, last split is empty. ex. \"A;\" splits into \"A\", \"\"\n\n It is the user's responsibility to make sure the input buffer stays in memory\n long enough to use the results."] pub fn aws_byte_cursor_next_split (input_str : * const aws_byte_cursor , split_on : :: libc :: c_char , substr : * mut aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " No copies, no buffer allocations. Fills in output with a list of\n aws_byte_cursor instances where buffer is an offset into the input_str and\n len is the length of that string in the original buffer.\n\n Edge case rules are as follows:\n if the input begins with split_on, an empty cursor will be the first entry in\n output. if the input has two adjacent split_on tokens, an empty cursor will\n be inserted into the output. if the input ends with split_on, an empty cursor\n will be appended to the output.\n\n It is the user's responsibility to properly initialize output. Recommended number of preallocated elements from\n output is your most likely guess for the upper bound of the number of elements resulting from the split.\n\n The type that will be stored in output is struct aws_byte_cursor (you'll need\n this for the item size param).\n\n It is the user's responsibility to make sure the input buffer stays in memory\n long enough to use the results."] pub fn aws_byte_cursor_split_on_char (input_str : * const aws_byte_cursor , split_on : :: libc :: c_char , output : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " No copies, no buffer allocations. Fills in output with a list of aws_byte_cursor instances where buffer is\n an offset into the input_str and len is the length of that string in the original buffer. N is the max number of\n splits, if this value is zero, it will add all splits to the output.\n\n Edge case rules are as follows:\n if the input begins with split_on, an empty cursor will be the first entry in output\n if the input has two adjacent split_on tokens, an empty cursor will be inserted into the output.\n if the input ends with split_on, an empty cursor will be appended to the output.\n\n It is the user's responsibility to properly initialize output. Recommended number of preallocated elements from\n output is your most likely guess for the upper bound of the number of elements resulting from the split.\n\n If the output array is not large enough, input_str will be updated to point to the first character after the last\n processed split_on instance.\n\n The type that will be stored in output is struct aws_byte_cursor (you'll need this for the item size param).\n\n 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 : :: libc :: c_char , n : usize , output : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Search for an exact byte match inside a cursor. The first match will be returned. Returns AWS_OP_SUCCESS\n on successful match and first_find will be set to the offset in input_str, and length will be the remaining length\n from input_str past the returned offset. If the match was not found, AWS_OP_ERR will be returned and\n 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) -> :: libc :: c_int ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Copies from to to. If to is too small, AWS_ERROR_DEST_COPY_TOO_SMALL will be\n returned. dest->len will contain the amount of data actually copied to dest.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies from to to while converting bytes via the passed in lookup table.\n If to is too small, AWS_ERROR_DEST_COPY_TOO_SMALL will be\n returned. to->len will contain its original size plus the amount of data actually copied to to.\n\n from and to should not be the same buffer (overlap is not handled)\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies from to to. If to is too small, the buffer will be grown appropriately and\n the old contents copied to, before the new contents are appended.\n\n If the grow fails (overflow or OOM), then an error will be returned.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies `from` to `to`. If `to` is too small, the buffer will be grown appropriately and\n the old contents copied over, before the new contents are appended.\n\n If the grow fails (overflow or OOM), then an error will be returned.\n\n If the buffer is grown, the old buffer will be securely cleared before getting freed.\n\n `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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies a single byte into `to`. If `to` is too small, the buffer will be grown appropriately and\n the old contents copied over, before the byte is appended.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies a single byte into `to`. If `to` is too small, the buffer will be grown appropriately and\n the old contents copied over, before the byte is appended.\n\n If the grow fails (overflow or OOM), then an error will be returned.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copy contents of cursor to buffer, then update cursor to reference the memory stored in the buffer.\n If buffer is too small, AWS_ERROR_DEST_COPY_TOO_SMALL will be returned.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Appends '\\0' at the end of the buffer."] pub fn aws_byte_buf_append_null_terminator (buf : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Attempts to increase the capacity of a buffer to the requested capacity\n\n If the the buffer's capacity is currently larger than the request capacity, the\n function does nothing (no shrink is performed)."] pub fn aws_byte_buf_reserve (buffer : * mut aws_byte_buf , requested_capacity : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Convenience function that attempts to increase the capacity of a buffer relative to the current\n length.\n\n  aws_byte_buf_reserve_relative(buf, x) ~~ aws_byte_buf_reserve(buf, buf->len + x)\n"] pub fn aws_byte_buf_reserve_relative (buffer : * mut aws_byte_buf , additional_length : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Concatenates a variable number of struct aws_byte_buf * into destination.\n Number of args must be greater than 1. If dest is too small,\n AWS_ERROR_DEST_COPY_TOO_SMALL will be returned. dest->len will contain the\n amount of data actually copied to dest."] pub fn aws_byte_buf_cat (dest : * mut aws_byte_buf , number_of_args : usize , ...) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Compare two aws_byte_cursor structures.\n Return whether their contents are equivalent."] pub fn aws_byte_cursor_eq (a : * const aws_byte_cursor , b : * const aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of two aws_byte_cursor structures.\n Return whether their contents are equivalent.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 ; } unsafe extern "C" { # [doc = " Compare an aws_byte_cursor and an aws_byte_buf.\n 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 ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of an aws_byte_cursor and an aws_byte_buf.\n Return whether their contents are equivalent.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 ; } unsafe extern "C" { # [doc = " Compare an aws_byte_cursor and a null-terminated string.\n Returns true if their contents are equivalent.\n 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 :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of an aws_byte_cursor and a null-terminated string.\n Return whether their contents are equivalent.\n The cursor should NOT contain a null-terminator, or the comparison will always return false.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 :: libc :: c_char) -> bool ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Return true if the input starts with the prefix (case-insensitive).\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 ; } unsafe extern "C" { # [doc = " Case-insensitive hash function for array containing ASCII or UTF-8 text."] pub fn aws_hash_array_ignore_case (array : * const :: libc :: c_void , len : usize) -> u64 ; } unsafe extern "C" { # [doc = " Case-insensitive hash function for aws_byte_cursors stored in an aws_hash_table.\n For case-sensitive hashing, use aws_hash_byte_cursor_ptr()."] pub fn aws_hash_byte_cursor_ptr_ignore_case (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Returns a lookup table for bytes that is the identity transformation with the exception\n of uppercase ascii characters getting replaced with lowercase characters.  Used in\n caseless comparisons."] pub fn aws_lookup_table_to_lower_get () -> * const u8 ; } unsafe extern "C" { # [doc = " Returns lookup table to go from ASCII/UTF-8 hex character to a number (0-15).\n Non-hex characters map to 255.\n Valid examples:\n '0' -> 0\n 'F' -> 15\n 'f' -> 15\n Invalid examples:\n ' ' -> 255\n 'Z' -> 255\n '\\0' -> 255"] pub fn aws_lookup_table_hex_to_num_get () -> * const u8 ; } unsafe 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) -> :: libc :: c_int ; } unsafe 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) -> :: libc :: c_int ; } unsafe 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 :: libc :: c_char) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_byte_buf_from_array (bytes : * const :: libc :: c_void , len : usize) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_byte_buf_from_empty_array (bytes : * const :: libc :: c_void , capacity : usize) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_byte_cursor_from_buf (buf : * const aws_byte_buf) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_byte_cursor_from_c_str (c_str : * const :: libc :: c_char) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_byte_cursor_from_array (bytes : * const :: libc :: c_void , len : usize) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Tests if the given aws_byte_cursor has at least len bytes remaining. If so,\n *buf is advanced by len bytes (incrementing ->ptr and decrementing ->len),\n and an aws_byte_cursor referring to the first len bytes of the original *buf\n is returned. Otherwise, an aws_byte_cursor with ->ptr = NULL, ->len = 0 is\n returned.\n\n Note that if len is above (SIZE_MAX / 2), this function will also treat it as\n 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 ; } unsafe extern "C" { # [doc = " Behaves identically to aws_byte_cursor_advance, but avoids speculative\n execution potentially reading out-of-bounds pointers (by returning an\n empty ptr in such speculated paths).\n\n This should generally be done when using an untrusted or\n data-dependent value for 'len', to avoid speculating into a path where\n 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 ; } unsafe extern "C" { # [doc = " Reads specified length of data from byte cursor and copies it to the\n destination array.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read (cur : * mut aws_byte_cursor , dest : * mut :: libc :: c_void , len : usize) -> bool ; } unsafe extern "C" { # [doc = " Reads as many bytes from cursor as size of buffer, and copies them to buffer.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_and_fill_buffer (cur : * mut aws_byte_cursor , dest : * mut aws_byte_buf) -> bool ; } unsafe extern "C" { # [doc = " Reads a single byte from cursor, placing it in *var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_u8 (cur : * mut aws_byte_cursor , var : * mut u8) -> bool ; } unsafe extern "C" { # [doc = " Reads a 16-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_be16 (cur : * mut aws_byte_cursor , var : * mut u16) -> bool ; } unsafe extern "C" { # [doc = " Reads an unsigned 24-bit value (3 bytes) in network byte order from cur,\n and places it in host byte order into 32-bit var.\n Ex: if cur's next 3 bytes are {0xAA, 0xBB, 0xCC}, then var becomes 0x00AABBCC.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_be24 (cur : * mut aws_byte_cursor , var : * mut u32) -> bool ; } unsafe extern "C" { # [doc = " Reads a 32-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_be32 (cur : * mut aws_byte_cursor , var : * mut u32) -> bool ; } unsafe extern "C" { # [doc = " Reads a 64-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_be64 (cur : * mut aws_byte_cursor , var : * mut u64) -> bool ; } unsafe extern "C" { # [doc = " Reads a 32-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_float_be32 (cur : * mut aws_byte_cursor , var : * mut f32) -> bool ; } unsafe extern "C" { # [doc = " Reads a 64-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_float_be64 (cur : * mut aws_byte_cursor , var : * mut f64) -> bool ; } unsafe extern "C" { # [doc = " Reads 2 hex characters from ASCII/UTF-8 text to produce an 8-bit number.\n Accepts both lowercase 'a'-'f' and uppercase 'A'-'F'.\n For example: \"0F\" produces 15.\n\n On success, returns true and advances the cursor by 2.\n If there is insufficient space in the cursor or an invalid character\n 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 ; } unsafe extern "C" { # [doc = " Appends a sub-buffer to the specified buffer.\n\n If the buffer has at least `len' bytes remaining (buffer->capacity - buffer->len >= len),\n then buffer->len is incremented by len, and an aws_byte_buf is assigned to *output corresponding\n to the last len bytes of the input buffer. The aws_byte_buf at *output will have a null\n allocator, a zero initial length, and a capacity of 'len'. The function then returns true.\n\n If there is insufficient space, then this function nulls all fields in *output and returns\n false."] pub fn aws_byte_buf_advance (buffer : * mut aws_byte_buf , output : * mut aws_byte_buf , len : usize) -> bool ; } unsafe extern "C" { # [doc = " Write specified number of bytes from array to byte buffer.\n\n On success, returns true and updates the buffer length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write (buf : * mut aws_byte_buf , src : * const u8 , len : usize) -> bool ; } unsafe extern "C" { # [doc = " Copies all bytes from buffer to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_from_whole_buffer (buf : * mut aws_byte_buf , src : aws_byte_buf) -> bool ; } unsafe extern "C" { # [doc = " Copies all bytes from buffer to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_from_whole_cursor (buf : * mut aws_byte_buf , src : aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " Without increasing buf's capacity, write as much as possible from advancing_cursor into buf.\n\n buf's len is updated accordingly.\n advancing_cursor is advanced so it contains the remaining unwritten parts.\n Returns the section of advancing_cursor which was written.\n\n This function cannot fail. If buf is full (len == capacity) or advancing_len has 0 length,\n then buf and advancing_cursor are not altered and a cursor with 0 length is returned.\n\n Example: Given a buf with 2 bytes of space available and advancing_cursor with contents \"abc\".\n \"ab\" will be written to buf and buf->len will increase 2 and become equal to buf->capacity.\n advancing_cursor will advance so its contents become the unwritten \"c\".\n 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 ; } unsafe extern "C" { # [doc = " Copies one byte to buffer.\n\n On success, returns true and updates the cursor /length\naccordingly.\n\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_u8 (buf : * mut aws_byte_buf , c : u8) -> bool ; } unsafe extern "C" { # [doc = " Writes one byte repeatedly to buffer (like memset)\n\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_u8_n (buf : * mut aws_byte_buf , c : u8 , count : usize) -> bool ; } unsafe extern "C" { # [doc = " Writes a 16-bit integer in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_be16 (buf : * mut aws_byte_buf , x : u16) -> bool ; } unsafe extern "C" { # [doc = " Writes low 24-bits (3 bytes) of an unsigned integer in network byte order (big endian) to buffer.\n Ex: If x is 0x00AABBCC then {0xAA, 0xBB, 0xCC} is written to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, or x's value cannot fit in 3 bytes,\n returns false, leaving the buffer unchanged."] pub fn aws_byte_buf_write_be24 (buf : * mut aws_byte_buf , x : u32) -> bool ; } unsafe extern "C" { # [doc = " Writes a 32-bit integer in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_be32 (buf : * mut aws_byte_buf , x : u32) -> bool ; } unsafe extern "C" { # [doc = " Writes a 32-bit float in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_float_be32 (buf : * mut aws_byte_buf , x : f32) -> bool ; } unsafe extern "C" { # [doc = " Writes a 64-bit integer in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_be64 (buf : * mut aws_byte_buf , x : u64) -> bool ; } unsafe extern "C" { # [doc = " Writes a 64-bit float in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_float_be64 (buf : * mut aws_byte_buf , x : f64) -> bool ; } unsafe extern "C" { # [doc = " Like isalnum(), but ignores C locale.\n 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 ; } unsafe extern "C" { # [doc = " Like isalpha(), but ignores C locale.\n Returns true if ch has the value of ASCII/UTF-8: 'a'-'z' or 'A'-'Z'."] pub fn aws_isalpha (ch : u8) -> bool ; } unsafe extern "C" { # [doc = " Like isdigit().\n Returns true if ch has the value of ASCII/UTF-8: '0'-'9'.\n\n Note: C's built-in isdigit() is also supposed to ignore the C locale,\n but cppreference.com claims \"some implementations (e.g. Microsoft in 1252 codepage)\n may classify additional single-byte characters as digits\""] pub fn aws_isdigit (ch : u8) -> bool ; } unsafe extern "C" { # [doc = " Like isxdigit().\n Returns true if ch has the value of ASCII/UTF-8: '0'-'9', 'a'-'f', or 'A'-'F'.\n\n Note: C's built-in isxdigit() is also supposed to ignore the C locale,\n but cppreference.com claims \"some implementations (e.g. Microsoft in 1252 codepage)\n may classify additional single-byte characters as digits\""] pub fn aws_isxdigit (ch : u8) -> bool ; } unsafe extern "C" { # [doc = " Like isspace(), but ignores C locale.\n Return true if ch has the value of ASCII/UTF-8: space (0x20), form feed (0x0C),\n line feed (0x0A), carriage return (0x0D), horizontal tab (0x09), or vertical tab (0x0B)."] pub fn aws_isspace (ch : u8) -> bool ; } unsafe extern "C" { # [doc = " Read entire cursor as ASCII/UTF-8 unsigned base-10 number.\n Stricter than strtoull(), which allows whitespace and inputs that start with \"0x\"\n\n Examples:\n \"0\" -> 0\n \"123\" -> 123\n \"00004\" -> 4 // leading zeros ok\n\n Rejects things like:\n \"-1\" // negative numbers not allowed\n \"1,000\" // only characters 0-9 allowed\n \"\" // blank string not allowed\n \" 0 \" // whitespace not allowed\n \"0x0\" // hex not allowed\n \"FF\" // hex not allowed\n \"999999999999999999999999999999999999999999\" // larger than max u64"] pub fn aws_byte_cursor_utf8_parse_u64 (cursor : aws_byte_cursor , dst : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Read entire cursor as ASCII/UTF-8 unsigned base-16 number with NO \"0x\" prefix.\n\n Examples:\n \"F\" -> 15\n \"000000ff\" -> 255 // leading zeros ok\n \"Ff\" -> 255 // mixed case ok\n \"123\" -> 291\n \"FFFFFFFFFFFFFFFF\" -> 18446744073709551616 // max u64\n\n Rejects things like:\n \"0x0\" // 0x prefix not allowed\n \"\" // blank string not allowed\n \" F \" // whitespace not allowed\n \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\" // larger than max u64"] pub fn aws_byte_cursor_utf8_parse_u64_hex (cursor : aws_byte_cursor , dst : * mut u64) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_linked_list_node { pub next : * mut aws_linked_list_node , pub prev : * mut aws_linked_list_node , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_linked_list_node"] [:: std :: mem :: size_of :: < aws_linked_list_node > () - 16usize] ; ["Alignment of aws_linked_list_node"] [:: std :: mem :: align_of :: < aws_linked_list_node > () - 8usize] ; ["Offset of field: aws_linked_list_node::next"] [:: std :: mem :: offset_of ! (aws_linked_list_node , next) - 0usize] ; ["Offset of field: aws_linked_list_node::prev"] [:: std :: mem :: offset_of ! (aws_linked_list_node , prev) - 8usize] ; } ; 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)] pub struct aws_linked_list { pub head : aws_linked_list_node , pub tail : aws_linked_list_node , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_linked_list"] [:: std :: mem :: size_of :: < aws_linked_list > () - 32usize] ; ["Alignment of aws_linked_list"] [:: std :: mem :: align_of :: < aws_linked_list > () - 8usize] ; ["Offset of field: aws_linked_list::head"] [:: std :: mem :: offset_of ! (aws_linked_list , head) - 0usize] ; ["Offset of field: aws_linked_list::tail"] [:: std :: mem :: offset_of ! (aws_linked_list , tail) - 16usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Set node's next and prev pointers to NULL."] pub fn aws_linked_list_node_reset (node : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Tests if the list is empty."] pub fn aws_linked_list_empty (list : * const aws_linked_list) -> bool ; } unsafe extern "C" { # [doc = " Checks that a linked list is valid."] pub fn aws_linked_list_is_valid (list : * const aws_linked_list) -> bool ; } unsafe extern "C" { # [doc = " Checks that the prev of the next pointer of a node points to the\n node. As this checks whether the [next] connection of a node is\n bidirectional, it returns false if used for the list tail."] pub fn aws_linked_list_node_next_is_valid (node : * const aws_linked_list_node) -> bool ; } unsafe extern "C" { # [doc = " Checks that the next of the prev pointer of a node points to the\n node. Similarly to the above, this returns false if used for the\n head of a list."] pub fn aws_linked_list_node_prev_is_valid (node : * const aws_linked_list_node) -> bool ; } unsafe extern "C" { # [doc = " Checks that a linked list satisfies double linked list connectivity\n constraints. This check is O(n) as it traverses the whole linked\n list to ensure that tail is reachable from head (and vice versa)\n and that every connection is bidirectional.\n\n Note: This check *cannot* go into an infinite loop, because we\n ensure that the connection to the next node is\n bidirectional. Therefore, if a node's [a] a.next is a previous node\n [b] in the list, b.prev != &a and so this check would fail, thus\n terminating the loop."] pub fn aws_linked_list_is_valid_deep (list : * const aws_linked_list) -> bool ; } unsafe extern "C" { # [doc = " Initializes the list. List will be empty after this call."] pub fn aws_linked_list_init (list : * mut aws_linked_list) ; } unsafe extern "C" { # [doc = " Returns an iteration pointer for the first element in the list."] pub fn aws_linked_list_begin (list : * const aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns an iteration pointer for one past the last element in the list."] pub fn aws_linked_list_end (list : * const aws_linked_list) -> * const aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns a pointer for the last element in the list.\n Used to begin iterating the list in reverse. Ex:\n   for (i = aws_linked_list_rbegin(list); i != aws_linked_list_rend(list); i = aws_linked_list_prev(i)) {...}"] pub fn aws_linked_list_rbegin (list : * const aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the pointer to one before the first element in the list.\n Used to end iterating the list in reverse."] pub fn aws_linked_list_rend (list : * const aws_linked_list) -> * const aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the next element in the list."] pub fn aws_linked_list_next (node : * const aws_linked_list_node) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the previous element in the list."] pub fn aws_linked_list_prev (node : * const aws_linked_list_node) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Inserts to_add immediately after after."] pub fn aws_linked_list_insert_after (after : * mut aws_linked_list_node , to_add : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Swaps the order two nodes in the linked list."] pub fn aws_linked_list_swap_nodes (a : * mut aws_linked_list_node , b : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Inserts to_add immediately before before."] pub fn aws_linked_list_insert_before (before : * mut aws_linked_list_node , to_add : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Removes the specified node from the list (prev/next point to each other) and\n returns the next node in the list."] pub fn aws_linked_list_remove (node : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Append new_node."] pub fn aws_linked_list_push_back (list : * mut aws_linked_list , node : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Returns the element in the back of the list."] pub fn aws_linked_list_back (list : * const aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the element in the back of the list and removes it"] pub fn aws_linked_list_pop_back (list : * mut aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Prepend new_node."] pub fn aws_linked_list_push_front (list : * mut aws_linked_list , node : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Returns the element in the front of the list."] pub fn aws_linked_list_front (list : * const aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the element in the front of the list and removes it"] pub fn aws_linked_list_pop_front (list : * mut aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { pub fn aws_linked_list_swap_contents (a : * mut aws_linked_list , b : * mut aws_linked_list) ; } unsafe extern "C" { # [doc = " Remove all nodes from one list, and add them to the back of another.\n\n Example: if dst={1,2} and src={3,4}, they become dst={1,2,3,4} and src={}"] pub fn aws_linked_list_move_all_back (dst : * mut aws_linked_list , src : * mut aws_linked_list) ; } unsafe extern "C" { # [doc = " Remove all nodes from one list, and add them to the front of another.\n\n Example: if dst={2,1} and src={4,3}, they become dst={4,3,2,1} and src={}"] pub fn aws_linked_list_move_all_front (dst : * mut aws_linked_list , src : * mut aws_linked_list) ; } unsafe extern "C" { # [doc = " Returns true if the node is currently in a list, false otherwise."] pub fn aws_linked_list_node_is_in_list (node : * mut aws_linked_list_node) -> bool ; } pub type aws_io_set_queue_on_handle_fn = :: std :: option :: Option < unsafe extern "C" fn (handle : * mut aws_io_handle , queue : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_io_handle { pub data : aws_io_handle__bindgen_ty_1 , pub additional_data : * mut :: libc :: c_void , pub set_queue : aws_io_set_queue_on_handle_fn , } # [repr (C)] # [derive (Copy , Clone)] pub union aws_io_handle__bindgen_ty_1 { pub fd : :: libc :: c_int , pub handle : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_io_handle__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_io_handle__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_io_handle__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_io_handle__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_io_handle__bindgen_ty_1::fd"] [:: std :: mem :: offset_of ! (aws_io_handle__bindgen_ty_1 , fd) - 0usize] ; ["Offset of field: aws_io_handle__bindgen_ty_1::handle"] [:: std :: mem :: offset_of ! (aws_io_handle__bindgen_ty_1 , handle) - 0usize] ; } ; impl Default for aws_io_handle__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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_io_handle"] [:: std :: mem :: size_of :: < aws_io_handle > () - 24usize] ; ["Alignment of aws_io_handle"] [:: std :: mem :: align_of :: < aws_io_handle > () - 8usize] ; ["Offset of field: aws_io_handle::data"] [:: std :: mem :: offset_of ! (aws_io_handle , data) - 0usize] ; ["Offset of field: aws_io_handle::additional_data"] [:: std :: mem :: offset_of ! (aws_io_handle , additional_data) - 8usize] ; ["Offset of field: aws_io_handle::set_queue"] [:: std :: mem :: offset_of ! (aws_io_handle , set_queue) - 16usize] ; } ; impl Default for aws_io_handle { 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 (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_io_message_type { AWS_IO_MESSAGE_APPLICATION_DATA = 0 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_channel { _unused : [u8 ; 0] , } pub type aws_channel_on_message_write_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (channel : * mut aws_channel , message : * mut aws_io_message , err_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_io_message { # [doc = " Allocator used for the message and message data. If this is null, the message belongs to a pool or some other\n message manager."] pub allocator : * mut aws_allocator , # [doc = " Buffer containing the data for message"] pub message_data : aws_byte_buf , # [doc = " type of the message. This is used for framework control messages. Currently the only type is\n AWS_IO_MESSAGE_APPLICATION_DATA"] pub message_type : aws_io_message_type , # [doc = " Conveys information about the contents of message_data (e.g. cast the ptr to some type). If 0, it's just opaque\n data."] pub message_tag : :: libc :: c_int , # [doc = " In order to avoid excess allocations/copies, on a partial read or write, the copy mark is set to indicate how\n much of this message has already been processed or copied."] pub copy_mark : usize , # [doc = " The channel that the message is bound to."] pub owning_channel : * mut aws_channel , # [doc = " Invoked by the channel once the entire message has been written to the data sink."] pub on_completion : aws_channel_on_message_write_completed_fn , # [doc = " arbitrary user data for the on_completion callback"] pub user_data : * mut :: libc :: c_void , # [doc = " it's incredibly likely something is going to need to queue this,\n go ahead and make sure the list info is part of the original allocation."] pub queueing_handle : aws_linked_list_node , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_io_message"] [:: std :: mem :: size_of :: < aws_io_message > () - 96usize] ; ["Alignment of aws_io_message"] [:: std :: mem :: align_of :: < aws_io_message > () - 8usize] ; ["Offset of field: aws_io_message::allocator"] [:: std :: mem :: offset_of ! (aws_io_message , allocator) - 0usize] ; ["Offset of field: aws_io_message::message_data"] [:: std :: mem :: offset_of ! (aws_io_message , message_data) - 8usize] ; ["Offset of field: aws_io_message::message_type"] [:: std :: mem :: offset_of ! (aws_io_message , message_type) - 40usize] ; ["Offset of field: aws_io_message::message_tag"] [:: std :: mem :: offset_of ! (aws_io_message , message_tag) - 44usize] ; ["Offset of field: aws_io_message::copy_mark"] [:: std :: mem :: offset_of ! (aws_io_message , copy_mark) - 48usize] ; ["Offset of field: aws_io_message::owning_channel"] [:: std :: mem :: offset_of ! (aws_io_message , owning_channel) - 56usize] ; ["Offset of field: aws_io_message::on_completion"] [:: std :: mem :: offset_of ! (aws_io_message , on_completion) - 64usize] ; ["Offset of field: aws_io_message::user_data"] [:: std :: mem :: offset_of ! (aws_io_message , user_data) - 72usize] ; ["Offset of field: aws_io_message::queueing_handle"] [:: std :: mem :: offset_of ! (aws_io_message , queueing_handle) - 80usize] ; } ; impl Default for aws_io_message { 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_io_clock_fn = :: std :: option :: Option < unsafe extern "C" fn (timestamp : * mut u64) -> :: libc :: c_int > ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_io_errors { AWS_IO_CHANNEL_ERROR_ERROR_CANT_ACCEPT_INPUT = 1024 , AWS_IO_CHANNEL_UNKNOWN_MESSAGE_TYPE = 1025 , AWS_IO_CHANNEL_READ_WOULD_EXCEED_WINDOW = 1026 , AWS_IO_EVENT_LOOP_ALREADY_ASSIGNED = 1027 , AWS_IO_EVENT_LOOP_SHUTDOWN = 1028 , AWS_IO_TLS_ERROR_NEGOTIATION_FAILURE = 1029 , AWS_IO_TLS_ERROR_NOT_NEGOTIATED = 1030 , AWS_IO_TLS_ERROR_WRITE_FAILURE = 1031 , AWS_IO_TLS_ERROR_ALERT_RECEIVED = 1032 , AWS_IO_TLS_CTX_ERROR = 1033 , AWS_IO_TLS_VERSION_UNSUPPORTED = 1034 , AWS_IO_TLS_CIPHER_PREF_UNSUPPORTED = 1035 , AWS_IO_MISSING_ALPN_MESSAGE = 1036 , AWS_IO_UNHANDLED_ALPN_PROTOCOL_MESSAGE = 1037 , AWS_IO_FILE_VALIDATION_FAILURE = 1038 , AWS_ERROR_IO_EVENT_LOOP_THREAD_ONLY = 1039 , AWS_ERROR_IO_ALREADY_SUBSCRIBED = 1040 , AWS_ERROR_IO_NOT_SUBSCRIBED = 1041 , AWS_ERROR_IO_OPERATION_CANCELLED = 1042 , AWS_IO_READ_WOULD_BLOCK = 1043 , AWS_IO_BROKEN_PIPE = 1044 , AWS_IO_SOCKET_UNSUPPORTED_ADDRESS_FAMILY = 1045 , AWS_IO_SOCKET_INVALID_OPERATION_FOR_TYPE = 1046 , AWS_IO_SOCKET_CONNECTION_REFUSED = 1047 , AWS_IO_SOCKET_TIMEOUT = 1048 , AWS_IO_SOCKET_NO_ROUTE_TO_HOST = 1049 , AWS_IO_SOCKET_NETWORK_DOWN = 1050 , AWS_IO_SOCKET_CLOSED = 1051 , AWS_IO_SOCKET_NOT_CONNECTED = 1052 , AWS_IO_SOCKET_INVALID_OPTIONS = 1053 , AWS_IO_SOCKET_ADDRESS_IN_USE = 1054 , AWS_IO_SOCKET_INVALID_ADDRESS = 1055 , AWS_IO_SOCKET_ILLEGAL_OPERATION_FOR_STATE = 1056 , AWS_IO_SOCKET_CONNECT_ABORTED = 1057 , AWS_IO_DNS_QUERY_FAILED = 1058 , AWS_IO_DNS_INVALID_NAME = 1059 , AWS_IO_DNS_NO_ADDRESS_FOR_HOST = 1060 , AWS_IO_DNS_HOST_REMOVED_FROM_CACHE = 1061 , AWS_IO_STREAM_INVALID_SEEK_POSITION = 1062 , AWS_IO_STREAM_READ_FAILED = 1063 , DEPRECATED_AWS_IO_INVALID_FILE_HANDLE = 1064 , AWS_IO_SHARED_LIBRARY_LOAD_FAILURE = 1065 , AWS_IO_SHARED_LIBRARY_FIND_SYMBOL_FAILURE = 1066 , AWS_IO_TLS_NEGOTIATION_TIMEOUT = 1067 , AWS_IO_TLS_ALERT_NOT_GRACEFUL = 1068 , AWS_IO_MAX_RETRIES_EXCEEDED = 1069 , AWS_IO_RETRY_PERMISSION_DENIED = 1070 , AWS_IO_TLS_DIGEST_ALGORITHM_UNSUPPORTED = 1071 , AWS_IO_TLS_SIGNATURE_ALGORITHM_UNSUPPORTED = 1072 , AWS_ERROR_PKCS11_VERSION_UNSUPPORTED = 1073 , AWS_ERROR_PKCS11_TOKEN_NOT_FOUND = 1074 , AWS_ERROR_PKCS11_KEY_NOT_FOUND = 1075 , AWS_ERROR_PKCS11_KEY_TYPE_UNSUPPORTED = 1076 , AWS_ERROR_PKCS11_UNKNOWN_CRYPTOKI_RETURN_VALUE = 1077 , AWS_ERROR_PKCS11_CKR_CANCEL = 1078 , AWS_ERROR_PKCS11_CKR_HOST_MEMORY = 1079 , AWS_ERROR_PKCS11_CKR_SLOT_ID_INVALID = 1080 , AWS_ERROR_PKCS11_CKR_GENERAL_ERROR = 1081 , AWS_ERROR_PKCS11_CKR_FUNCTION_FAILED = 1082 , AWS_ERROR_PKCS11_CKR_ARGUMENTS_BAD = 1083 , AWS_ERROR_PKCS11_CKR_NO_EVENT = 1084 , AWS_ERROR_PKCS11_CKR_NEED_TO_CREATE_THREADS = 1085 , AWS_ERROR_PKCS11_CKR_CANT_LOCK = 1086 , AWS_ERROR_PKCS11_CKR_ATTRIBUTE_READ_ONLY = 1087 , AWS_ERROR_PKCS11_CKR_ATTRIBUTE_SENSITIVE = 1088 , AWS_ERROR_PKCS11_CKR_ATTRIBUTE_TYPE_INVALID = 1089 , AWS_ERROR_PKCS11_CKR_ATTRIBUTE_VALUE_INVALID = 1090 , AWS_ERROR_PKCS11_CKR_ACTION_PROHIBITED = 1091 , AWS_ERROR_PKCS11_CKR_DATA_INVALID = 1092 , AWS_ERROR_PKCS11_CKR_DATA_LEN_RANGE = 1093 , AWS_ERROR_PKCS11_CKR_DEVICE_ERROR = 1094 , AWS_ERROR_PKCS11_CKR_DEVICE_MEMORY = 1095 , AWS_ERROR_PKCS11_CKR_DEVICE_REMOVED = 1096 , AWS_ERROR_PKCS11_CKR_ENCRYPTED_DATA_INVALID = 1097 , AWS_ERROR_PKCS11_CKR_ENCRYPTED_DATA_LEN_RANGE = 1098 , AWS_ERROR_PKCS11_CKR_FUNCTION_CANCELED = 1099 , AWS_ERROR_PKCS11_CKR_FUNCTION_NOT_PARALLEL = 1100 , AWS_ERROR_PKCS11_CKR_FUNCTION_NOT_SUPPORTED = 1101 , AWS_ERROR_PKCS11_CKR_KEY_HANDLE_INVALID = 1102 , AWS_ERROR_PKCS11_CKR_KEY_SIZE_RANGE = 1103 , AWS_ERROR_PKCS11_CKR_KEY_TYPE_INCONSISTENT = 1104 , AWS_ERROR_PKCS11_CKR_KEY_NOT_NEEDED = 1105 , AWS_ERROR_PKCS11_CKR_KEY_CHANGED = 1106 , AWS_ERROR_PKCS11_CKR_KEY_NEEDED = 1107 , AWS_ERROR_PKCS11_CKR_KEY_INDIGESTIBLE = 1108 , AWS_ERROR_PKCS11_CKR_KEY_FUNCTION_NOT_PERMITTED = 1109 , AWS_ERROR_PKCS11_CKR_KEY_NOT_WRAPPABLE = 1110 , AWS_ERROR_PKCS11_CKR_KEY_UNEXTRACTABLE = 1111 , AWS_ERROR_PKCS11_CKR_MECHANISM_INVALID = 1112 , AWS_ERROR_PKCS11_CKR_MECHANISM_PARAM_INVALID = 1113 , AWS_ERROR_PKCS11_CKR_OBJECT_HANDLE_INVALID = 1114 , AWS_ERROR_PKCS11_CKR_OPERATION_ACTIVE = 1115 , AWS_ERROR_PKCS11_CKR_OPERATION_NOT_INITIALIZED = 1116 , AWS_ERROR_PKCS11_CKR_PIN_INCORRECT = 1117 , AWS_ERROR_PKCS11_CKR_PIN_INVALID = 1118 , AWS_ERROR_PKCS11_CKR_PIN_LEN_RANGE = 1119 , AWS_ERROR_PKCS11_CKR_PIN_EXPIRED = 1120 , AWS_ERROR_PKCS11_CKR_PIN_LOCKED = 1121 , AWS_ERROR_PKCS11_CKR_SESSION_CLOSED = 1122 , AWS_ERROR_PKCS11_CKR_SESSION_COUNT = 1123 , AWS_ERROR_PKCS11_CKR_SESSION_HANDLE_INVALID = 1124 , AWS_ERROR_PKCS11_CKR_SESSION_PARALLEL_NOT_SUPPORTED = 1125 , AWS_ERROR_PKCS11_CKR_SESSION_READ_ONLY = 1126 , AWS_ERROR_PKCS11_CKR_SESSION_EXISTS = 1127 , AWS_ERROR_PKCS11_CKR_SESSION_READ_ONLY_EXISTS = 1128 , AWS_ERROR_PKCS11_CKR_SESSION_READ_WRITE_SO_EXISTS = 1129 , AWS_ERROR_PKCS11_CKR_SIGNATURE_INVALID = 1130 , AWS_ERROR_PKCS11_CKR_SIGNATURE_LEN_RANGE = 1131 , AWS_ERROR_PKCS11_CKR_TEMPLATE_INCOMPLETE = 1132 , AWS_ERROR_PKCS11_CKR_TEMPLATE_INCONSISTENT = 1133 , AWS_ERROR_PKCS11_CKR_TOKEN_NOT_PRESENT = 1134 , AWS_ERROR_PKCS11_CKR_TOKEN_NOT_RECOGNIZED = 1135 , AWS_ERROR_PKCS11_CKR_TOKEN_WRITE_PROTECTED = 1136 , AWS_ERROR_PKCS11_CKR_UNWRAPPING_KEY_HANDLE_INVALID = 1137 , AWS_ERROR_PKCS11_CKR_UNWRAPPING_KEY_SIZE_RANGE = 1138 , AWS_ERROR_PKCS11_CKR_UNWRAPPING_KEY_TYPE_INCONSISTENT = 1139 , AWS_ERROR_PKCS11_CKR_USER_ALREADY_LOGGED_IN = 1140 , AWS_ERROR_PKCS11_CKR_USER_NOT_LOGGED_IN = 1141 , AWS_ERROR_PKCS11_CKR_USER_PIN_NOT_INITIALIZED = 1142 , AWS_ERROR_PKCS11_CKR_USER_TYPE_INVALID = 1143 , AWS_ERROR_PKCS11_CKR_USER_ANOTHER_ALREADY_LOGGED_IN = 1144 , AWS_ERROR_PKCS11_CKR_USER_TOO_MANY_TYPES = 1145 , AWS_ERROR_PKCS11_CKR_WRAPPED_KEY_INVALID = 1146 , AWS_ERROR_PKCS11_CKR_WRAPPED_KEY_LEN_RANGE = 1147 , AWS_ERROR_PKCS11_CKR_WRAPPING_KEY_HANDLE_INVALID = 1148 , AWS_ERROR_PKCS11_CKR_WRAPPING_KEY_SIZE_RANGE = 1149 , AWS_ERROR_PKCS11_CKR_WRAPPING_KEY_TYPE_INCONSISTENT = 1150 , AWS_ERROR_PKCS11_CKR_RANDOM_SEED_NOT_SUPPORTED = 1151 , AWS_ERROR_PKCS11_CKR_RANDOM_NO_RNG = 1152 , AWS_ERROR_PKCS11_CKR_DOMAIN_PARAMS_INVALID = 1153 , AWS_ERROR_PKCS11_CKR_CURVE_NOT_SUPPORTED = 1154 , AWS_ERROR_PKCS11_CKR_BUFFER_TOO_SMALL = 1155 , AWS_ERROR_PKCS11_CKR_SAVED_STATE_INVALID = 1156 , AWS_ERROR_PKCS11_CKR_INFORMATION_SENSITIVE = 1157 , AWS_ERROR_PKCS11_CKR_STATE_UNSAVEABLE = 1158 , AWS_ERROR_PKCS11_CKR_CRYPTOKI_NOT_INITIALIZED = 1159 , AWS_ERROR_PKCS11_CKR_CRYPTOKI_ALREADY_INITIALIZED = 1160 , AWS_ERROR_PKCS11_CKR_MUTEX_BAD = 1161 , AWS_ERROR_PKCS11_CKR_MUTEX_NOT_LOCKED = 1162 , AWS_ERROR_PKCS11_CKR_NEW_PIN_MODE = 1163 , AWS_ERROR_PKCS11_CKR_NEXT_OTP = 1164 , AWS_ERROR_PKCS11_CKR_EXCEEDED_MAX_ITERATIONS = 1165 , AWS_ERROR_PKCS11_CKR_FIPS_SELF_TEST_FAILED = 1166 , AWS_ERROR_PKCS11_CKR_LIBRARY_LOAD_FAILED = 1167 , AWS_ERROR_PKCS11_CKR_PIN_TOO_WEAK = 1168 , AWS_ERROR_PKCS11_CKR_PUBLIC_KEY_INVALID = 1169 , AWS_ERROR_PKCS11_CKR_FUNCTION_REJECTED = 1170 , AWS_ERROR_IO_PINNED_EVENT_LOOP_MISMATCH = 1171 , AWS_ERROR_PKCS11_ENCODING_ERROR = 1172 , AWS_IO_TLS_ERROR_DEFAULT_TRUST_STORE_NOT_FOUND = 1173 , AWS_IO_STREAM_SEEK_FAILED = 1174 , AWS_IO_STREAM_GET_LENGTH_FAILED = 1175 , AWS_IO_STREAM_SEEK_UNSUPPORTED = 1176 , AWS_IO_STREAM_GET_LENGTH_UNSUPPORTED = 1177 , AWS_IO_TLS_ERROR_READ_FAILURE = 1178 , AWS_ERROR_PEM_MALFORMED = 1179 , AWS_IO_SOCKET_MISSING_EVENT_LOOP = 1180 , AWS_IO_TLS_UNKNOWN_ROOT_CERTIFICATE = 1181 , AWS_IO_TLS_NO_ROOT_CERTIFICATE_FOUND = 1182 , AWS_IO_TLS_CERTIFICATE_EXPIRED = 1183 , AWS_IO_TLS_CERTIFICATE_NOT_YET_VALID = 1184 , AWS_IO_TLS_BAD_CERTIFICATE = 1185 , AWS_IO_TLS_PEER_CERTIFICATE_EXPIRED = 1186 , AWS_IO_TLS_BAD_PEER_CERTIFICATE = 1187 , AWS_IO_TLS_PEER_CERTIFICATE_REVOKED = 1188 , AWS_IO_TLS_PEER_CERTIFICATE_UNKNOWN = 1189 , AWS_IO_TLS_INTERNAL_ERROR = 1190 , AWS_IO_TLS_CLOSED_GRACEFUL = 1191 , AWS_IO_TLS_CLOSED_ABORT = 1192 , AWS_IO_TLS_INVALID_CERTIFICATE_CHAIN = 1193 , AWS_IO_TLS_HOST_NAME_MISMATCH = 1194 , AWS_IO_DNS_QUERY_AGAIN = 1195 , AWS_IO_ERROR_END_RANGE = 2047 , AWS_IO_INVALID_FILE_HANDLE = 50 , } unsafe extern "C" { # [doc = " Initializes internal datastructures used by aws-c-io.\n Must be called before using any functionality in aws-c-io."] pub fn aws_io_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Shuts down the internal datastructures used by aws-c-io."] pub fn aws_io_library_clean_up () ; } unsafe extern "C" { pub fn aws_io_fatal_assert_library_initialized () ; } unsafe extern "C" { pub fn aws_io_error_code_is_retryable (error_code : :: libc :: c_int) -> bool ; } # [doc = " struct aws_atomic_var represents an atomic variable - a value which can hold an integer or pointer\n that can be manipulated atomically. struct aws_atomic_vars should normally only be manipulated\n with atomics methods defined in this header."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_atomic_var { pub value : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_atomic_var"] [:: std :: mem :: size_of :: < aws_atomic_var > () - 8usize] ; ["Alignment of aws_atomic_var"] [:: std :: mem :: align_of :: < aws_atomic_var > () - 8usize] ; ["Offset of field: aws_atomic_var::value"] [:: std :: mem :: offset_of ! (aws_atomic_var , value) - 0usize] ; } ; 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 () } } } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_memory_order { # [doc = " No particular ordering constraints are guaranteed relative to other\n operations at all; we merely ensure that the operation itself is atomic."] aws_memory_order_relaxed = 0 , # [doc = " Specifies acquire ordering. No reads or writes on the current thread can be\n reordered to happen before this operation. This is typically paired with a release\n ordering; any writes that happened on the releasing operation will be visible\n after the paired acquire operation.\n\n Acquire ordering is only meaningful on load or load-store operations."] aws_memory_order_acquire = 2 , # [doc = " Specifies release order. No reads or writes can be reordered to come after this\n operation. Typically paired with an acquire operation.\n\n Release ordering is only meaningful on store or load-store operations."] aws_memory_order_release = 3 , # [doc = " Specifies acquire-release order; if this operation acts as a load, it acts as an\n acquire operation; if it acts as a store, it acts as a release operation; if it's\n a load-store, it does both."] aws_memory_order_acq_rel = 4 , # [doc = " Specifies acquire-release order; if this operation acts as a load, it acts as an\n acquire operation; if it acts as a store, it acts as a release operation; if it's\n a load-store, it does both."] aws_memory_order_seq_cst = 5 , } unsafe extern "C" { # [doc = " Initializes an atomic variable with an integer value. This operation should be done before any\n other operations on this atomic variable, and must be done before attempting any parallel operations.\n\n This operation does not imply a barrier. Ensure that you use an acquire-release barrier (or stronger)\n when communicating the fact that initialization is complete to the other thread. Launching the thread\n implies a sufficiently strong barrier."] pub fn aws_atomic_init_int (var : * mut aws_atomic_var , n : usize) ; } unsafe extern "C" { # [doc = " Initializes an atomic variable with a pointer value. This operation should be done before any\n other operations on this atomic variable, and must be done before attempting any parallel operations.\n\n This operation does not imply a barrier. Ensure that you use an acquire-release barrier (or stronger)\n when communicating the fact that initialization is complete to the other thread. Launching the thread\n implies a sufficiently strong barrier."] pub fn aws_atomic_init_ptr (var : * mut aws_atomic_var , p : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Reads an atomic var as an integer, using the specified ordering, and returns the result."] pub fn aws_atomic_load_int_explicit (var : * const aws_atomic_var , memory_order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Reads an atomic var as an integer, using sequentially consistent ordering, and returns the result."] pub fn aws_atomic_load_int (var : * const aws_atomic_var) -> usize ; } unsafe extern "C" { # [doc = " Reads an atomic var as a pointer, using the specified ordering, and returns the result."] pub fn aws_atomic_load_ptr_explicit (var : * const aws_atomic_var , memory_order : aws_memory_order) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Reads an atomic var as a pointer, using sequentially consistent ordering, and returns the result."] pub fn aws_atomic_load_ptr (var : * const aws_atomic_var) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Stores an integer into an atomic var, using the specified ordering."] pub fn aws_atomic_store_int_explicit (var : * mut aws_atomic_var , n : usize , memory_order : aws_memory_order) ; } unsafe extern "C" { # [doc = " Stores an integer into an atomic var, using sequentially consistent ordering."] pub fn aws_atomic_store_int (var : * mut aws_atomic_var , n : usize) ; } unsafe extern "C" { # [doc = " Stores a pointer into an atomic var, using the specified ordering."] pub fn aws_atomic_store_ptr_explicit (var : * mut aws_atomic_var , p : * mut :: libc :: c_void , memory_order : aws_memory_order) ; } unsafe extern "C" { # [doc = " Stores a pointer into an atomic var, using sequentially consistent ordering."] pub fn aws_atomic_store_ptr (var : * mut aws_atomic_var , p : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Exchanges an integer with the value in an atomic_var, using the specified ordering.\n Returns the value that was previously in the atomic_var."] pub fn aws_atomic_exchange_int_explicit (var : * mut aws_atomic_var , n : usize , memory_order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Exchanges an integer with the value in an atomic_var, using sequentially consistent ordering.\n Returns the value that was previously in the atomic_var."] pub fn aws_atomic_exchange_int (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Exchanges a pointer with the value in an atomic_var, using the specified ordering.\n Returns the value that was previously in the atomic_var."] pub fn aws_atomic_exchange_ptr_explicit (var : * mut aws_atomic_var , p : * mut :: libc :: c_void , memory_order : aws_memory_order) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Exchanges an integer with the value in an atomic_var, using sequentially consistent ordering.\n Returns the value that was previously in the atomic_var."] pub fn aws_atomic_exchange_ptr (var : * mut aws_atomic_var , p : * mut :: libc :: c_void) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set\n to the value in *var. On success, the memory ordering used was order_success; otherwise, it was order_failure.\n order_failure must be no stronger than order_success, and must not be release or acq_rel.\n Returns true if the compare was successful and the variable updated to desired."] pub fn aws_atomic_compare_exchange_int_explicit (var : * mut aws_atomic_var , expected : * mut usize , desired : usize , order_success : aws_memory_order , order_failure : aws_memory_order) -> bool ; } unsafe extern "C" { # [doc = " Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set\n to the value in *var. Uses sequentially consistent memory ordering, regardless of success or failure.\n Returns true if the compare was successful and the variable updated to desired."] pub fn aws_atomic_compare_exchange_int (var : * mut aws_atomic_var , expected : * mut usize , desired : usize) -> bool ; } unsafe extern "C" { # [doc = " Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set\n to the value in *var. On success, the memory ordering used was order_success; otherwise, it was order_failure.\n order_failure must be no stronger than order_success, and must not be release or acq_rel.\n Returns true if the compare was successful and the variable updated to desired."] pub fn aws_atomic_compare_exchange_ptr_explicit (var : * mut aws_atomic_var , expected : * mut * mut :: libc :: c_void , desired : * mut :: libc :: c_void , order_success : aws_memory_order , order_failure : aws_memory_order) -> bool ; } unsafe extern "C" { # [doc = " Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set\n to the value in *var. Uses sequentially consistent memory ordering, regardless of success or failure.\n Returns true if the compare was successful and the variable updated to desired."] pub fn aws_atomic_compare_exchange_ptr (var : * mut aws_atomic_var , expected : * mut * mut :: libc :: c_void , desired : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " Atomically adds n to *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_add_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically subtracts n from *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_sub_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically ORs n with *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_or_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically ANDs n with *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_and_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically XORs n with *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_xor_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically adds n to *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_add (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Atomically subtracts n from *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_sub (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Atomically ands n into *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_and (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Atomically ors n into *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_or (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Atomically xors n into *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_xor (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Provides the same reordering guarantees as an atomic operation with the specified memory order, without\n needing to actually perform an atomic operation."] pub fn aws_atomic_thread_fence (order : aws_memory_order) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_string { pub allocator : * mut aws_allocator , pub len : usize , pub bytes : [u8 ; 1usize] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_string"] [:: std :: mem :: size_of :: < aws_string > () - 24usize] ; ["Alignment of aws_string"] [:: std :: mem :: align_of :: < aws_string > () - 8usize] ; ["Offset of field: aws_string::allocator"] [:: std :: mem :: offset_of ! (aws_string , allocator) - 0usize] ; ["Offset of field: aws_string::len"] [:: std :: mem :: offset_of ! (aws_string , len) - 8usize] ; ["Offset of field: aws_string::bytes"] [:: std :: mem :: offset_of ! (aws_string , bytes) - 16usize] ; } ; 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 () } } } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn aws_string_eq_c_str (str_ : * const aws_string , c_str : * const :: libc :: c_char) -> bool ; } unsafe 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 :: libc :: c_char) -> bool ; } unsafe 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 :: libc :: c_char) -> * mut aws_string ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Deallocate string."] pub fn aws_string_destroy (str_ : * mut aws_string) ; } unsafe extern "C" { # [doc = " Zeroes out the data bytes of string and then deallocates the memory.\n Not safe to run on a string created with AWS_STATIC_STRING_FROM_LITERAL."] pub fn aws_string_destroy_secure (str_ : * mut aws_string) ; } unsafe extern "C" { # [doc = " Compares lexicographical ordering of two strings. This is a binary\n byte-by-byte comparison, treating bytes as unsigned integers. It is suitable\n for either textual or binary data and is unaware of unicode or any other byte\n encoding. If both strings are identical in the bytes of the shorter string,\n then the longer string is lexicographically after the shorter.\n\n Returns a positive number if string a > string b. (i.e., string a is\n lexicographically after string b.) Returns zero if string a = string b.\n Returns negative number if string a < string b."] pub fn aws_string_compare (a : * const aws_string , b : * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " A convenience function for sorting lists of (const struct aws_string *) elements. This can be used as a\n 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 :: libc :: c_void , b : * const :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies all bytes from string to buf.\n\n On success, returns true and updates the buf pointer/length\n accordingly. If there is insufficient space in the buf, returns\n false, leaving the buf unchanged."] pub fn aws_byte_buf_write_from_whole_string (buf : * mut aws_byte_buf , src : * const aws_string) -> bool ; } unsafe extern "C" { # [doc = " Creates an aws_byte_cursor from an existing string.\n If the src is NULL, it returns an empty cursor"] pub fn aws_byte_cursor_from_string (src : * const aws_string) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " If the string was dynamically allocated, clones it. If the string was statically allocated (i.e. has no allocator),\n returns the original string."] pub fn aws_string_clone_or_reuse (allocator : * mut aws_allocator , str_ : * const aws_string) -> * mut aws_string ; } unsafe 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\n is found within max_read_len of str, AWS_ERROR_C_STRING_BUFFER_NOT_NULL_TERMINATED is raised. Otherwise, str_len\n will contain the string length minus the NULL character, and AWS_OP_SUCCESS will be returned."] pub fn aws_secure_strlen (str_ : * const :: libc :: c_char , max_read_len : usize , str_len : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Equivalent to str->bytes."] pub fn aws_string_bytes (str_ : * const aws_string) -> * const u8 ; } unsafe extern "C" { # [doc = " Equivalent to `(const char *)str->bytes`."] pub fn aws_string_c_str (str_ : * const aws_string) -> * const :: libc :: c_char ; } unsafe extern "C" { # [doc = " Evaluates the set of properties that define the shape of all valid aws_string structures.\n It is also a cheap check, in the sense it run in constant time (i.e., no loops or recursion)."] pub fn aws_string_is_valid (str_ : * const aws_string) -> bool ; } unsafe extern "C" { # [doc = " Best-effort checks aws_string invariants, when the str->len is unknown"] pub fn aws_c_string_is_valid (str_ : * const :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " Evaluates if a char is a white character."] pub fn aws_char_is_space (c : u8) -> bool ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_thread_detach_state { AWS_THREAD_NOT_CREATED = 1 , AWS_THREAD_JOINABLE = 2 , AWS_THREAD_JOIN_COMPLETED = 3 , AWS_THREAD_MANAGED = 4 , } # [repr (u32)] # [non_exhaustive] # [doc = " Specifies the join strategy used on an aws_thread, which in turn controls whether or not a thread participates\n in the managed thread system.  The managed thread system provides logic to guarantee a join on all participating\n threads at the cost of laziness (the user cannot control when joins happen).\n\n Manual - thread does not participate in the managed thread system; any joins must be done by the user.  This\n is the default.  The user must call aws_thread_clean_up(), but only after any desired join operation has completed.\n Not doing so will cause the windows handle to leak.\n\n Managed - the managed thread system will automatically perform a join some time after the thread's run function\n has completed.  It is an error to call aws_thread_join on a thread configured with the managed join strategy.  The\n managed thread system will call aws_thread_clean_up() on the thread after the background join has completed.\n\n Additionally, an API exists, aws_thread_join_all_managed(), which blocks and returns when all outstanding threads\n with the managed strategy have fully joined.  This API is useful for tests (rather than waiting for many individual\n signals) and program shutdown or DLL unload.  This API is automatically invoked by the common library clean up\n function.  If the common library clean up is called from a managed thread, this will cause deadlock.\n\n Lazy thread joining is done only when threads finish their run function or when the user calls\n aws_thread_join_all_managed().  This means it may be a long time between thread function completion and the join\n being applied, but the queue of unjoined threads is always one or fewer so there is no critical resource\n backlog.\n\n Currently, only event loop group async cleanup and host resolver threads participate in the managed thread system.\n Additionally, event loop threads will increment and decrement the pending join count (they are manually joined\n internally) in order to have an accurate view of internal thread usage and also to prevent failure to release\n an event loop group fully from allowing aws_thread_join_all_managed() from running to completion when its\n intent is such that it should block instead."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_thread_join_strategy { AWS_TJS_MANUAL = 0 , AWS_TJS_MANAGED = 1 , } # [repr (C)] # [derive (Debug , Copy , Clone)] 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.\n The length should not exceed AWS_THREAD_NAME_RECOMMENDED_STRLEN(15)\n if you want it to display properly on all platforms."] pub name : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_thread_options"] [:: std :: mem :: size_of :: < aws_thread_options > () - 32usize] ; ["Alignment of aws_thread_options"] [:: std :: mem :: align_of :: < aws_thread_options > () - 8usize] ; ["Offset of field: aws_thread_options::stack_size"] [:: std :: mem :: offset_of ! (aws_thread_options , stack_size) - 0usize] ; ["Offset of field: aws_thread_options::cpu_id"] [:: std :: mem :: offset_of ! (aws_thread_options , cpu_id) - 8usize] ; ["Offset of field: aws_thread_options::join_strategy"] [:: std :: mem :: offset_of ! (aws_thread_options , join_strategy) - 12usize] ; ["Offset of field: aws_thread_options::name"] [:: std :: mem :: offset_of ! (aws_thread_options , name) - 16usize] ; } ; 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_thread"] [:: std :: mem :: size_of :: < aws_thread > () - 24usize] ; ["Alignment of aws_thread"] [:: std :: mem :: align_of :: < aws_thread > () - 8usize] ; ["Offset of field: aws_thread::allocator"] [:: std :: mem :: offset_of ! (aws_thread , allocator) - 0usize] ; ["Offset of field: aws_thread::detach_state"] [:: std :: mem :: offset_of ! (aws_thread , detach_state) - 8usize] ; ["Offset of field: aws_thread::thread_id"] [:: std :: mem :: offset_of ! (aws_thread , thread_id) - 16usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Returns an instance of system default thread options."] pub fn aws_default_thread_options () -> * const aws_thread_options ; } unsafe extern "C" { pub fn aws_thread_call_once (flag : * mut aws_thread_once , call_once : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: libc :: c_void) > , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Initializes a new platform specific thread object struct (not the os-level\n thread itself)."] pub fn aws_thread_init (thread : * mut aws_thread , allocator : * mut aws_allocator) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Creates an OS level thread and associates it with func. context will be passed to func when it is executed.\n options will be applied to the thread if they are applicable for the platform.\n\n After launch, you may join on the thread.  A successfully launched thread must have clean_up called on it in order\n to avoid a handle leak.  If you do not join before calling clean_up, the thread will become detached.\n\n 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 :: libc :: c_void) > , arg : * mut :: libc :: c_void , options : * const aws_thread_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the id of thread"] pub fn aws_thread_get_id (thread : * mut aws_thread) -> aws_thread_id_t ; } unsafe extern "C" { # [doc = " Gets the detach state of the thread. For example, is it safe to call join on\n this thread? Has it been detached()?"] pub fn aws_thread_get_detach_state (thread : * mut aws_thread) -> aws_thread_detach_state ; } unsafe extern "C" { # [doc = " Joins the calling thread to a thread instance. Returns when thread is\n finished.  Calling this from the associated OS thread will cause a deadlock."] pub fn aws_thread_join (thread : * mut aws_thread) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Blocking call that waits for all managed threads to complete their join call.  This can only be called\n from the main thread or a non-managed thread.\n\n This gets called automatically from library cleanup.\n\n 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 () -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Overrides how long, in nanoseconds, that aws_thread_join_all_managed will wait for threads to complete.\n A value of zero will result in an unbounded wait."] pub fn aws_thread_set_managed_join_timeout_ns (timeout_in_ns : u64) ; } unsafe 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\n before calling this function."] pub fn aws_thread_clean_up (thread : * mut aws_thread) ; } unsafe extern "C" { # [doc = " Returns the thread id of the calling thread."] pub fn aws_thread_current_thread_id () -> aws_thread_id_t ; } unsafe extern "C" { # [doc = " Compare thread ids."] pub fn aws_thread_thread_id_equal (t1 : aws_thread_id_t , t2 : aws_thread_id_t) -> bool ; } unsafe 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 :: libc :: c_void) > ; unsafe extern "C" { # [doc = " Adds a callback to the chain to be called when the current thread joins.\n Callbacks are called from the current thread, in the reverse order they\n were added, after the thread function returns.\n 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 :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Increments the count of unjoined threads in the managed thread system.  Used by managed threads and\n event loop threads.  Additional usage requires the user to join corresponding threads themselves and\n correctly increment/decrement even in the face of launch/join errors.\n\n aws_thread_join_all_managed() will not return until this count has gone to zero."] pub fn aws_thread_increment_unjoined_count () ; } unsafe extern "C" { # [doc = " Decrements the count of unjoined threads in the managed thread system.  Used by managed threads and\n event loop threads.  Additional usage requires the user to join corresponding threads themselves and\n correctly increment/decrement even in the face of launch/join errors.\n\n aws_thread_join_all_managed() will not return until this count has gone to zero."] pub fn aws_thread_decrement_unjoined_count () ; } unsafe extern "C" { # [doc = " Gets name of the current thread.\n Caller is responsible for destroying returned string.\n If thread does not have a name, AWS_OP_SUCCESS is returned and out_name is\n set to NULL.\n If underlying OS call fails,  AWS_ERROR_SYS_CALL_FAILURE will be raised\n If OS does not support getting thread name, AWS_ERROR_PLATFORM_NOT_SUPPORTED\n will be raised"] pub fn aws_thread_current_name (allocator : * mut aws_allocator , out_name : * mut * mut aws_string) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets name of the thread.\n Caller is responsible for destroying returned string.\n If thread does not have a name, AWS_OP_SUCCESS is returned and out_name is\n set to NULL.\n If underlying OS call fails,  AWS_ERROR_SYS_CALL_FAILURE will be raised\n If OS does not support getting thread name, AWS_ERROR_PLATFORM_NOT_SUPPORTED\n will be raised"] pub fn aws_thread_name (allocator : * mut aws_allocator , thread_id : aws_thread_id_t , out_name : * mut * mut aws_string) -> :: libc :: c_int ; } pub mod aws_log_level { # [doc = " Controls what log calls pass through the logger and what log calls get filtered out.\n If a log level has a value of X, then all log calls using a level <= X will appear, while\n those using a value > X will not occur.\n\n You can filter both dynamically (by setting the log level on the logger object) or statically\n (by defining AWS_STATIC_LOG_LEVEL to be an appropriate integer module-wide).  Statically filtered\n log calls will be completely compiled out but require a rebuild if you want to get more detail\n about what's happening."] pub type Type = :: libc :: c_uint ; pub const AWS_LL_NONE : Type = 0 ; pub const AWS_LL_FATAL : Type = 1 ; pub const AWS_LL_ERROR : Type = 2 ; pub const AWS_LL_WARN : Type = 3 ; pub const AWS_LL_INFO : Type = 4 ; pub const AWS_LL_DEBUG : Type = 5 ; pub const AWS_LL_TRACE : Type = 6 ; pub const AWS_LL_COUNT : Type = 7 ; } # [doc = " Log subject is a way of designating the topic of logging.\n\n The general idea is to support a finer-grained approach to log level control.  The primary use case\n is for situations that require more detailed logging within a specific domain, where enabling that detail\n globally leads to an untenable flood of information.\n\n For example, enable TRACE logging for tls-related log statements (handshake binary payloads), but\n only WARN logging everywhere else (because http payloads would blow up the log files).\n\n Log subject is an enum similar to aws error: each library has its own value-space and someone is\n responsible for registering the value <-> string connections."] pub type aws_log_subject_t = u32 ; pub const AWS_LOG_SUBJECT_STRIDE_BITS : _bindgen_ty_20 = _bindgen_ty_20 :: AWS_LOG_SUBJECT_STRIDE_BITS ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_20 { AWS_LOG_SUBJECT_STRIDE_BITS = 10 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_log_subject_info { pub subject_id : aws_log_subject_t , pub subject_name : * const :: libc :: c_char , pub subject_description : * const :: libc :: c_char , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_subject_info"] [:: std :: mem :: size_of :: < aws_log_subject_info > () - 24usize] ; ["Alignment of aws_log_subject_info"] [:: std :: mem :: align_of :: < aws_log_subject_info > () - 8usize] ; ["Offset of field: aws_log_subject_info::subject_id"] [:: std :: mem :: offset_of ! (aws_log_subject_info , subject_id) - 0usize] ; ["Offset of field: aws_log_subject_info::subject_name"] [:: std :: mem :: offset_of ! (aws_log_subject_info , subject_name) - 8usize] ; ["Offset of field: aws_log_subject_info::subject_description"] [:: std :: mem :: offset_of ! (aws_log_subject_info , subject_description) - 16usize] ; } ; 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)] pub struct aws_log_subject_info_list { pub subject_list : * mut aws_log_subject_info , pub count : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_subject_info_list"] [:: std :: mem :: size_of :: < aws_log_subject_info_list > () - 16usize] ; ["Alignment of aws_log_subject_info_list"] [:: std :: mem :: align_of :: < aws_log_subject_info_list > () - 8usize] ; ["Offset of field: aws_log_subject_info_list::subject_list"] [:: std :: mem :: offset_of ! (aws_log_subject_info_list , subject_list) - 0usize] ; ["Offset of field: aws_log_subject_info_list::count"] [:: std :: mem :: offset_of ! (aws_log_subject_info_list , count) - 8usize] ; } ; 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 () } } } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_common_log_subject { AWS_LS_COMMON_GENERAL = 0 , AWS_LS_COMMON_TASK_SCHEDULER = 1 , AWS_LS_COMMON_THREAD = 2 , AWS_LS_COMMON_MEMTRACE = 3 , AWS_LS_COMMON_XML_PARSER = 4 , AWS_LS_COMMON_IO = 5 , AWS_LS_COMMON_BUS = 6 , AWS_LS_COMMON_TEST = 7 , AWS_LS_COMMON_JSON_PARSER = 8 , AWS_LS_COMMON_CBOR = 9 , AWS_LS_COMMON_LAST = 1023 , } # [doc = " We separate the log level function from the log call itself so that we can do the filter check in the macros (see\n below)\n\n By doing so, we make it so that the variadic format arguments are not even evaluated if the filter check does not\n succeed."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_logger_vtable { pub log : :: std :: option :: Option < unsafe extern "C" fn (logger : * mut aws_logger , log_level : aws_log_level :: Type , subject : aws_log_subject_t , format : * const :: libc :: c_char , ...) -> :: libc :: 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 :: Type > , 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 :: Type) -> :: libc :: c_int > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logger_vtable"] [:: std :: mem :: size_of :: < aws_logger_vtable > () - 32usize] ; ["Alignment of aws_logger_vtable"] [:: std :: mem :: align_of :: < aws_logger_vtable > () - 8usize] ; ["Offset of field: aws_logger_vtable::log"] [:: std :: mem :: offset_of ! (aws_logger_vtable , log) - 0usize] ; ["Offset of field: aws_logger_vtable::get_log_level"] [:: std :: mem :: offset_of ! (aws_logger_vtable , get_log_level) - 8usize] ; ["Offset of field: aws_logger_vtable::clean_up"] [:: std :: mem :: offset_of ! (aws_logger_vtable , clean_up) - 16usize] ; ["Offset of field: aws_logger_vtable::set_log_level"] [:: std :: mem :: offset_of ! (aws_logger_vtable , set_log_level) - 24usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_logger { pub vtable : * mut aws_logger_vtable , pub allocator : * mut aws_allocator , pub p_impl : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logger"] [:: std :: mem :: size_of :: < aws_logger > () - 24usize] ; ["Alignment of aws_logger"] [:: std :: mem :: align_of :: < aws_logger > () - 8usize] ; ["Offset of field: aws_logger::vtable"] [:: std :: mem :: offset_of ! (aws_logger , vtable) - 0usize] ; ["Offset of field: aws_logger::allocator"] [:: std :: mem :: offset_of ! (aws_logger , allocator) - 8usize] ; ["Offset of field: aws_logger::p_impl"] [:: std :: mem :: offset_of ! (aws_logger , p_impl) - 16usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logger_pipeline"] [:: std :: mem :: size_of :: < aws_logger_pipeline > () - 40usize] ; ["Alignment of aws_logger_pipeline"] [:: std :: mem :: align_of :: < aws_logger_pipeline > () - 8usize] ; ["Offset of field: aws_logger_pipeline::formatter"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , formatter) - 0usize] ; ["Offset of field: aws_logger_pipeline::channel"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , channel) - 8usize] ; ["Offset of field: aws_logger_pipeline::writer"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , writer) - 16usize] ; ["Offset of field: aws_logger_pipeline::allocator"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , allocator) - 24usize] ; ["Offset of field: aws_logger_pipeline::level"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , level) - 32usize] ; } ; 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().\n Set `filename` to open a file for logging and close it when the logger cleans up.\n Set `file` to use a file that is already open, such as `stderr` or `stdout`."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_logger_standard_options { pub level : aws_log_level :: Type , pub filename : * const :: libc :: c_char , pub file : * mut FILE , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logger_standard_options"] [:: std :: mem :: size_of :: < aws_logger_standard_options > () - 24usize] ; ["Alignment of aws_logger_standard_options"] [:: std :: mem :: align_of :: < aws_logger_standard_options > () - 8usize] ; ["Offset of field: aws_logger_standard_options::level"] [:: std :: mem :: offset_of ! (aws_logger_standard_options , level) - 0usize] ; ["Offset of field: aws_logger_standard_options::filename"] [:: std :: mem :: offset_of ! (aws_logger_standard_options , filename) - 8usize] ; ["Offset of field: aws_logger_standard_options::file"] [:: std :: mem :: offset_of ! (aws_logger_standard_options , file) - 16usize] ; } ; 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 () } } } unsafe 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) ; } unsafe extern "C" { # [doc = " Gets the aws logger used globally across the process."] pub fn aws_logger_get () -> * mut aws_logger ; } unsafe extern "C" { # [doc = " Gets the aws logger used globally across the process if the logging level is at least the inputted level.\n\n @param subject log subject to perform the level check versus, not currently used\n @param level logging level to check against in order to return the logger\n @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 :: Type) -> * mut aws_logger ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Sets the current logging level for the logger.  Loggers are not require to support this.\n @param logger logger to set the log level for\n @param level new log level for the logger\n @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 :: Type) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Converts a log level to a c-string constant.  Intended primarily to support building log lines that\n include the level in them, i.e.\n\n [ERROR] 10:34:54.642 01-31-19 - Json parse error...."] pub fn aws_log_level_to_string (log_level : aws_log_level :: Type , level_string : * mut * const :: libc :: c_char) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Converts a c-string constant to a log level value.  Uses case-insensitive comparison\n and simply iterates all possibilities until a match or nothing remains.  If no match\n is found, AWS_OP_ERR is returned."] pub fn aws_string_to_log_level (level_string : * const :: libc :: c_char , log_level : * mut aws_log_level :: Type) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Converts an aws_thread_id_t to a c-string.  For portability, aws_thread_id_t\n must not be printed directly.  Intended primarily to support building log\n lines that include the thread id in them.  The parameter `buffer` must\n point-to a char buffer of length `bufsz == AWS_THREAD_ID_T_REPR_BUFSZ`.  The\n thread id representation is returned in `buffer`."] pub fn aws_thread_id_t_to_string (thread_id : aws_thread_id_t , buffer : * mut :: libc :: c_char , bufsz : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get subject name from log subject."] pub fn aws_log_subject_name (subject : aws_log_subject_t) -> * const :: libc :: c_char ; } unsafe 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) ; } unsafe 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) ; } unsafe extern "C" { pub fn aws_logger_init_standard (logger : * mut aws_logger , allocator : * mut aws_allocator , options : * mut aws_logger_standard_options) -> :: libc :: c_int ; } unsafe 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 :: Type) -> :: libc :: c_int ; } unsafe extern "C" { pub static mut g_pipeline_logger_owned_vtable : aws_logger_vtable ; } unsafe extern "C" { pub fn aws_logger_init_noalloc (logger : * mut aws_logger , allocator : * mut aws_allocator , options : * mut aws_logger_standard_options) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_io_log_subject { AWS_LS_IO_GENERAL = 1024 , AWS_LS_IO_EVENT_LOOP = 1025 , AWS_LS_IO_SOCKET = 1026 , AWS_LS_IO_SOCKET_HANDLER = 1027 , AWS_LS_IO_TLS = 1028 , AWS_LS_IO_ALPN = 1029 , AWS_LS_IO_DNS = 1030 , AWS_LS_IO_PKI = 1031 , AWS_LS_IO_CHANNEL = 1032 , AWS_LS_IO_CHANNEL_BOOTSTRAP = 1033 , AWS_LS_IO_FILE_UTILS = 1034 , AWS_LS_IO_SHARED_LIBRARY = 1035 , AWS_LS_IO_EXPONENTIAL_BACKOFF_RETRY_STRATEGY = 1036 , AWS_LS_IO_STANDARD_RETRY_STRATEGY = 1037 , AWS_LS_IO_PKCS11 = 1038 , AWS_LS_IO_PEM = 1039 , AWS_IO_LS_LAST = 2047 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_sdkutils_errors { AWS_ERROR_SDKUTILS_GENERAL = 15360 , AWS_ERROR_SDKUTILS_PARSE_FATAL = 15361 , AWS_ERROR_SDKUTILS_PARSE_RECOVERABLE = 15362 , AWS_ERROR_SDKUTILS_ENDPOINTS_UNSUPPORTED_RULESET = 15363 , AWS_ERROR_SDKUTILS_ENDPOINTS_PARSE_FAILED = 15364 , AWS_ERROR_SDKUTILS_ENDPOINTS_RESOLVE_INIT_FAILED = 15365 , AWS_ERROR_SDKUTILS_ENDPOINTS_RESOLVE_FAILED = 15366 , AWS_ERROR_SDKUTILS_ENDPOINTS_EMPTY_RULESET = 15367 , AWS_ERROR_SDKUTILS_ENDPOINTS_RULESET_EXHAUSTED = 15368 , AWS_ERROR_SDKUTILS_PARTITIONS_UNSUPPORTED = 15369 , AWS_ERROR_SDKUTILS_PARTITIONS_PARSE_FAILED = 15370 , AWS_ERROR_SDKUTILS_ENDPOINTS_UNSUPPORTED_REGEX = 15371 , AWS_ERROR_SDKUTILS_ENDPOINTS_REGEX_NO_MATCH = 15372 , AWS_ERROR_SDKUTILS_END_RANGE = 16383 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_sdkutils_log_subject { AWS_LS_SDKUTILS_GENERAL = 15360 , AWS_LS_SDKUTILS_PROFILE = 15361 , AWS_LS_SDKUTILS_ENDPOINTS_PARSING = 15362 , AWS_LS_SDKUTILS_ENDPOINTS_RESOLVE = 15363 , AWS_LS_SDKUTILS_ENDPOINTS_GENERAL = 15364 , AWS_LS_SDKUTILS_PARTITIONS_PARSING = 15365 , AWS_LS_SDKUTILS_ENDPOINTS_REGEX = 15366 , AWS_LS_SDKUTILS_LAST = 16383 , } unsafe extern "C" { pub fn aws_sdkutils_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { pub fn aws_sdkutils_library_clean_up () ; } # [repr (u32)] # [non_exhaustive] # [doc = " Auth-specific error codes"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_auth_errors { AWS_AUTH_PROFILE_PARSE_RECOVERABLE_ERROR = 15362 , AWS_AUTH_PROFILE_PARSE_FATAL_ERROR = 15361 , AWS_AUTH_SIGNING_UNSUPPORTED_ALGORITHM = 6144 , AWS_AUTH_SIGNING_MISMATCHED_CONFIGURATION = 6145 , AWS_AUTH_SIGNING_NO_CREDENTIALS = 6146 , AWS_AUTH_SIGNING_ILLEGAL_REQUEST_QUERY_PARAM = 6147 , AWS_AUTH_SIGNING_ILLEGAL_REQUEST_HEADER = 6148 , AWS_AUTH_SIGNING_INVALID_CONFIGURATION = 6149 , AWS_AUTH_CREDENTIALS_PROVIDER_INVALID_ENVIRONMENT = 6150 , AWS_AUTH_CREDENTIALS_PROVIDER_INVALID_DELEGATE = 6151 , AWS_AUTH_CREDENTIALS_PROVIDER_PROFILE_SOURCE_FAILURE = 6152 , AWS_AUTH_CREDENTIALS_PROVIDER_IMDS_SOURCE_FAILURE = 6153 , AWS_AUTH_CREDENTIALS_PROVIDER_STS_SOURCE_FAILURE = 6154 , AWS_AUTH_CREDENTIALS_PROVIDER_HTTP_STATUS_FAILURE = 6155 , AWS_AUTH_PROVIDER_PARSER_UNEXPECTED_RESPONSE = 6156 , AWS_AUTH_CREDENTIALS_PROVIDER_ECS_SOURCE_FAILURE = 6157 , AWS_AUTH_CREDENTIALS_PROVIDER_X509_SOURCE_FAILURE = 6158 , AWS_AUTH_CREDENTIALS_PROVIDER_PROCESS_SOURCE_FAILURE = 6159 , AWS_AUTH_CREDENTIALS_PROVIDER_STS_WEB_IDENTITY_SOURCE_FAILURE = 6160 , AWS_AUTH_SIGNING_UNSUPPORTED_SIGNATURE_TYPE = 6161 , AWS_AUTH_SIGNING_MISSING_PREVIOUS_SIGNATURE = 6162 , AWS_AUTH_SIGNING_INVALID_CREDENTIALS = 6163 , AWS_AUTH_CANONICAL_REQUEST_MISMATCH = 6164 , AWS_AUTH_SIGV4A_SIGNATURE_VALIDATION_FAILURE = 6165 , AWS_AUTH_CREDENTIALS_PROVIDER_COGNITO_SOURCE_FAILURE = 6166 , AWS_AUTH_CREDENTIALS_PROVIDER_DELEGATE_FAILURE = 6167 , AWS_AUTH_SSO_TOKEN_PROVIDER_SOURCE_FAILURE = 6168 , AWS_AUTH_SSO_TOKEN_INVALID = 6169 , AWS_AUTH_SSO_TOKEN_EXPIRED = 6170 , AWS_AUTH_CREDENTIALS_PROVIDER_SSO_SOURCE_FAILURE = 6171 , AWS_AUTH_IMDS_CLIENT_SOURCE_FAILURE = 6172 , AWS_AUTH_PROFILE_STS_CREDENTIALS_PROVIDER_CYCLE_FAILURE = 6173 , AWS_AUTH_CREDENTIALS_PROVIDER_ECS_INVALID_TOKEN_FILE_PATH = 6174 , AWS_AUTH_CREDENTIALS_PROVIDER_ECS_INVALID_HOST = 6175 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_SESSION_MISSING = 6176 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_REGION_MISSING = 6177 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_TOKEN_PATH = 6178 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_TOKEN = 6179 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_TOKEN_EXPIRED = 6180 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_INVALID_PEM = 6181 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_REFRESH_TOKEN = 6182 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_WRITE_TOKEN = 6183 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_DPOP_HEADER = 6184 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_REQUEST_BODY = 6185 , AWS_AUTH_ERROR_END_RANGE = 7167 , } # [repr (u32)] # [non_exhaustive] # [doc = " Auth-specific logging subjects"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_auth_log_subject { AWS_LS_AUTH_GENERAL = 6144 , AWS_LS_AUTH_PROFILE = 6145 , AWS_LS_AUTH_CREDENTIALS_PROVIDER = 6146 , AWS_LS_AUTH_SIGNING = 6147 , AWS_LS_IMDS_CLIENT = 6148 , AWS_LS_AUTH_LAST = 7167 , } unsafe extern "C" { # [doc = " Initializes internal datastructures used by aws-c-auth.\n Must be called before using any functionality in aws-c-auth.\n\n @param allocator memory allocator to use for any module-level memory allocation"] pub fn aws_auth_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Clean up internal datastructures used by aws-c-auth.\n Must not be called until application is done using functionality in aws-c-auth."] pub fn aws_auth_library_clean_up () ; } pub type aws_simple_completion_callback = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: libc :: c_void) > ; # [doc = " Configuration for a callback to invoke when something has been completely\n cleaned up.  Primarily used in async cleanup control flows."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_shutdown_callback_options { # [doc = " Function to invoke when the associated object is fully destroyed."] pub shutdown_callback_fn : aws_simple_completion_callback , # [doc = " User data to invoke the shutdown callback with."] pub shutdown_callback_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_shutdown_callback_options"] [:: std :: mem :: size_of :: < aws_shutdown_callback_options > () - 16usize] ; ["Alignment of aws_shutdown_callback_options"] [:: std :: mem :: align_of :: < aws_shutdown_callback_options > () - 8usize] ; ["Offset of field: aws_shutdown_callback_options::shutdown_callback_fn"] [:: std :: mem :: offset_of ! (aws_shutdown_callback_options , shutdown_callback_fn) - 0usize] ; ["Offset of field: aws_shutdown_callback_options::shutdown_callback_user_data"] [:: std :: mem :: offset_of ! (aws_shutdown_callback_options , shutdown_callback_user_data) - 8usize] ; } ; 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 () } } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_ref_count { pub ref_count : aws_atomic_var , pub object : * mut :: libc :: c_void , pub on_zero_fn : aws_simple_completion_callback , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_ref_count"] [:: std :: mem :: size_of :: < aws_ref_count > () - 24usize] ; ["Alignment of aws_ref_count"] [:: std :: mem :: align_of :: < aws_ref_count > () - 8usize] ; ["Offset of field: aws_ref_count::ref_count"] [:: std :: mem :: offset_of ! (aws_ref_count , ref_count) - 0usize] ; ["Offset of field: aws_ref_count::object"] [:: std :: mem :: offset_of ! (aws_ref_count , object) - 8usize] ; ["Offset of field: aws_ref_count::on_zero_fn"] [:: std :: mem :: offset_of ! (aws_ref_count , on_zero_fn) - 16usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Initializes a ref-counter structure.  After initialization, the ref count will be 1.\n\n @param ref_count ref-counter to initialize\n @param object object being ref counted\n @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 :: libc :: c_void , on_zero_fn : aws_simple_completion_callback) ; } unsafe extern "C" { # [doc = " Increments a ref-counter's ref count\n\n @param ref_count ref-counter to increment the count for\n @return the object being ref-counted"] pub fn aws_ref_count_acquire (ref_count : * mut aws_ref_count) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Decrements a ref-counter's ref count.  Invokes the on_zero callback if the ref count drops to zero\n @param ref_count ref-counter to decrement the count for\n @return the value of the decremented ref count"] pub fn aws_ref_count_release (ref_count : * mut aws_ref_count) -> usize ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_errors { AWS_ERROR_HTTP_UNKNOWN = 2048 , AWS_ERROR_HTTP_HEADER_NOT_FOUND = 2049 , AWS_ERROR_HTTP_INVALID_HEADER_FIELD = 2050 , AWS_ERROR_HTTP_INVALID_HEADER_NAME = 2051 , AWS_ERROR_HTTP_INVALID_HEADER_VALUE = 2052 , AWS_ERROR_HTTP_INVALID_METHOD = 2053 , AWS_ERROR_HTTP_INVALID_PATH = 2054 , AWS_ERROR_HTTP_INVALID_STATUS_CODE = 2055 , AWS_ERROR_HTTP_MISSING_BODY_STREAM = 2056 , AWS_ERROR_HTTP_INVALID_BODY_STREAM = 2057 , AWS_ERROR_HTTP_CONNECTION_CLOSED = 2058 , AWS_ERROR_HTTP_SWITCHED_PROTOCOLS = 2059 , AWS_ERROR_HTTP_UNSUPPORTED_PROTOCOL = 2060 , AWS_ERROR_HTTP_REACTION_REQUIRED = 2061 , AWS_ERROR_HTTP_DATA_NOT_AVAILABLE = 2062 , AWS_ERROR_HTTP_OUTGOING_STREAM_LENGTH_INCORRECT = 2063 , AWS_ERROR_HTTP_CALLBACK_FAILURE = 2064 , AWS_ERROR_HTTP_WEBSOCKET_UPGRADE_FAILURE = 2065 , AWS_ERROR_HTTP_WEBSOCKET_CLOSE_FRAME_SENT = 2066 , AWS_ERROR_HTTP_WEBSOCKET_IS_MIDCHANNEL_HANDLER = 2067 , AWS_ERROR_HTTP_CONNECTION_MANAGER_INVALID_STATE_FOR_ACQUIRE = 2068 , AWS_ERROR_HTTP_CONNECTION_MANAGER_VENDED_CONNECTION_UNDERFLOW = 2069 , AWS_ERROR_HTTP_SERVER_CLOSED = 2070 , AWS_ERROR_HTTP_PROXY_CONNECT_FAILED = 2071 , AWS_ERROR_HTTP_CONNECTION_MANAGER_SHUTTING_DOWN = 2072 , AWS_ERROR_HTTP_CHANNEL_THROUGHPUT_FAILURE = 2073 , AWS_ERROR_HTTP_PROTOCOL_ERROR = 2074 , AWS_ERROR_HTTP_STREAM_IDS_EXHAUSTED = 2075 , AWS_ERROR_HTTP_GOAWAY_RECEIVED = 2076 , AWS_ERROR_HTTP_RST_STREAM_RECEIVED = 2077 , AWS_ERROR_HTTP_RST_STREAM_SENT = 2078 , AWS_ERROR_HTTP_STREAM_NOT_ACTIVATED = 2079 , AWS_ERROR_HTTP_STREAM_HAS_COMPLETED = 2080 , AWS_ERROR_HTTP_PROXY_STRATEGY_NTLM_CHALLENGE_TOKEN_MISSING = 2081 , AWS_ERROR_HTTP_PROXY_STRATEGY_TOKEN_RETRIEVAL_FAILURE = 2082 , AWS_ERROR_HTTP_PROXY_CONNECT_FAILED_RETRYABLE = 2083 , AWS_ERROR_HTTP_PROTOCOL_SWITCH_FAILURE = 2084 , AWS_ERROR_HTTP_MAX_CONCURRENT_STREAMS_EXCEEDED = 2085 , AWS_ERROR_HTTP_STREAM_MANAGER_SHUTTING_DOWN = 2086 , AWS_ERROR_HTTP_STREAM_MANAGER_CONNECTION_ACQUIRE_FAILURE = 2087 , AWS_ERROR_HTTP_STREAM_MANAGER_UNEXPECTED_HTTP_VERSION = 2088 , AWS_ERROR_HTTP_WEBSOCKET_PROTOCOL_ERROR = 2089 , AWS_ERROR_HTTP_MANUAL_WRITE_NOT_ENABLED = 2090 , AWS_ERROR_HTTP_MANUAL_WRITE_HAS_COMPLETED = 2091 , AWS_ERROR_HTTP_RESPONSE_FIRST_BYTE_TIMEOUT = 2092 , AWS_ERROR_HTTP_CONNECTION_MANAGER_ACQUISITION_TIMEOUT = 2093 , AWS_ERROR_HTTP_CONNECTION_MANAGER_MAX_PENDING_ACQUISITIONS_EXCEEDED = 2094 , AWS_ERROR_HTTP_END_RANGE = 3071 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http2_error_code { AWS_HTTP2_ERR_NO_ERROR = 0 , AWS_HTTP2_ERR_PROTOCOL_ERROR = 1 , AWS_HTTP2_ERR_INTERNAL_ERROR = 2 , AWS_HTTP2_ERR_FLOW_CONTROL_ERROR = 3 , AWS_HTTP2_ERR_SETTINGS_TIMEOUT = 4 , AWS_HTTP2_ERR_STREAM_CLOSED = 5 , AWS_HTTP2_ERR_FRAME_SIZE_ERROR = 6 , AWS_HTTP2_ERR_REFUSED_STREAM = 7 , AWS_HTTP2_ERR_CANCEL = 8 , AWS_HTTP2_ERR_COMPRESSION_ERROR = 9 , AWS_HTTP2_ERR_CONNECT_ERROR = 10 , AWS_HTTP2_ERR_ENHANCE_YOUR_CALM = 11 , AWS_HTTP2_ERR_INADEQUATE_SECURITY = 12 , AWS_HTTP2_ERR_HTTP_1_1_REQUIRED = 13 , AWS_HTTP2_ERR_COUNT = 14 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_log_subject { AWS_LS_HTTP_GENERAL = 2048 , AWS_LS_HTTP_CONNECTION = 2049 , AWS_LS_HTTP_ENCODER = 2050 , AWS_LS_HTTP_DECODER = 2051 , AWS_LS_HTTP_SERVER = 2052 , AWS_LS_HTTP_STREAM = 2053 , AWS_LS_HTTP_CONNECTION_MANAGER = 2054 , AWS_LS_HTTP_STREAM_MANAGER = 2055 , AWS_LS_HTTP_WEBSOCKET = 2056 , AWS_LS_HTTP_WEBSOCKET_SETUP = 2057 , AWS_LS_HTTP_PROXY_NEGOTIATION = 2058 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_version { AWS_HTTP_VERSION_UNKNOWN = 0 , AWS_HTTP_VERSION_1_0 = 1 , AWS_HTTP_VERSION_1_1 = 2 , AWS_HTTP_VERSION_2 = 3 , AWS_HTTP_VERSION_COUNT = 4 , } unsafe extern "C" { # [doc = " Initializes internal datastructures used by aws-c-http.\n Must be called before using any functionality in aws-c-http."] pub fn aws_http_library_init (alloc : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Clean up internal datastructures used by aws-c-http.\n Must not be called until application is done using functionality in aws-c-http."] pub fn aws_http_library_clean_up () ; } unsafe extern "C" { pub fn aws_http_error_code_is_retryable (error_code : :: libc :: c_int) -> bool ; } unsafe extern "C" { # [doc = " Returns the description of common status codes.\n Ex: 404 -> \"Not Found\"\n An empty string is returned if the status code is not recognized."] pub fn aws_http_status_text (status_code : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { # [doc = " Shortcuts for common HTTP request methods"] pub static aws_http_method_get : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_head : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_post : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_put : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_delete : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_connect : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_options : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_method : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_scheme : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_authority : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_path : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_status : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_scheme_http : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_scheme_https : aws_byte_cursor ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_impl { _unused : [u8 ; 0] , } # [doc = " Completion callback for aws_future<T>"] pub type aws_future_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; pub type aws_future_impl_result_clean_up_fn = :: std :: option :: Option < unsafe extern "C" fn (result_addr : * mut :: libc :: c_void) > ; pub type aws_future_impl_result_destroy_fn = :: std :: option :: Option < unsafe extern "C" fn (result : * mut :: libc :: c_void) > ; pub type aws_future_impl_result_release_fn = :: std :: option :: Option < unsafe extern "C" fn (result : * mut :: libc :: c_void) -> * mut :: libc :: c_void > ; unsafe extern "C" { pub fn aws_future_impl_new_by_value (alloc : * mut aws_allocator , sizeof_result : usize) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_new_by_value_with_clean_up (alloc : * mut aws_allocator , sizeof_result : usize , result_clean_up : aws_future_impl_result_clean_up_fn) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_new_pointer (alloc : * mut aws_allocator) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_new_pointer_with_destroy (alloc : * mut aws_allocator , result_destroy : aws_future_impl_result_destroy_fn) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_new_pointer_with_release (alloc : * mut aws_allocator , result_release : aws_future_impl_result_release_fn) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_release (promise : * mut aws_future_impl) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_acquire (promise : * mut aws_future_impl) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_set_error (promise : * mut aws_future_impl , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_future_impl_set_result_by_move (promise : * mut aws_future_impl , src_address : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_impl_is_done (future : * const aws_future_impl) -> bool ; } unsafe extern "C" { pub fn aws_future_impl_register_callback (future : * mut aws_future_impl , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_impl_register_callback_if_not_done (future : * mut aws_future_impl , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { pub fn aws_future_impl_register_event_loop_callback (future : * mut aws_future_impl , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_impl_register_channel_callback (future : * mut aws_future_impl , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_impl_wait (future : * const aws_future_impl , timeout_ns : u64) -> bool ; } unsafe extern "C" { pub fn aws_future_impl_get_error (future : * const aws_future_impl) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_future_impl_get_result_address (future : * const aws_future_impl) -> * mut :: libc :: c_void ; } unsafe extern "C" { pub fn aws_future_impl_get_result_by_move (future : * mut aws_future_impl , dst_address : * mut :: libc :: c_void) ; } # [doc = " aws_future<size_t>\n See top of future.h for docs."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_size { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_new (alloc : * mut aws_allocator) -> * mut aws_future_size ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_set_result (future : * mut aws_future_size , result : usize) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_get_result (future : * const aws_future_size) -> usize ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_acquire (future : * mut aws_future_size) -> * mut aws_future_size ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_release (future : * mut aws_future_size) -> * mut aws_future_size ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_set_error (future : * mut aws_future_size , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_is_done (future : * const aws_future_size) -> bool ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_get_error (future : * const aws_future_size) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_register_callback (future : * mut aws_future_size , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_register_callback_if_not_done (future : * mut aws_future_size , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_register_event_loop_callback (future : * mut aws_future_size , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_register_channel_callback (future : * mut aws_future_size , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_wait (future : * mut aws_future_size , timeout_ns : u64) -> bool ; } # [doc = " aws_future<bool>\n See top of future.h for docs."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_bool { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " `aws_future<bool>`\n See top of future.h for docs."] pub fn aws_future_bool_new (alloc : * mut aws_allocator) -> * mut aws_future_bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_set_result (future : * mut aws_future_bool , result : bool) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_get_result (future : * const aws_future_bool) -> bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_acquire (future : * mut aws_future_bool) -> * mut aws_future_bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_release (future : * mut aws_future_bool) -> * mut aws_future_bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_set_error (future : * mut aws_future_bool , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_is_done (future : * const aws_future_bool) -> bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_get_error (future : * const aws_future_bool) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_register_callback (future : * mut aws_future_bool , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_register_callback_if_not_done (future : * mut aws_future_bool , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_register_event_loop_callback (future : * mut aws_future_bool , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_register_channel_callback (future : * mut aws_future_bool , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_wait (future : * mut aws_future_bool , timeout_ns : u64) -> bool ; } # [doc = " aws_future<void>\n See top of future.h for docs."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_void { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<void>\n See top of future.h for docs."] pub fn aws_future_void_new (alloc : * mut aws_allocator) -> * mut aws_future_void ; } unsafe extern "C" { pub fn aws_future_void_set_result (future : * mut aws_future_void) ; } unsafe extern "C" { pub fn aws_future_void_acquire (future : * mut aws_future_void) -> * mut aws_future_void ; } unsafe extern "C" { pub fn aws_future_void_release (future : * mut aws_future_void) -> * mut aws_future_void ; } unsafe extern "C" { pub fn aws_future_void_set_error (future : * mut aws_future_void , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_future_void_is_done (future : * const aws_future_void) -> bool ; } unsafe extern "C" { pub fn aws_future_void_get_error (future : * const aws_future_void) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_future_void_register_callback (future : * mut aws_future_void , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_void_register_callback_if_not_done (future : * mut aws_future_void , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { pub fn aws_future_void_register_event_loop_callback (future : * mut aws_future_void , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_void_register_channel_callback (future : * mut aws_future_void , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_void_wait (future : * mut aws_future_void , timeout_ns : u64) -> bool ; } # [doc = " An HTTP connection.\n This type is used by both server-side and client-side connections.\n This type is also used by all supported versions of HTTP."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_connection { _unused : [u8 ; 0] , } # [doc = " A stream exists for the duration of a request/response exchange.\n A client creates a stream to send a request and receive a response.\n A server creates a stream to receive a request and send a response.\n In http/2, a push-promise stream can be sent by a server and received by a client."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_stream { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [doc = " Controls whether a header's strings may be compressed by encoding the index of\n strings in a cache, rather than encoding the literal string.\n\n This setting has no effect on HTTP/1.x connections.\n On HTTP/2 connections this controls HPACK behavior.\n See RFC-7541 Section 7.1 for security considerations."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_header_compression { # [doc = " Compress header by encoding the cached index of its strings,\n or by updating the cache to contain these strings for future reference.\n Best for headers that are sent repeatedly.\n This is the default setting."] AWS_HTTP_HEADER_COMPRESSION_USE_CACHE = 0 , # [doc = " Encode header strings literally.\n If an intermediary re-broadcasts the headers, it is permitted to use cache.\n Best for unique headers that are unlikely to repeat."] AWS_HTTP_HEADER_COMPRESSION_NO_CACHE = 1 , # [doc = " Encode header strings literally and forbid all intermediaries from using\n cache when re-broadcasting.\n Best for header fields that are highly valuable or sensitive to recovery."] AWS_HTTP_HEADER_COMPRESSION_NO_FORWARD_CACHE = 2 , } # [doc = " A lightweight HTTP header struct.\n Note that the underlying strings are not owned by the byte cursors."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_header { pub name : aws_byte_cursor , pub value : aws_byte_cursor , pub compression : aws_http_header_compression , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_header"] [:: std :: mem :: size_of :: < aws_http_header > () - 40usize] ; ["Alignment of aws_http_header"] [:: std :: mem :: align_of :: < aws_http_header > () - 8usize] ; ["Offset of field: aws_http_header::name"] [:: std :: mem :: offset_of ! (aws_http_header , name) - 0usize] ; ["Offset of field: aws_http_header::value"] [:: std :: mem :: offset_of ! (aws_http_header , value) - 16usize] ; ["Offset of field: aws_http_header::compression"] [:: std :: mem :: offset_of ! (aws_http_header , compression) - 32usize] ; } ; impl Default for aws_http_header { 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 = " A transformable block of HTTP headers.\n Provides a nice API for getting/setting header names and values.\n\n All strings are copied and stored within this datastructure.\n The index of a given header may change any time headers are modified.\n When iterating headers, the following ordering rules apply:\n\n - Headers with the same name will always be in the same order, relative to one another.\n   If \"A: one\" is added before \"A: two\", then \"A: one\" will always precede \"A: two\".\n\n - Headers with different names could be in any order, relative to one another.\n   If \"A: one\" is seen before \"B: bee\" in one iteration, you might see \"B: bee\" before \"A: one\" on the next."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_headers { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [doc = " Header block type.\n INFORMATIONAL: Header block for 1xx informational (interim) responses.\n MAIN: Main header block sent with request or response.\n TRAILING: Headers sent after the body of a request or response."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_header_block { AWS_HTTP_HEADER_BLOCK_MAIN = 0 , AWS_HTTP_HEADER_BLOCK_INFORMATIONAL = 1 , AWS_HTTP_HEADER_BLOCK_TRAILING = 2 , } # [doc = " The definition for an outgoing HTTP request or response.\n The message may be transformed (ex: signing the request) before its data is eventually sent.\n\n The message keeps internal copies of its trivial strings (method, path, headers)\n but does NOT take ownership of its body stream.\n\n A language binding would likely present this as an HttpMessage base class with\n HttpRequest and HttpResponse subclasses."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_message { _unused : [u8 ; 0] , } # [doc = " Function to invoke when a message transformation completes.\n This function MUST be invoked or the application will soft-lock.\n `message` and `complete_ctx` must be the same pointers provided to the `aws_http_message_transform_fn`.\n `error_code` should should be AWS_ERROR_SUCCESS if transformation was successful,\n otherwise pass a different AWS_ERROR_X value."] pub type aws_http_message_transform_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (message : * mut aws_http_message , error_code : :: libc :: c_int , complete_ctx : * mut :: libc :: c_void) > ; # [doc = " A function that may modify a request or response before it is sent.\n The transformation may be asynchronous or immediate.\n The user MUST invoke the `complete_fn` when transformation is complete or the application will soft-lock.\n When invoking the `complete_fn`, pass along the `message` and `complete_ctx` provided here and an error code.\n The error code should be AWS_ERROR_SUCCESS if transformation was successful,\n otherwise pass a different AWS_ERROR_X value."] pub type aws_http_message_transform_fn = :: std :: option :: Option < unsafe extern "C" fn (message : * mut aws_http_message , user_data : * mut :: libc :: c_void , complete_fn : aws_http_message_transform_complete_fn , complete_ctx : * mut :: libc :: c_void) > ; # [doc = " Invoked repeatedly times as headers are received.\n At this point, aws_http_stream_get_incoming_response_status() can be called for the client.\n And aws_http_stream_get_incoming_request_method() and aws_http_stream_get_incoming_request_uri() can be called for\n the server.\n This is always invoked on the HTTP connection's event-loop thread.\n\n Return AWS_OP_SUCCESS to continue processing the stream.\n Return aws_raise_error(E) to indicate failure and cancel the stream.\n The error you raise will be reflected in the error_code passed to the on_complete callback."] pub type aws_http_on_incoming_headers_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , header_block : aws_http_header_block , header_array : * const aws_http_header , num_headers : usize , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked when the incoming header block of this type(informational/main/trailing) has been completely read.\n This is always invoked on the HTTP connection's event-loop thread.\n\n Return AWS_OP_SUCCESS to continue processing the stream.\n Return aws_raise_error(E) to indicate failure and cancel the stream.\n The error you raise will be reflected in the error_code passed to the on_complete callback."] pub type aws_http_on_incoming_header_block_done_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , header_block : aws_http_header_block , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Called repeatedly as body data is received.\n The data must be copied immediately if you wish to preserve it.\n This is always invoked on the HTTP connection's event-loop thread.\n\n Note that, if the connection is using manual_window_management then the window\n size has shrunk by the amount of body data received. If the window size\n reaches 0 no further data will be received. Increment the window size with\n aws_http_stream_update_window().\n\n Return AWS_OP_SUCCESS to continue processing the stream.\n Return aws_raise_error(E) to indicate failure and cancel the stream.\n The error you raise will be reflected in the error_code passed to the on_complete callback."] pub type aws_http_on_incoming_body_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , data : * const aws_byte_cursor , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked when request has been completely read.\n This is always invoked on the HTTP connection's event-loop thread.\n\n Return AWS_OP_SUCCESS to continue processing the stream.\n Return aws_raise_error(E) to indicate failure and cancel the stream.\n The error you raise will be reflected in the error_code passed to the on_complete callback."] pub type aws_http_on_incoming_request_done_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked when a request/response stream is complete, whether successful or unsuccessful\n This is always invoked on the HTTP connection's event-loop thread.\n This will not be invoked if the stream is never activated."] pub type aws_http_on_stream_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when request/response stream destroy completely.\n This can be invoked within the same thead who release the refcount on http stream.\n This is invoked even if the stream is never activated."] pub type aws_http_on_stream_destroy_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " Tracing metrics for aws_http_stream.\n Data maybe not be available if the data of stream was never sent/received before it completes."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_stream_metrics { pub send_start_timestamp_ns : i64 , pub send_end_timestamp_ns : i64 , pub sending_duration_ns : i64 , pub receive_start_timestamp_ns : i64 , pub receive_end_timestamp_ns : i64 , pub receiving_duration_ns : i64 , pub stream_id : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_stream_metrics"] [:: std :: mem :: size_of :: < aws_http_stream_metrics > () - 56usize] ; ["Alignment of aws_http_stream_metrics"] [:: std :: mem :: align_of :: < aws_http_stream_metrics > () - 8usize] ; ["Offset of field: aws_http_stream_metrics::send_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , send_start_timestamp_ns) - 0usize] ; ["Offset of field: aws_http_stream_metrics::send_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , send_end_timestamp_ns) - 8usize] ; ["Offset of field: aws_http_stream_metrics::sending_duration_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , sending_duration_ns) - 16usize] ; ["Offset of field: aws_http_stream_metrics::receive_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , receive_start_timestamp_ns) - 24usize] ; ["Offset of field: aws_http_stream_metrics::receive_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , receive_end_timestamp_ns) - 32usize] ; ["Offset of field: aws_http_stream_metrics::receiving_duration_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , receiving_duration_ns) - 40usize] ; ["Offset of field: aws_http_stream_metrics::stream_id"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , stream_id) - 48usize] ; } ; # [doc = " Invoked right before request/response stream is complete to report the tracing metrics for aws_http_stream.\n This may be invoked synchronously when aws_http_stream_release() is called.\n This is invoked even if the stream is never activated.\n See `aws_http_stream_metrics` for details."] pub type aws_http_on_stream_metrics_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , metrics : * const aws_http_stream_metrics , user_data : * mut :: libc :: c_void) > ; # [doc = " Options for creating a stream which sends a request from the client and receives a response from the server."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_make_request_options { # [doc = " The sizeof() this struct, used for versioning.\n Required."] pub self_size : usize , # [doc = " Definition for outgoing request.\n Required.\n The request will be kept alive via refcounting until the request completes."] pub request : * mut aws_http_message , pub user_data : * mut :: libc :: c_void , # [doc = " Invoked repeatedly times as headers are received.\n Optional.\n See `aws_http_on_incoming_headers_fn`."] pub on_response_headers : aws_http_on_incoming_headers_fn , # [doc = " Invoked when response header block has been completely read.\n Optional.\n See `aws_http_on_incoming_header_block_done_fn`."] pub on_response_header_block_done : aws_http_on_incoming_header_block_done_fn , # [doc = " Invoked repeatedly as body data is received.\n Optional.\n See `aws_http_on_incoming_body_fn`."] pub on_response_body : aws_http_on_incoming_body_fn , # [doc = " Invoked right before stream is complete, whether successful or unsuccessful\n Optional.\n See `aws_http_on_stream_metrics_fn`"] pub on_metrics : aws_http_on_stream_metrics_fn , # [doc = " Invoked when request/response stream is complete, whether successful or unsuccessful\n Optional.\n See `aws_http_on_stream_complete_fn`."] pub on_complete : aws_http_on_stream_complete_fn , pub on_destroy : aws_http_on_stream_destroy_fn , # [doc = " When using HTTP/2, request body data will be provided over time. The stream will only be polled for writing\n when data has been supplied via `aws_http2_stream_write_data`"] pub http2_use_manual_data_writes : bool , # [doc = " Optional (ignored if 0).\n After a request is fully sent, if the server does not begin responding within N milliseconds, then fail with\n AWS_ERROR_HTTP_RESPONSE_FIRST_BYTE_TIMEOUT.\n It override the connection level settings, when the request completes, the\n original monitoring options will be applied back to the connection.\n TODO: Only supported in HTTP/1.1 now, support it in HTTP/2"] pub response_first_byte_timeout_ms : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_make_request_options"] [:: std :: mem :: size_of :: < aws_http_make_request_options > () - 88usize] ; ["Alignment of aws_http_make_request_options"] [:: std :: mem :: align_of :: < aws_http_make_request_options > () - 8usize] ; ["Offset of field: aws_http_make_request_options::self_size"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , self_size) - 0usize] ; ["Offset of field: aws_http_make_request_options::request"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , request) - 8usize] ; ["Offset of field: aws_http_make_request_options::user_data"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , user_data) - 16usize] ; ["Offset of field: aws_http_make_request_options::on_response_headers"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_response_headers) - 24usize] ; ["Offset of field: aws_http_make_request_options::on_response_header_block_done"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_response_header_block_done) - 32usize] ; ["Offset of field: aws_http_make_request_options::on_response_body"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_response_body) - 40usize] ; ["Offset of field: aws_http_make_request_options::on_metrics"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_metrics) - 48usize] ; ["Offset of field: aws_http_make_request_options::on_complete"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_complete) - 56usize] ; ["Offset of field: aws_http_make_request_options::on_destroy"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_destroy) - 64usize] ; ["Offset of field: aws_http_make_request_options::http2_use_manual_data_writes"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , http2_use_manual_data_writes) - 72usize] ; ["Offset of field: aws_http_make_request_options::response_first_byte_timeout_ms"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , response_first_byte_timeout_ms) - 80usize] ; } ; impl Default for aws_http_make_request_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)] pub struct aws_http_request_handler_options { pub self_size : usize , # [doc = " Required."] pub server_connection : * mut aws_http_connection , # [doc = " user_data passed to callbacks.\n Optional."] pub user_data : * mut :: libc :: c_void , # [doc = " Invoked repeatedly times as headers are received.\n Optional.\n See `aws_http_on_incoming_headers_fn`."] pub on_request_headers : aws_http_on_incoming_headers_fn , # [doc = " Invoked when the request header block has been completely read.\n Optional.\n See `aws_http_on_incoming_header_block_done_fn`."] pub on_request_header_block_done : aws_http_on_incoming_header_block_done_fn , # [doc = " Invoked as body data is received.\n Optional.\n See `aws_http_on_incoming_body_fn`."] pub on_request_body : aws_http_on_incoming_body_fn , # [doc = " Invoked when request has been completely read.\n Optional.\n See `aws_http_on_incoming_request_done_fn`."] pub on_request_done : aws_http_on_incoming_request_done_fn , # [doc = " Invoked when request/response stream is complete, whether successful or unsuccessful\n Optional.\n See `aws_http_on_stream_complete_fn`."] pub on_complete : aws_http_on_stream_complete_fn , pub on_destroy : aws_http_on_stream_destroy_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_request_handler_options"] [:: std :: mem :: size_of :: < aws_http_request_handler_options > () - 72usize] ; ["Alignment of aws_http_request_handler_options"] [:: std :: mem :: align_of :: < aws_http_request_handler_options > () - 8usize] ; ["Offset of field: aws_http_request_handler_options::self_size"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , self_size) - 0usize] ; ["Offset of field: aws_http_request_handler_options::server_connection"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , server_connection) - 8usize] ; ["Offset of field: aws_http_request_handler_options::user_data"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , user_data) - 16usize] ; ["Offset of field: aws_http_request_handler_options::on_request_headers"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_request_headers) - 24usize] ; ["Offset of field: aws_http_request_handler_options::on_request_header_block_done"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_request_header_block_done) - 32usize] ; ["Offset of field: aws_http_request_handler_options::on_request_body"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_request_body) - 40usize] ; ["Offset of field: aws_http_request_handler_options::on_request_done"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_request_done) - 48usize] ; ["Offset of field: aws_http_request_handler_options::on_complete"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_complete) - 56usize] ; ["Offset of field: aws_http_request_handler_options::on_destroy"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_destroy) - 64usize] ; } ; impl Default for aws_http_request_handler_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 () } } } # [doc = " Invoked when the data stream of an outgoing HTTP write operation is no longer in use.\n This is always invoked on the HTTP connection's event-loop thread.\n\n @param stream        HTTP-stream this write operation was submitted to.\n @param error_code    If error_code is AWS_ERROR_SUCCESS (0), the data was successfully sent.\n                      Any other error_code indicates that the HTTP-stream is in the process of terminating.\n                      If the error_code is AWS_ERROR_HTTP_STREAM_HAS_COMPLETED,\n                      the stream's termination has nothing to do with this write operation.\n                      Any other non-zero error code indicates a problem with this particular write\n                      operation's data.\n @param user_data     User data for this write operation."] pub type aws_http_stream_write_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when the data of an outgoing HTTP/1.1 chunk is no longer in use.\n This is always invoked on the HTTP connection's event-loop thread.\n\n @param stream        HTTP-stream this chunk was submitted to.\n @param error_code    If error_code is AWS_ERROR_SUCCESS (0), the data was successfully sent.\n                      Any other error_code indicates that the HTTP-stream is in the process of terminating.\n                      If the error_code is AWS_ERROR_HTTP_STREAM_HAS_COMPLETED,\n                      the stream's termination has nothing to do with this chunk.\n                      Any other non-zero error code indicates a problem with this particular chunk's data.\n @param user_data     User data for this chunk."] pub type aws_http1_stream_write_chunk_complete_fn = aws_http_stream_write_complete_fn ; # [doc = " HTTP/1.1 chunk extension for chunked encoding.\n Note that the underlying strings are not owned by the byte cursors."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http1_chunk_extension { pub key : aws_byte_cursor , pub value : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http1_chunk_extension"] [:: std :: mem :: size_of :: < aws_http1_chunk_extension > () - 32usize] ; ["Alignment of aws_http1_chunk_extension"] [:: std :: mem :: align_of :: < aws_http1_chunk_extension > () - 8usize] ; ["Offset of field: aws_http1_chunk_extension::key"] [:: std :: mem :: offset_of ! (aws_http1_chunk_extension , key) - 0usize] ; ["Offset of field: aws_http1_chunk_extension::value"] [:: std :: mem :: offset_of ! (aws_http1_chunk_extension , value) - 16usize] ; } ; impl Default for aws_http1_chunk_extension { 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 = " Encoding options for an HTTP/1.1 chunked transfer encoding chunk."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http1_chunk_options { pub chunk_data : * mut aws_input_stream , pub chunk_data_size : u64 , # [doc = " A pointer to an array of chunked extensions.\n The num_extensions must match the length of the array.\n This data is deep-copied by aws_http1_stream_write_chunk(),\n it does not need to remain valid until on_complete is invoked."] pub extensions : * mut aws_http1_chunk_extension , # [doc = " The number of elements defined in the extensions array."] pub num_extensions : usize , # [doc = " Invoked when the chunk data is no longer in use, whether or not it was successfully sent.\n Optional.\n See `aws_http1_stream_write_chunk_complete_fn`."] pub on_complete : aws_http1_stream_write_chunk_complete_fn , # [doc = " User provided data passed to the on_complete callback on its invocation."] pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http1_chunk_options"] [:: std :: mem :: size_of :: < aws_http1_chunk_options > () - 48usize] ; ["Alignment of aws_http1_chunk_options"] [:: std :: mem :: align_of :: < aws_http1_chunk_options > () - 8usize] ; ["Offset of field: aws_http1_chunk_options::chunk_data"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , chunk_data) - 0usize] ; ["Offset of field: aws_http1_chunk_options::chunk_data_size"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , chunk_data_size) - 8usize] ; ["Offset of field: aws_http1_chunk_options::extensions"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , extensions) - 16usize] ; ["Offset of field: aws_http1_chunk_options::num_extensions"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , num_extensions) - 24usize] ; ["Offset of field: aws_http1_chunk_options::on_complete"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , on_complete) - 32usize] ; ["Offset of field: aws_http1_chunk_options::user_data"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , user_data) - 40usize] ; } ; impl Default for aws_http1_chunk_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 () } } } # [doc = " Invoked when the data of an outgoing HTTP2 data frame is no longer in use.\n This is always invoked on the HTTP connection's event-loop thread.\n\n @param stream        HTTP2-stream this write was submitted to.\n @param error_code    If error_code is AWS_ERROR_SUCCESS (0), the data was successfully sent.\n                      Any other error_code indicates that the HTTP-stream is in the process of terminating.\n                      If the error_code is AWS_ERROR_HTTP_STREAM_HAS_COMPLETED,\n                      the stream's termination has nothing to do with this write.\n                      Any other non-zero error code indicates a problem with this particular write's data.\n @param user_data     User data for this write."] pub type aws_http2_stream_write_data_complete_fn = aws_http_stream_write_complete_fn ; # [doc = " Encoding options for manual H2 data frame writes"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http2_stream_write_data_options { # [doc = " The data to be sent.\n Optional.\n If not set, input stream with length 0 will be used."] pub data : * mut aws_input_stream , # [doc = " Set true when it's the last chunk to be sent.\n After a write with end_stream, no more data write will be accepted."] pub end_stream : bool , # [doc = " Invoked when the data stream is no longer in use, whether or not it was successfully sent.\n Optional.\n See `aws_http2_stream_write_data_complete_fn`."] pub on_complete : aws_http2_stream_write_data_complete_fn , # [doc = " User provided data passed to the on_complete callback on its invocation."] pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http2_stream_write_data_options"] [:: std :: mem :: size_of :: < aws_http2_stream_write_data_options > () - 32usize] ; ["Alignment of aws_http2_stream_write_data_options"] [:: std :: mem :: align_of :: < aws_http2_stream_write_data_options > () - 8usize] ; ["Offset of field: aws_http2_stream_write_data_options::data"] [:: std :: mem :: offset_of ! (aws_http2_stream_write_data_options , data) - 0usize] ; ["Offset of field: aws_http2_stream_write_data_options::end_stream"] [:: std :: mem :: offset_of ! (aws_http2_stream_write_data_options , end_stream) - 8usize] ; ["Offset of field: aws_http2_stream_write_data_options::on_complete"] [:: std :: mem :: offset_of ! (aws_http2_stream_write_data_options , on_complete) - 16usize] ; ["Offset of field: aws_http2_stream_write_data_options::user_data"] [:: std :: mem :: offset_of ! (aws_http2_stream_write_data_options , user_data) - 24usize] ; } ; impl Default for aws_http2_stream_write_data_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 () } } } unsafe extern "C" { # [doc = " Return whether both names are equivalent.\n This is a case-insensitive string comparison.\n\n Example Matches:\n \"Content-Length\" == \"content-length\" // upper or lower case ok\n\n Example Mismatches:\n \"Content-Length\" != \" Content-Length\" // leading whitespace bad"] pub fn aws_http_header_name_eq (name_a : aws_byte_cursor , name_b : aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " Create a new headers object.\n The caller has a hold on the object and must call aws_http_headers_release() when they are done with it."] pub fn aws_http_headers_new (allocator : * mut aws_allocator) -> * mut aws_http_headers ; } unsafe extern "C" { # [doc = " Acquire a hold on the object, preventing it from being deleted until\n aws_http_headers_release() is called by all those with a hold on it."] pub fn aws_http_headers_acquire (headers : * mut aws_http_headers) ; } unsafe extern "C" { # [doc = " Release a hold on the object.\n The object is deleted when all holds on it are released."] pub fn aws_http_headers_release (headers : * mut aws_http_headers) ; } unsafe extern "C" { # [doc = " Add a header.\n The underlying strings are copied."] pub fn aws_http_headers_add_header (headers : * mut aws_http_headers , header : * const aws_http_header) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add a header.\n The underlying strings are copied."] pub fn aws_http_headers_add (headers : * mut aws_http_headers , name : aws_byte_cursor , value : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add an array of headers.\n The underlying strings are copied."] pub fn aws_http_headers_add_array (headers : * mut aws_http_headers , array : * const aws_http_header , count : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set a header value.\n The header is added if necessary and any existing values for this name are removed.\n The underlying strings are copied."] pub fn aws_http_headers_set (headers : * mut aws_http_headers , name : aws_byte_cursor , value : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the total number of headers."] pub fn aws_http_headers_count (headers : * const aws_http_headers) -> usize ; } unsafe extern "C" { # [doc = " Get the header at the specified index.\n The index of a given header may change any time headers are modified.\n When iterating headers, the following ordering rules apply:\n\n - Headers with the same name will always be in the same order, relative to one another.\n   If \"A: one\" is added before \"A: two\", then \"A: one\" will always precede \"A: two\".\n\n - Headers with different names could be in any order, relative to one another.\n   If \"A: one\" is seen before \"B: bee\" in one iteration, you might see \"B: bee\" before \"A: one\" on the next.\n\n AWS_ERROR_INVALID_INDEX is raised if the index is invalid."] pub fn aws_http_headers_get_index (headers : * const aws_http_headers , index : usize , out_header : * mut aws_http_header) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get all values with this name, combined into one new aws_string that you are responsible for destroying.\n If there are multiple headers with this name, their values are appended with comma-separators.\n If there are no headers with this name, NULL is returned and AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised."] pub fn aws_http_headers_get_all (headers : * const aws_http_headers , name : aws_byte_cursor) -> * mut aws_string ; } unsafe extern "C" { # [doc = " Get the first value for this name, ignoring any additional values.\n AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised if the name is not found."] pub fn aws_http_headers_get (headers : * const aws_http_headers , name : aws_byte_cursor , out_value : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Test if header name exists or not in headers"] pub fn aws_http_headers_has (headers : * const aws_http_headers , name : aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " Remove all headers with this name.\n AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised if no headers with this name are found."] pub fn aws_http_headers_erase (headers : * mut aws_http_headers , name : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Remove the first header found with this name and value.\n AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised if no such header is found."] pub fn aws_http_headers_erase_value (headers : * mut aws_http_headers , name : aws_byte_cursor , value : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Remove the header at the specified index.\n\n AWS_ERROR_INVALID_INDEX is raised if the index is invalid."] pub fn aws_http_headers_erase_index (headers : * mut aws_http_headers , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Clear all headers."] pub fn aws_http_headers_clear (headers : * mut aws_http_headers) ; } unsafe extern "C" { # [doc = " Get the `:method` value (HTTP/2 headers only)."] pub fn aws_http2_headers_get_request_method (h2_headers : * const aws_http_headers , out_method : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:method` (HTTP/2 headers only).\n The headers makes its own copy of the underlying string."] pub fn aws_http2_headers_set_request_method (h2_headers : * mut aws_http_headers , method : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http2_headers_get_request_scheme (h2_headers : * const aws_http_headers , out_scheme : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:scheme` (request pseudo headers only).\n The pseudo headers makes its own copy of the underlying string."] pub fn aws_http2_headers_set_request_scheme (h2_headers : * mut aws_http_headers , scheme : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http2_headers_get_request_authority (h2_headers : * const aws_http_headers , out_authority : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:authority` (request pseudo headers only).\n The pseudo headers makes its own copy of the underlying string."] pub fn aws_http2_headers_set_request_authority (h2_headers : * mut aws_http_headers , authority : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http2_headers_get_request_path (h2_headers : * const aws_http_headers , out_path : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:path` (request pseudo headers only).\n The pseudo headers makes its own copy of the underlying string."] pub fn aws_http2_headers_set_request_path (h2_headers : * mut aws_http_headers , path : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get `:status` (response pseudo headers only).\n If no status is set, AWS_ERROR_HTTP_DATA_NOT_AVAILABLE is raised."] pub fn aws_http2_headers_get_response_status (h2_headers : * const aws_http_headers , out_status_code : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:status` (response pseudo headers only)."] pub fn aws_http2_headers_set_response_status (h2_headers : * mut aws_http_headers , status_code : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Create a new HTTP/1.1 request message.\n The message is blank, all properties (method, path, etc) must be set individually.\n If HTTP/1.1 message used in HTTP/2 connection, the transformation will be automatically applied.\n A HTTP/2 message will created and sent based on the HTTP/1.1 message.\n\n The caller has a hold on the object and must call aws_http_message_release() when they are done with it."] pub fn aws_http_message_new_request (allocator : * mut aws_allocator) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Like aws_http_message_new_request(), but uses existing aws_http_headers instead of creating a new one.\n Acquires a hold on the headers, and releases it when the request is destroyed."] pub fn aws_http_message_new_request_with_headers (allocator : * mut aws_allocator , existing_headers : * mut aws_http_headers) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Create a new HTTP/1.1 response message.\n The message is blank, all properties (status, headers, etc) must be set individually.\n\n The caller has a hold on the object and must call aws_http_message_release() when they are done with it."] pub fn aws_http_message_new_response (allocator : * mut aws_allocator) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Create a new HTTP/2 request message.\n pseudo headers need to be set from aws_http2_headers_set_request_* to the headers of the aws_http_message.\n Will be errored out if used in HTTP/1.1 connection.\n\n The caller has a hold on the object and must call aws_http_message_release() when they are done with it."] pub fn aws_http2_message_new_request (allocator : * mut aws_allocator) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Create a new HTTP/2 response message.\n pseudo headers need to be set from aws_http2_headers_set_response_status to the headers of the aws_http_message.\n Will be errored out if used in HTTP/1.1 connection.\n\n The caller has a hold on the object and must call aws_http_message_release() when they are done with it."] pub fn aws_http2_message_new_response (allocator : * mut aws_allocator) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Create an HTTP/2 message from HTTP/1.1 message.\n pseudo headers will be created from the context and added to the headers of new message.\n Normal headers will be copied to the headers of new message.\n Note:\n  - if `host` exist, it will be removed and `:authority` will be added using the information.\n  - `:scheme` always defaults to \"https\". To use a different scheme create the HTTP/2 message directly"] pub fn aws_http2_message_new_from_http1 (alloc : * mut aws_allocator , http1_msg : * const aws_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Acquire a hold on the object, preventing it from being deleted until\n aws_http_message_release() is called by all those with a hold on it.\n\n This function returns the passed in message (possibly NULL) so that acquire-and-assign can be done with a single\n statement."] pub fn aws_http_message_acquire (message : * mut aws_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Release a hold on the object.\n The object is deleted when all holds on it are released.\n\n This function always returns NULL so that release-and-assign-NULL can be done with a single statement."] pub fn aws_http_message_release (message : * mut aws_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Deprecated. This is equivalent to aws_http_message_release()."] pub fn aws_http_message_destroy (message : * mut aws_http_message) ; } unsafe extern "C" { pub fn aws_http_message_is_request (message : * const aws_http_message) -> bool ; } unsafe extern "C" { pub fn aws_http_message_is_response (message : * const aws_http_message) -> bool ; } unsafe extern "C" { # [doc = " Get the protocol version of the http message."] pub fn aws_http_message_get_protocol_version (message : * const aws_http_message) -> aws_http_version ; } unsafe extern "C" { # [doc = " Get the method (request messages only)."] pub fn aws_http_message_get_request_method (request_message : * const aws_http_message , out_method : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set the method (request messages only).\n The request makes its own copy of the underlying string."] pub fn aws_http_message_set_request_method (request_message : * mut aws_http_message , method : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http_message_get_request_path (request_message : * const aws_http_message , out_path : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set the path-and-query value (request messages only).\n The request makes its own copy of the underlying string."] pub fn aws_http_message_set_request_path (request_message : * mut aws_http_message , path : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the status code (response messages only).\n If no status is set, AWS_ERROR_HTTP_DATA_NOT_AVAILABLE is raised."] pub fn aws_http_message_get_response_status (response_message : * const aws_http_message , out_status_code : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set the status code (response messages only)."] pub fn aws_http_message_set_response_status (response_message : * mut aws_http_message , status_code : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the body stream.\n Returns NULL if no body stream is set."] pub fn aws_http_message_get_body_stream (message : * const aws_http_message) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Set the body stream.\n NULL is an acceptable value for messages with no body.\n Note: The message does NOT take ownership of the body stream.\n The stream must not be destroyed until the message is complete."] pub fn aws_http_message_set_body_stream (message : * mut aws_http_message , body_stream : * mut aws_input_stream) ; } # [doc = " aws_future<aws_http_message*>"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_http_message { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_new (alloc : * mut aws_allocator) -> * mut aws_future_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_set_result_by_move (future : * mut aws_future_http_message , pointer_address : * mut * mut aws_http_message) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_get_result_by_move (future : * mut aws_future_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_peek_result (future : * const aws_future_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_acquire (future : * mut aws_future_http_message) -> * mut aws_future_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_release (future : * mut aws_future_http_message) -> * mut aws_future_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_set_error (future : * mut aws_future_http_message , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_is_done (future : * const aws_future_http_message) -> bool ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_get_error (future : * const aws_future_http_message) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_register_callback (future : * mut aws_future_http_message , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_register_callback_if_not_done (future : * mut aws_future_http_message , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_register_event_loop_callback (future : * mut aws_future_http_message , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_register_channel_callback (future : * mut aws_future_http_message , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_wait (future : * mut aws_future_http_message , timeout_ns : u64) -> bool ; } unsafe extern "C" { # [doc = " Submit a chunk of data to be sent on an HTTP/1.1 stream.\n The stream must have specified \"chunked\" in a \"transfer-encoding\" header,\n and the aws_http_message must NOT have any body stream set.\n For client streams, activate() must be called before any chunks are submitted.\n For server streams, the response must be submitted before any chunks.\n A final chunk with size 0 must be submitted to successfully complete the HTTP-stream.\n\n Returns AWS_OP_SUCCESS if the chunk has been submitted. The chunk's completion\n callback will be invoked when the HTTP-stream is done with the chunk data,\n whether or not it was successfully sent (see `aws_http1_stream_write_chunk_complete_fn`).\n The chunk data must remain valid until the completion callback is invoked.\n\n Returns AWS_OP_ERR and raises an error if the chunk could not be submitted.\n In this case, the chunk's completion callback will never be invoked.\n Note that it is always possible for the HTTP-stream to terminate unexpectedly\n prior to this call being made, in which case the error raised is\n AWS_ERROR_HTTP_STREAM_HAS_COMPLETED."] pub fn aws_http1_stream_write_chunk (http1_stream : * mut aws_http_stream , options : * const aws_http1_chunk_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " The stream must have specified `http2_use_manual_data_writes` during request creation.\n For client streams, activate() must be called before any frames are submitted.\n For server streams, the response headers must be submitted before any frames.\n A write with options that has end_stream set to be true will end the stream and prevent any further write.\n\n @return AWS_OP_SUCCESS if the write was queued\n         AWS_OP_ERROR indicating the attempt raised an error code.\n              AWS_ERROR_INVALID_STATE will be raised for invalid usage.\n              AWS_ERROR_HTTP_STREAM_HAS_COMPLETED will be raised if the stream ended for reasons behind the scenes.\n\n Typical usage will be something like:\n options.http2_use_manual_data_writes = true;\n stream = aws_http_connection_make_request(connection, &options);\n aws_http_stream_activate(stream);\n ...\n struct aws_http2_stream_write_data_options write;\n aws_http2_stream_write_data(stream, &write);\n ...\n struct aws_http2_stream_write_data_options last_write;\n last_write.end_stream = true;\n aws_http2_stream_write_data(stream, &write);\n ...\n aws_http_stream_release(stream);"] pub fn aws_http2_stream_write_data (http2_stream : * mut aws_http_stream , options : * const aws_http2_stream_write_data_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add a list of headers to be added as trailing headers sent after the last chunk is sent.\n a \"Trailer\" header field which indicates the fields present in the trailer.\n\n Certain headers are forbidden in the trailer (e.g., Transfer-Encoding, Content-Length, Host). See RFC-7541\n Section 4.1.2 for more details.\n\n For client streams, activate() must be called before any chunks are submitted.\n\n For server streams, the response must be submitted before the trailer can be added\n\n aws_http1_stream_add_chunked_trailer must be called before the final size 0 chunk, and at the moment can only\n be called once, though this could change if need be.\n\n Returns AWS_OP_SUCCESS if the chunk has been submitted."] pub fn aws_http1_stream_add_chunked_trailer (http1_stream : * mut aws_http_stream , trailing_headers : * const aws_http_headers) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " This datastructure has more functions for inspecting and modifying headers than\n are available on the aws_http_message datastructure."] pub fn aws_http_message_get_headers (message : * const aws_http_message) -> * mut aws_http_headers ; } unsafe extern "C" { # [doc = " Get the message's const aws_http_headers."] pub fn aws_http_message_get_const_headers (message : * const aws_http_message) -> * const aws_http_headers ; } unsafe extern "C" { # [doc = " Get the number of headers."] pub fn aws_http_message_get_header_count (message : * const aws_http_message) -> usize ; } unsafe extern "C" { # [doc = " Get the header at the specified index.\n This function cannot fail if a valid index is provided.\n Otherwise, AWS_ERROR_INVALID_INDEX will be raised.\n\n The underlying strings are stored within the message."] pub fn aws_http_message_get_header (message : * const aws_http_message , out_header : * mut aws_http_header , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add a header to the end of the array.\n The message makes its own copy of the underlying strings."] pub fn aws_http_message_add_header (message : * mut aws_http_message , header : aws_http_header) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add an array of headers to the end of the header array.\n The message makes its own copy of the underlying strings.\n\n This is a helper function useful when it's easier to define headers as a stack array, rather than calling add_header\n repeatedly."] pub fn aws_http_message_add_header_array (message : * mut aws_http_message , headers : * const aws_http_header , num_headers : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Remove the header at the specified index.\n Headers after this index are all shifted back one position.\n\n This function cannot fail if a valid index is provided.\n Otherwise, AWS_ERROR_INVALID_INDEX will be raised."] pub fn aws_http_message_erase_header (message : * mut aws_http_message , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Create a stream, with a client connection sending a request.\n The request does not start sending automatically once the stream is created. You must call\n aws_http_stream_activate to begin execution of the request.\n\n The `options` are copied during this call.\n\n Tip for language bindings: Do not bind the `options` struct. Use something more natural for your language,\n such as Builder Pattern in Java, or Python's ability to take many optional arguments by name.\n\n Note: The header of the request will be sent as it is when the message to send protocol matches the protocol of the\n connection.\n  - No `user-agent` will be added.\n  - No security check will be enforced. eg: `referer` header privacy should be enforced by the user-agent who adds the\n      header\n  - When HTTP/1 message sent on HTTP/2 connection, `aws_http2_message_new_from_http1` will be applied under the hood.\n  - When HTTP/2 message sent on HTTP/1 connection, no change will be made."] pub fn aws_http_connection_make_request (client_connection : * mut aws_http_connection , options : * const aws_http_make_request_options) -> * mut aws_http_stream ; } unsafe extern "C" { # [doc = " Create a stream, with a server connection receiving and responding to a request.\n This function can only be called from the `aws_http_on_incoming_request_fn` callback.\n aws_http_stream_send_response() should be used to send a response."] pub fn aws_http_stream_new_server_request_handler (options : * const aws_http_request_handler_options) -> * mut aws_http_stream ; } unsafe extern "C" { # [doc = " Acquire refcount on the stream to prevent it from being cleaned up until it is released."] pub fn aws_http_stream_acquire (stream : * mut aws_http_stream) -> * mut aws_http_stream ; } unsafe extern "C" { # [doc = " Users must release the stream when they are done with it, or its memory will never be cleaned up.\n This will not cancel the stream, its callbacks will still fire if the stream is still in progress.\n\n Tips for language bindings:\n - Invoke this from the wrapper class's finalizer/destructor.\n - Do not let the wrapper class be destroyed until on_complete() has fired."] pub fn aws_http_stream_release (stream : * mut aws_http_stream) ; } unsafe extern "C" { # [doc = " Only used for client initiated streams (immediately following a call to aws_http_connection_make_request).\n\n Activates the request's outgoing stream processing."] pub fn aws_http_stream_activate (stream : * mut aws_http_stream) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http_stream_get_connection (stream : * const aws_http_stream) -> * mut aws_http_connection ; } unsafe extern "C" { pub fn aws_http_stream_get_incoming_response_status (stream : * const aws_http_stream , out_status : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http_stream_get_incoming_request_method (stream : * const aws_http_stream , out_method : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http_stream_get_incoming_request_uri (stream : * const aws_http_stream , out_uri : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Send response (only callable from \"request handler\" streams)\n The response object must stay alive at least until the stream's on_complete is called."] pub fn aws_http_stream_send_response (stream : * mut aws_http_stream , response : * mut aws_http_message) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Increment the stream's flow-control window to keep data flowing.\n\n If the connection was created with `manual_window_management` set true,\n the flow-control window of each stream will shrink as body data is received\n (headers, padding, and other metadata do not affect the window).\n The connection's `initial_window_size` determines the starting size of each stream's window.\n If a stream's flow-control window reaches 0, no further data will be received.\n\n If `manual_window_management` is false, this call will have no effect.\n The connection maintains its flow-control windows such that\n no back-pressure is applied and data arrives as fast as possible.\n\n For HTTP/2, the client control exactly when the WINDOW_UPDATE frame sent.\n And client will make sure the WINDOW_UPDATE frame to be valid.\n Check `stream_window_size_threshold_to_send_update` for details."] pub fn aws_http_stream_update_window (stream : * mut aws_http_stream , increment_size : usize) ; } unsafe extern "C" { # [doc = " Gets the HTTP/2 id associated with a stream.  Even h1 streams have an id (using the same allocation procedure\n as http/2) for easier tracking purposes. For client streams, this will only be non-zero after a successful call\n to aws_http_stream_activate()"] pub fn aws_http_stream_get_id (stream : * const aws_http_stream) -> u32 ; } unsafe extern "C" { # [doc = " Cancel the stream in flight.\n For HTTP/1.1 streams, it's equivalent to closing the connection.\n For HTTP/2 streams, it's equivalent to calling reset on the stream with `AWS_HTTP2_ERR_CANCEL`.\n\n the stream will complete with the error code provided, unless the stream is\n already completing for other reasons, or the stream is not activated,\n in which case this call will have no impact."] pub fn aws_http_stream_cancel (stream : * mut aws_http_stream , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " Reset the HTTP/2 stream (HTTP/2 only).\n Note that if the stream closes before this async call is fully processed, the RST_STREAM frame will not be sent.\n\n @param http2_stream HTTP/2 stream.\n @param http2_error aws_http2_error_code. Reason to reset the stream."] pub fn aws_http2_stream_reset (http2_stream : * mut aws_http_stream , http2_error : u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the error code received in rst_stream.\n Only valid if the stream has completed, and an RST_STREAM frame has received.\n\n @param http2_stream HTTP/2 stream.\n @param out_http2_error Gets to set to HTTP/2 error code received in rst_stream."] pub fn aws_http2_stream_get_received_reset_error_code (http2_stream : * mut aws_http_stream , out_http2_error : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the HTTP/2 error code sent in the RST_STREAM frame (HTTP/2 only).\n Only valid if the stream has completed, and has sent an RST_STREAM frame.\n\n @param http2_stream HTTP/2 stream.\n @param out_http2_error Gets to set to HTTP/2 error code sent in rst_stream."] pub fn aws_http2_stream_get_sent_reset_error_code (http2_stream : * mut aws_http_stream , out_http2_error : * mut u32) -> :: libc :: c_int ; } # [repr (i32)] # [non_exhaustive] # [doc = " Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n SPDX-License-Identifier: Apache-2.0."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_status_code { AWS_HTTP_STATUS_CODE_UNKNOWN = - 1 , AWS_HTTP_STATUS_CODE_100_CONTINUE = 100 , AWS_HTTP_STATUS_CODE_101_SWITCHING_PROTOCOLS = 101 , AWS_HTTP_STATUS_CODE_102_PROCESSING = 102 , AWS_HTTP_STATUS_CODE_103_EARLY_HINTS = 103 , AWS_HTTP_STATUS_CODE_200_OK = 200 , AWS_HTTP_STATUS_CODE_201_CREATED = 201 , AWS_HTTP_STATUS_CODE_202_ACCEPTED = 202 , AWS_HTTP_STATUS_CODE_203_NON_AUTHORITATIVE_INFORMATION = 203 , AWS_HTTP_STATUS_CODE_204_NO_CONTENT = 204 , AWS_HTTP_STATUS_CODE_205_RESET_CONTENT = 205 , AWS_HTTP_STATUS_CODE_206_PARTIAL_CONTENT = 206 , AWS_HTTP_STATUS_CODE_207_MULTI_STATUS = 207 , AWS_HTTP_STATUS_CODE_208_ALREADY_REPORTED = 208 , AWS_HTTP_STATUS_CODE_226_IM_USED = 226 , AWS_HTTP_STATUS_CODE_300_MULTIPLE_CHOICES = 300 , AWS_HTTP_STATUS_CODE_301_MOVED_PERMANENTLY = 301 , AWS_HTTP_STATUS_CODE_302_FOUND = 302 , AWS_HTTP_STATUS_CODE_303_SEE_OTHER = 303 , AWS_HTTP_STATUS_CODE_304_NOT_MODIFIED = 304 , AWS_HTTP_STATUS_CODE_305_USE_PROXY = 305 , AWS_HTTP_STATUS_CODE_307_TEMPORARY_REDIRECT = 307 , AWS_HTTP_STATUS_CODE_308_PERMANENT_REDIRECT = 308 , AWS_HTTP_STATUS_CODE_400_BAD_REQUEST = 400 , AWS_HTTP_STATUS_CODE_401_UNAUTHORIZED = 401 , AWS_HTTP_STATUS_CODE_402_PAYMENT_REQUIRED = 402 , AWS_HTTP_STATUS_CODE_403_FORBIDDEN = 403 , AWS_HTTP_STATUS_CODE_404_NOT_FOUND = 404 , AWS_HTTP_STATUS_CODE_405_METHOD_NOT_ALLOWED = 405 , AWS_HTTP_STATUS_CODE_406_NOT_ACCEPTABLE = 406 , AWS_HTTP_STATUS_CODE_407_PROXY_AUTHENTICATION_REQUIRED = 407 , AWS_HTTP_STATUS_CODE_408_REQUEST_TIMEOUT = 408 , AWS_HTTP_STATUS_CODE_409_CONFLICT = 409 , AWS_HTTP_STATUS_CODE_410_GONE = 410 , AWS_HTTP_STATUS_CODE_411_LENGTH_REQUIRED = 411 , AWS_HTTP_STATUS_CODE_412_PRECONDITION_FAILED = 412 , AWS_HTTP_STATUS_CODE_413_REQUEST_ENTITY_TOO_LARGE = 413 , AWS_HTTP_STATUS_CODE_414_REQUEST_URI_TOO_LONG = 414 , AWS_HTTP_STATUS_CODE_415_UNSUPPORTED_MEDIA_TYPE = 415 , AWS_HTTP_STATUS_CODE_416_REQUESTED_RANGE_NOT_SATISFIABLE = 416 , AWS_HTTP_STATUS_CODE_417_EXPECTATION_FAILED = 417 , AWS_HTTP_STATUS_CODE_421_MISDIRECTED_REQUEST = 421 , AWS_HTTP_STATUS_CODE_422_UNPROCESSABLE_ENTITY = 422 , AWS_HTTP_STATUS_CODE_423_LOCKED = 423 , AWS_HTTP_STATUS_CODE_424_FAILED_DEPENDENCY = 424 , AWS_HTTP_STATUS_CODE_425_TOO_EARLY = 425 , AWS_HTTP_STATUS_CODE_426_UPGRADE_REQUIRED = 426 , AWS_HTTP_STATUS_CODE_428_PRECONDITION_REQUIRED = 428 , AWS_HTTP_STATUS_CODE_429_TOO_MANY_REQUESTS = 429 , AWS_HTTP_STATUS_CODE_431_REQUEST_HEADER_FIELDS_TOO_LARGE = 431 , AWS_HTTP_STATUS_CODE_451_UNAVAILABLE_FOR_LEGAL_REASON = 451 , AWS_HTTP_STATUS_CODE_500_INTERNAL_SERVER_ERROR = 500 , AWS_HTTP_STATUS_CODE_501_NOT_IMPLEMENTED = 501 , AWS_HTTP_STATUS_CODE_502_BAD_GATEWAY = 502 , AWS_HTTP_STATUS_CODE_503_SERVICE_UNAVAILABLE = 503 , AWS_HTTP_STATUS_CODE_504_GATEWAY_TIMEOUT = 504 , AWS_HTTP_STATUS_CODE_505_HTTP_VERSION_NOT_SUPPORTED = 505 , AWS_HTTP_STATUS_CODE_506_VARIANT_ALSO_NEGOTIATES = 506 , AWS_HTTP_STATUS_CODE_507_INSUFFICIENT_STORAGE = 507 , AWS_HTTP_STATUS_CODE_508_LOOP_DETECTED = 508 , AWS_HTTP_STATUS_CODE_510_NOT_EXTENDED = 510 , AWS_HTTP_STATUS_CODE_511_NETWORK_AUTHENTICATION_REQUIRED = 511 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_proxy_config { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [doc = " @Deprecated - Supported proxy authentication modes.  Superceded by proxy strategy."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_proxy_authentication_type { AWS_HPAT_NONE = 0 , AWS_HPAT_BASIC = 1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_proxy_env_var_type { # [doc = " Default.\n Disable reading from environment variable for proxy."] AWS_HPEV_DISABLE = 0 , # [doc = " Enable get proxy URL from environment variable, when the manual proxy options of connection manager is not set.\n env HTTPS_PROXY/https_proxy will be checked when the main connection use tls.\n env HTTP_PROXY/http_proxy will be checked when the main connection NOT use tls.\n env NO_PROXY/no_proxy will be checked to bypass proxy if the host match the pattern.\n      Check `aws_http_host_matches_no_proxy` for detail. This function can also be used with a direct no_proxy\n parameter. The lower case version has precedence."] AWS_HPEV_ENABLE = 1 , } # [repr (u32)] # [non_exhaustive] # [doc = " Supported proxy connection types"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_proxy_connection_type { # [doc = " Deprecated, but 0-valued for backwards compatibility\n\n If tls options are provided (for the main connection) then treat the proxy as a tunneling proxy\n If tls options are not provided (for the main connection), then treat the proxy as a forwarding proxy"] AWS_HPCT_HTTP_LEGACY = 0 , # [doc = " Use the proxy to forward http requests.  Attempting to use both this mode and TLS on the tunnel destination\n is a configuration error."] AWS_HPCT_HTTP_FORWARD = 1 , # [doc = " Use the proxy to establish a connection to a remote endpoint via a CONNECT request through the proxy.\n Works for both plaintext and tls connections."] AWS_HPCT_HTTP_TUNNEL = 2 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct proxy_env_var_settings { pub env_var_type : aws_http_proxy_env_var_type , pub connection_type : aws_http_proxy_connection_type , pub tls_options : * const aws_tls_connection_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of proxy_env_var_settings"] [:: std :: mem :: size_of :: < proxy_env_var_settings > () - 16usize] ; ["Alignment of proxy_env_var_settings"] [:: std :: mem :: align_of :: < proxy_env_var_settings > () - 8usize] ; ["Offset of field: proxy_env_var_settings::env_var_type"] [:: std :: mem :: offset_of ! (proxy_env_var_settings , env_var_type) - 0usize] ; ["Offset of field: proxy_env_var_settings::connection_type"] [:: std :: mem :: offset_of ! (proxy_env_var_settings , connection_type) - 4usize] ; ["Offset of field: proxy_env_var_settings::tls_options"] [:: std :: mem :: offset_of ! (proxy_env_var_settings , tls_options) - 8usize] ; } ; impl Default for proxy_env_var_settings { 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 http proxy server usage"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_proxy_options { # [doc = " Type of proxy connection to make"] pub connection_type : aws_http_proxy_connection_type , # [doc = " Proxy host to connect to"] pub host : aws_byte_cursor , # [doc = " Port to make the proxy connection to"] pub port : u32 , # [doc = " Optional.\n TLS configuration for the Local <-> Proxy connection\n Must be distinct from the the TLS options in the parent aws_http_connection_options struct"] pub tls_options : * const aws_tls_connection_options , # [doc = " Optional\n Advanced option that allows the user to create a custom strategy that gives low-level control of\n certain logical flows within the proxy logic.\n\n For tunneling proxies it allows custom retry and adaptive negotiation of CONNECT requests.\n For forwarding proxies it allows custom request transformations."] pub proxy_strategy : * mut aws_http_proxy_strategy , # [doc = " @Deprecated - What type of proxy authentication to use, if any.\n Replaced by instantiating a proxy_strategy"] pub auth_type : aws_http_proxy_authentication_type , # [doc = " @Deprecated - Optional user name to use for basic authentication\n Replaced by instantiating a proxy_strategy via aws_http_proxy_strategy_new_basic_auth()"] pub auth_username : aws_byte_cursor , # [doc = " @Deprecated - Optional password to use for basic authentication\n Replaced by instantiating a proxy_strategy via aws_http_proxy_strategy_new_basic_auth()"] pub auth_password : aws_byte_cursor , # [doc = " Optional\n No proxy hosts - Comma seperated list of hosts for which not to use a proxy, if one is specified."] pub no_proxy_hosts : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_options"] [:: std :: mem :: size_of :: < aws_http_proxy_options > () - 104usize] ; ["Alignment of aws_http_proxy_options"] [:: std :: mem :: align_of :: < aws_http_proxy_options > () - 8usize] ; ["Offset of field: aws_http_proxy_options::connection_type"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , connection_type) - 0usize] ; ["Offset of field: aws_http_proxy_options::host"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , host) - 8usize] ; ["Offset of field: aws_http_proxy_options::port"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , port) - 24usize] ; ["Offset of field: aws_http_proxy_options::tls_options"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , tls_options) - 32usize] ; ["Offset of field: aws_http_proxy_options::proxy_strategy"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , proxy_strategy) - 40usize] ; ["Offset of field: aws_http_proxy_options::auth_type"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , auth_type) - 48usize] ; ["Offset of field: aws_http_proxy_options::auth_username"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , auth_username) - 56usize] ; ["Offset of field: aws_http_proxy_options::auth_password"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , auth_password) - 72usize] ; ["Offset of field: aws_http_proxy_options::no_proxy_hosts"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , no_proxy_hosts) - 88usize] ; } ; impl Default for aws_http_proxy_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 () } } } # [doc = " Synchronous (for now) callback function to fetch a token used in modifying CONNECT requests"] pub type aws_http_proxy_negotiation_get_token_sync_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void , out_error_code : * mut :: libc :: c_int) -> * mut aws_string > ; # [doc = " Synchronous (for now) callback function to fetch a token used in modifying CONNECT request.  Includes a (byte string)\n context intended to be used as part of a challenge-response flow."] pub type aws_http_proxy_negotiation_get_challenge_token_sync_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void , challenge_context : * const aws_byte_cursor , out_error_code : * mut :: libc :: c_int) -> * mut aws_string > ; # [doc = " Proxy negotiation logic must call this function to indicate an unsuccessful outcome"] pub type aws_http_proxy_negotiation_terminate_fn = :: std :: option :: Option < unsafe extern "C" fn (message : * mut aws_http_message , error_code : :: libc :: c_int , internal_proxy_user_data : * mut :: libc :: c_void) > ; # [doc = " Proxy negotiation logic must call this function to forward the potentially-mutated request back to the proxy\n connection logic."] pub type aws_http_proxy_negotiation_http_request_forward_fn = :: std :: option :: Option < unsafe extern "C" fn (message : * mut aws_http_message , internal_proxy_user_data : * mut :: libc :: c_void) > ; # [doc = " User-supplied transform callback which implements the proxy request flow and ultimately, across all execution\n pathways, invokes either the terminate function or the forward function appropriately.\n\n For tunneling proxy connections, this request flow transform only applies to the CONNECT stage of proxy\n connection establishment.\n\n For forwarding proxy connections, this request flow transform applies to every single http request that goes\n out on the connection.\n\n Forwarding proxy connections cannot yet support a truly async request transform without major surgery on http\n stream creation, so for now, we split into an async version (for tunneling proxies) and a separate\n synchronous version for forwarding proxies.  Also forwarding proxies are a kind of legacy dead-end in some\n sense.\n"] pub type aws_http_proxy_negotiation_http_request_transform_async_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , message : * mut aws_http_message , negotiation_termination_callback : aws_http_proxy_negotiation_terminate_fn , negotiation_http_request_forward_callback : aws_http_proxy_negotiation_http_request_forward_fn , internal_proxy_user_data : * mut :: libc :: c_void) > ; pub type aws_http_proxy_negotiation_http_request_transform_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , message : * mut aws_http_message) -> :: libc :: c_int > ; # [doc = " Tunneling proxy connections only.  A callback that lets the negotiator examine the headers in the\n response to the most recent CONNECT request as they arrive."] pub type aws_http_proxy_negotiation_connect_on_incoming_headers_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , header_block : aws_http_header_block , header_array : * const aws_http_header , num_headers : usize) -> :: libc :: c_int > ; # [doc = " Tunneling proxy connections only.  A callback that lets the negotiator examine the status code of the\n response to the most recent CONNECT request."] pub type aws_http_proxy_negotiator_connect_status_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , status_code : aws_http_status_code) -> :: libc :: c_int > ; # [doc = " Tunneling proxy connections only.  A callback that lets the negotiator examine the body of the response\n to the most recent CONNECT request."] pub type aws_http_proxy_negotiator_connect_on_incoming_body_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , data : * const aws_byte_cursor) -> :: libc :: c_int > ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_proxy_negotiation_retry_directive { AWS_HPNRD_STOP = 0 , AWS_HPNRD_NEW_CONNECTION = 1 , AWS_HPNRD_CURRENT_CONNECTION = 2 , } pub type aws_http_proxy_negotiator_get_retry_directive_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator) -> aws_http_proxy_negotiation_retry_directive > ; # [doc = " Vtable for forwarding-based proxy negotiators"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_proxy_negotiator_forwarding_vtable { pub forward_request_transform : aws_http_proxy_negotiation_http_request_transform_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_negotiator_forwarding_vtable"] [:: std :: mem :: size_of :: < aws_http_proxy_negotiator_forwarding_vtable > () - 8usize] ; ["Alignment of aws_http_proxy_negotiator_forwarding_vtable"] [:: std :: mem :: align_of :: < aws_http_proxy_negotiator_forwarding_vtable > () - 8usize] ; ["Offset of field: aws_http_proxy_negotiator_forwarding_vtable::forward_request_transform"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_forwarding_vtable , forward_request_transform) - 0usize] ; } ; # [doc = " Vtable for tunneling-based proxy negotiators"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_proxy_negotiator_tunnelling_vtable { pub connect_request_transform : aws_http_proxy_negotiation_http_request_transform_async_fn , pub on_incoming_headers_callback : aws_http_proxy_negotiation_connect_on_incoming_headers_fn , pub on_status_callback : aws_http_proxy_negotiator_connect_status_fn , pub on_incoming_body_callback : aws_http_proxy_negotiator_connect_on_incoming_body_fn , pub get_retry_directive : aws_http_proxy_negotiator_get_retry_directive_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_negotiator_tunnelling_vtable"] [:: std :: mem :: size_of :: < aws_http_proxy_negotiator_tunnelling_vtable > () - 40usize] ; ["Alignment of aws_http_proxy_negotiator_tunnelling_vtable"] [:: std :: mem :: align_of :: < aws_http_proxy_negotiator_tunnelling_vtable > () - 8usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::connect_request_transform"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , connect_request_transform) - 0usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::on_incoming_headers_callback"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , on_incoming_headers_callback) - 8usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::on_status_callback"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , on_status_callback) - 16usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::on_incoming_body_callback"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , on_incoming_body_callback) - 24usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::get_retry_directive"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , get_retry_directive) - 32usize] ; } ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_http_proxy_negotiator { pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , pub strategy_vtable : aws_http_proxy_negotiator__bindgen_ty_1 , } # [repr (C)] # [derive (Copy , Clone)] pub union aws_http_proxy_negotiator__bindgen_ty_1 { pub forwarding_vtable : * mut aws_http_proxy_negotiator_forwarding_vtable , pub tunnelling_vtable : * mut aws_http_proxy_negotiator_tunnelling_vtable , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_negotiator__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_http_proxy_negotiator__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_http_proxy_negotiator__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_http_proxy_negotiator__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_http_proxy_negotiator__bindgen_ty_1::forwarding_vtable"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator__bindgen_ty_1 , forwarding_vtable) - 0usize] ; ["Offset of field: aws_http_proxy_negotiator__bindgen_ty_1::tunnelling_vtable"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator__bindgen_ty_1 , tunnelling_vtable) - 0usize] ; } ; impl Default for aws_http_proxy_negotiator__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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_negotiator"] [:: std :: mem :: size_of :: < aws_http_proxy_negotiator > () - 40usize] ; ["Alignment of aws_http_proxy_negotiator"] [:: std :: mem :: align_of :: < aws_http_proxy_negotiator > () - 8usize] ; ["Offset of field: aws_http_proxy_negotiator::ref_count"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator , ref_count) - 0usize] ; ["Offset of field: aws_http_proxy_negotiator::impl_"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator , impl_) - 24usize] ; ["Offset of field: aws_http_proxy_negotiator::strategy_vtable"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator , strategy_vtable) - 32usize] ; } ; impl Default for aws_http_proxy_negotiator { 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_http_proxy_strategy_create_negotiator_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_strategy : * mut aws_http_proxy_strategy , allocator : * mut aws_allocator) -> * mut aws_http_proxy_negotiator > ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_proxy_strategy_vtable { pub create_negotiator : aws_http_proxy_strategy_create_negotiator_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_vtable"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_vtable > () - 8usize] ; ["Alignment of aws_http_proxy_strategy_vtable"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_vtable > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_vtable::create_negotiator"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_vtable , create_negotiator) - 0usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_proxy_strategy { pub ref_count : aws_ref_count , pub vtable : * mut aws_http_proxy_strategy_vtable , pub impl_ : * mut :: libc :: c_void , pub proxy_connection_type : aws_http_proxy_connection_type , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy > () - 48usize] ; ["Alignment of aws_http_proxy_strategy"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy::ref_count"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy , ref_count) - 0usize] ; ["Offset of field: aws_http_proxy_strategy::vtable"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy , vtable) - 24usize] ; ["Offset of field: aws_http_proxy_strategy::impl_"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy , impl_) - 32usize] ; ["Offset of field: aws_http_proxy_strategy::proxy_connection_type"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy , proxy_connection_type) - 40usize] ; } ; impl Default for aws_http_proxy_strategy { 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)] pub struct aws_http_proxy_strategy_basic_auth_options { pub proxy_connection_type : aws_http_proxy_connection_type , pub user_name : aws_byte_cursor , pub password : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_basic_auth_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_basic_auth_options > () - 40usize] ; ["Alignment of aws_http_proxy_strategy_basic_auth_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_basic_auth_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_basic_auth_options::proxy_connection_type"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_basic_auth_options , proxy_connection_type) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_basic_auth_options::user_name"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_basic_auth_options , user_name) - 8usize] ; ["Offset of field: aws_http_proxy_strategy_basic_auth_options::password"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_basic_auth_options , password) - 24usize] ; } ; impl Default for aws_http_proxy_strategy_basic_auth_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)] pub struct aws_http_proxy_strategy_tunneling_kerberos_options { pub get_token : aws_http_proxy_negotiation_get_token_sync_fn , pub get_token_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_tunneling_kerberos_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_tunneling_kerberos_options > () - 16usize] ; ["Alignment of aws_http_proxy_strategy_tunneling_kerberos_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_tunneling_kerberos_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_kerberos_options::get_token"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_kerberos_options , get_token) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_kerberos_options::get_token_user_data"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_kerberos_options , get_token_user_data) - 8usize] ; } ; impl Default for aws_http_proxy_strategy_tunneling_kerberos_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)] pub struct aws_http_proxy_strategy_tunneling_ntlm_options { pub get_token : aws_http_proxy_negotiation_get_token_sync_fn , pub get_challenge_token : aws_http_proxy_negotiation_get_challenge_token_sync_fn , pub get_challenge_token_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_tunneling_ntlm_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_tunneling_ntlm_options > () - 24usize] ; ["Alignment of aws_http_proxy_strategy_tunneling_ntlm_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_tunneling_ntlm_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_ntlm_options::get_token"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_ntlm_options , get_token) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_ntlm_options::get_challenge_token"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_ntlm_options , get_challenge_token) - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_ntlm_options::get_challenge_token_user_data"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_ntlm_options , get_challenge_token_user_data) - 16usize] ; } ; impl Default for aws_http_proxy_strategy_tunneling_ntlm_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)] pub struct aws_http_proxy_strategy_tunneling_adaptive_options { pub kerberos_options : * mut aws_http_proxy_strategy_tunneling_kerberos_options , pub ntlm_options : * mut aws_http_proxy_strategy_tunneling_ntlm_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_tunneling_adaptive_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_tunneling_adaptive_options > () - 16usize] ; ["Alignment of aws_http_proxy_strategy_tunneling_adaptive_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_tunneling_adaptive_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_adaptive_options::kerberos_options"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_adaptive_options , kerberos_options) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_adaptive_options::ntlm_options"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_adaptive_options , ntlm_options) - 8usize] ; } ; impl Default for aws_http_proxy_strategy_tunneling_adaptive_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)] pub struct aws_http_proxy_strategy_tunneling_sequence_options { pub strategies : * mut * mut aws_http_proxy_strategy , pub strategy_count : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_tunneling_sequence_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_tunneling_sequence_options > () - 16usize] ; ["Alignment of aws_http_proxy_strategy_tunneling_sequence_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_tunneling_sequence_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_sequence_options::strategies"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_sequence_options , strategies) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_sequence_options::strategy_count"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_sequence_options , strategy_count) - 8usize] ; } ; impl Default for aws_http_proxy_strategy_tunneling_sequence_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 () } } } unsafe extern "C" { # [doc = " Take a reference to an http proxy negotiator\n @param proxy_negotiator negotiator to take a reference to\n @return the strategy"] pub fn aws_http_proxy_negotiator_acquire (proxy_negotiator : * mut aws_http_proxy_negotiator) -> * mut aws_http_proxy_negotiator ; } unsafe extern "C" { # [doc = " Release a reference to an http proxy negotiator\n @param proxy_negotiator negotiator to release a reference to"] pub fn aws_http_proxy_negotiator_release (proxy_negotiator : * mut aws_http_proxy_negotiator) ; } unsafe extern "C" { # [doc = " Creates a new proxy negotiator from a proxy strategy\n @param allocator memory allocator to use\n @param strategy strategy to creation a new negotiator for\n @return a new proxy negotiator if successful, otherwise NULL"] pub fn aws_http_proxy_strategy_create_negotiator (strategy : * mut aws_http_proxy_strategy , allocator : * mut aws_allocator) -> * mut aws_http_proxy_negotiator ; } unsafe extern "C" { # [doc = " Take a reference to an http proxy strategy\n @param proxy_strategy strategy to take a reference to\n @return the strategy"] pub fn aws_http_proxy_strategy_acquire (proxy_strategy : * mut aws_http_proxy_strategy) -> * mut aws_http_proxy_strategy ; } unsafe extern "C" { # [doc = " Release a reference to an http proxy strategy\n @param proxy_strategy strategy to release a reference to"] pub fn aws_http_proxy_strategy_release (proxy_strategy : * mut aws_http_proxy_strategy) ; } unsafe extern "C" { # [doc = " A constructor for a proxy strategy that performs basic authentication by adding the appropriate\n header and header value to requests or CONNECT requests.\n\n @param allocator memory allocator to use\n @param config basic authentication configuration info\n @return a new proxy strategy if successfully constructed, otherwise NULL"] pub fn aws_http_proxy_strategy_new_basic_auth (allocator : * mut aws_allocator , config : * mut aws_http_proxy_strategy_basic_auth_options) -> * mut aws_http_proxy_strategy ; } unsafe extern "C" { # [doc = " Constructor for an adaptive tunneling proxy strategy.  This strategy attempts a vanilla CONNECT and if that\n fails it may make followup CONNECT attempts using kerberos or ntlm tokens, based on configuration and proxy\n response properties.\n\n @param allocator memory allocator to use\n @param config configuration options for the strategy\n @return a new proxy strategy if successfully constructed, otherwise NULL"] pub fn aws_http_proxy_strategy_new_tunneling_adaptive (allocator : * mut aws_allocator , config : * mut aws_http_proxy_strategy_tunneling_adaptive_options) -> * mut aws_http_proxy_strategy ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from http connection options\n @param allocator memory allocator to use\n @param options http connection options to source proxy configuration from\n @return"] pub fn aws_http_proxy_config_new_from_connection_options (allocator : * mut aws_allocator , options : * const aws_http_client_connection_options) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from http connection manager options\n @param allocator memory allocator to use\n @param options http connection manager options to source proxy configuration from\n @return"] pub fn aws_http_proxy_config_new_from_manager_options (allocator : * mut aws_allocator , options : * const aws_http_connection_manager_options) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from non-persistent proxy options.  The resulting\n proxy configuration assumes a tunneling connection type.\n\n @param allocator memory allocator to use\n @param options http proxy options to source proxy configuration from\n @return"] pub fn aws_http_proxy_config_new_tunneling_from_proxy_options (allocator : * mut aws_allocator , options : * const aws_http_proxy_options) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from non-persistent proxy options.\n Legacy connection type of proxy options will be rejected.\n\n @param allocator memory allocator to use\n @param options http proxy options to source proxy configuration from\n @return"] pub fn aws_http_proxy_config_new_from_proxy_options (allocator : * mut aws_allocator , options : * const aws_http_proxy_options) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from non-persistent proxy options.\n\n @param allocator memory allocator to use\n @param options http proxy options to source proxy configuration from\n @param is_tls_connection tls connection info of the main connection to determine connection_type\n                          when the connection_type is legacy.\n @return"] pub fn aws_http_proxy_config_new_from_proxy_options_with_tls_info (allocator : * mut aws_allocator , proxy_options : * const aws_http_proxy_options , is_tls_connection : bool) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Clones an existing proxy configuration.  A refactor could remove this (do a \"move\" between the old and new user\n data in the one spot it's used) but that should wait until we have better test cases for the logic where this\n gets invoked (ntlm/kerberos chains).\n\n @param allocator memory allocator to use\n @param proxy_config http proxy configuration to clone\n @return"] pub fn aws_http_proxy_config_new_clone (allocator : * mut aws_allocator , proxy_config : * const aws_http_proxy_config) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Destroys an http proxy configuration\n @param config http proxy configuration to destroy"] pub fn aws_http_proxy_config_destroy (config : * mut aws_http_proxy_config) ; } unsafe extern "C" { # [doc = " Initializes non-persistent http proxy options from a persistent http proxy configuration\n @param options http proxy options to initialize\n @param config the http proxy config to use as an initialization source"] pub fn aws_http_proxy_options_init_from_config (options : * mut aws_http_proxy_options , config : * const aws_http_proxy_config) ; } unsafe extern "C" { # [doc = " Establish an arbitrary protocol connection through an http proxy via tunneling CONNECT.  Alpn is\n not required for this connection process to succeed, but we encourage its use if available.\n\n @param channel_options configuration options for the socket level connection\n @param proxy_options configuration options for the proxy connection\n\n @return AWS_OP_SUCCESS if the asynchronous channel kickoff succeeded, AWS_OP_ERR otherwise"] pub fn aws_http_proxy_new_socket_channel (channel_options : * mut aws_socket_channel_bootstrap_options , proxy_options : * const aws_http_proxy_options) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_auth_http_system_vtable { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_ecc_key_pair { _unused : [u8 ; 0] , } unsafe extern "C" { pub static aws_sts_assume_role_default_duration_secs : u16 ; } pub type aws_on_get_credentials_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (credentials : * mut aws_credentials , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_credentials_provider_get_credentials_fn = :: std :: option :: Option < unsafe extern "C" fn (provider : * mut aws_credentials_provider , callback : aws_on_get_credentials_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; pub type aws_credentials_provider_destroy_fn = :: std :: option :: Option < unsafe extern "C" fn (provider : * mut aws_credentials_provider) > ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_credentials_provider_vtable { pub get_credentials : aws_credentials_provider_get_credentials_fn , pub destroy : aws_credentials_provider_destroy_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_vtable"] [:: std :: mem :: size_of :: < aws_credentials_provider_vtable > () - 16usize] ; ["Alignment of aws_credentials_provider_vtable"] [:: std :: mem :: align_of :: < aws_credentials_provider_vtable > () - 8usize] ; ["Offset of field: aws_credentials_provider_vtable::get_credentials"] [:: std :: mem :: offset_of ! (aws_credentials_provider_vtable , get_credentials) - 0usize] ; ["Offset of field: aws_credentials_provider_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_credentials_provider_vtable , destroy) - 8usize] ; } ; pub type aws_credentials_provider_shutdown_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_shutdown_options { pub shutdown_callback : aws_credentials_provider_shutdown_completed_fn , pub shutdown_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_shutdown_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_shutdown_options > () - 16usize] ; ["Alignment of aws_credentials_provider_shutdown_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_shutdown_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_shutdown_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_credentials_provider_shutdown_options , shutdown_callback) - 0usize] ; ["Offset of field: aws_credentials_provider_shutdown_options::shutdown_user_data"] [:: std :: mem :: offset_of ! (aws_credentials_provider_shutdown_options , shutdown_user_data) - 8usize] ; } ; impl Default for aws_credentials_provider_shutdown_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 () } } } # [doc = " A baseclass for credentials providers.  A credentials provider is an object that has an asynchronous\n query function for retrieving AWS credentials.\n\n Ref-counted.  Thread-safe."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider { pub vtable : * mut aws_credentials_provider_vtable , pub allocator : * mut aws_allocator , pub shutdown_options : aws_credentials_provider_shutdown_options , pub impl_ : * mut :: libc :: c_void , pub ref_count : aws_atomic_var , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider"] [:: std :: mem :: size_of :: < aws_credentials_provider > () - 48usize] ; ["Alignment of aws_credentials_provider"] [:: std :: mem :: align_of :: < aws_credentials_provider > () - 8usize] ; ["Offset of field: aws_credentials_provider::vtable"] [:: std :: mem :: offset_of ! (aws_credentials_provider , vtable) - 0usize] ; ["Offset of field: aws_credentials_provider::allocator"] [:: std :: mem :: offset_of ! (aws_credentials_provider , allocator) - 8usize] ; ["Offset of field: aws_credentials_provider::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider , shutdown_options) - 16usize] ; ["Offset of field: aws_credentials_provider::impl_"] [:: std :: mem :: offset_of ! (aws_credentials_provider , impl_) - 32usize] ; ["Offset of field: aws_credentials_provider::ref_count"] [:: std :: mem :: offset_of ! (aws_credentials_provider , ref_count) - 40usize] ; } ; impl Default for aws_credentials_provider { 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 = " Configuration options for a provider that returns a fixed set of credentials"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_static_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub access_key_id : aws_byte_cursor , pub secret_access_key : aws_byte_cursor , pub session_token : aws_byte_cursor , pub account_id : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_static_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_static_options > () - 80usize] ; ["Alignment of aws_credentials_provider_static_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_static_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_static_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_static_options::access_key_id"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , access_key_id) - 16usize] ; ["Offset of field: aws_credentials_provider_static_options::secret_access_key"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , secret_access_key) - 32usize] ; ["Offset of field: aws_credentials_provider_static_options::session_token"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , session_token) - 48usize] ; ["Offset of field: aws_credentials_provider_static_options::account_id"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , account_id) - 64usize] ; } ; impl Default for aws_credentials_provider_static_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 () } } } # [doc = " Configuration options for a provider that returns credentials based on environment variable values"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_environment_options { pub shutdown_options : aws_credentials_provider_shutdown_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_environment_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_environment_options > () - 16usize] ; ["Alignment of aws_credentials_provider_environment_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_environment_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_environment_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_environment_options , shutdown_options) - 0usize] ; } ; impl Default for aws_credentials_provider_environment_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 () } } } # [doc = " Configuration options for a provider that sources credentials from the aws config and credentials files\n (by default ~/.aws/config and ~/.aws/credentials)"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_profile_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub profile_name_override : aws_byte_cursor , pub config_file_name_override : aws_byte_cursor , pub credentials_file_name_override : aws_byte_cursor , # [doc = " (Optional)\n Use a cached merged profile collection. A merge collection has both config file\n (~/.aws/config) and credentials file based profile collection (~/.aws/credentials) using\n `aws_profile_collection_new_from_merge`.\n If this option is provided, `config_file_name_override` and `credentials_file_name_override` will be ignored."] pub profile_collection_cached : * mut aws_profile_collection , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub function_table : * mut aws_auth_http_system_vtable , pub proxy_ev_settings : * mut proxy_env_var_settings , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_profile_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_profile_options > () - 104usize] ; ["Alignment of aws_credentials_provider_profile_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_profile_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_profile_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_profile_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , profile_name_override) - 16usize] ; ["Offset of field: aws_credentials_provider_profile_options::config_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , config_file_name_override) - 32usize] ; ["Offset of field: aws_credentials_provider_profile_options::credentials_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , credentials_file_name_override) - 48usize] ; ["Offset of field: aws_credentials_provider_profile_options::profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , profile_collection_cached) - 64usize] ; ["Offset of field: aws_credentials_provider_profile_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , bootstrap) - 72usize] ; ["Offset of field: aws_credentials_provider_profile_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , tls_ctx) - 80usize] ; ["Offset of field: aws_credentials_provider_profile_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , function_table) - 88usize] ; ["Offset of field: aws_credentials_provider_profile_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , proxy_ev_settings) - 96usize] ; } ; impl Default for aws_credentials_provider_profile_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 () } } } # [doc = " Configuration options for a provider that functions as a caching decorator.  Credentials sourced through this\n provider will be cached within it until their expiration time.  When the cached credentials expire, new\n credentials will be fetched when next queried."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_cached_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub source : * mut aws_credentials_provider , pub refresh_time_in_milliseconds : u64 , pub high_res_clock_fn : aws_io_clock_fn , pub system_clock_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_cached_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_cached_options > () - 48usize] ; ["Alignment of aws_credentials_provider_cached_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_cached_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_cached_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_cached_options::source"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , source) - 16usize] ; ["Offset of field: aws_credentials_provider_cached_options::refresh_time_in_milliseconds"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , refresh_time_in_milliseconds) - 24usize] ; ["Offset of field: aws_credentials_provider_cached_options::high_res_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , high_res_clock_fn) - 32usize] ; ["Offset of field: aws_credentials_provider_cached_options::system_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , system_clock_fn) - 40usize] ; } ; impl Default for aws_credentials_provider_cached_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 () } } } # [doc = " Configuration options for a provider that queries, in order, a list of providers.  This provider uses the\n first set of credentials successfully queried.  Providers are queried one at a time; a provider is not queried\n until the preceding provider has failed to source credentials."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_chain_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub providers : * mut * mut aws_credentials_provider , pub provider_count : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_chain_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_chain_options > () - 32usize] ; ["Alignment of aws_credentials_provider_chain_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_chain_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_chain_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_chain_options::providers"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_options , providers) - 16usize] ; ["Offset of field: aws_credentials_provider_chain_options::provider_count"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_options , provider_count) - 24usize] ; } ; impl Default for aws_credentials_provider_chain_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 (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_imds_protocol_version { # [doc = " Defaults to IMDS_PROTOCOL_V2. It can be set to either one and IMDS Client\n will figure out (by looking at response code) which protocol an instance\n is using. But a more clear setting will reduce unnecessary network request."] IMDS_PROTOCOL_V2 = 0 , # [doc = " Defaults to IMDS_PROTOCOL_V2. It can be set to either one and IMDS Client\n will figure out (by looking at response code) which protocol an instance\n is using. But a more clear setting will reduce unnecessary network request."] IMDS_PROTOCOL_V1 = 1 , } # [doc = " Configuration options for the provider that sources credentials from ec2 instance metadata"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_imds_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub imds_version : aws_imds_protocol_version , pub ec2_metadata_v1_disabled : bool , pub function_table : * mut aws_auth_http_system_vtable , pub proxy_ev_settings : * const proxy_env_var_settings , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_imds_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_imds_options > () - 48usize] ; ["Alignment of aws_credentials_provider_imds_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_imds_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_imds_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_imds_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_imds_options::imds_version"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , imds_version) - 24usize] ; ["Offset of field: aws_credentials_provider_imds_options::ec2_metadata_v1_disabled"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , ec2_metadata_v1_disabled) - 28usize] ; ["Offset of field: aws_credentials_provider_imds_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , function_table) - 32usize] ; ["Offset of field: aws_credentials_provider_imds_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , proxy_ev_settings) - 40usize] ; } ; impl Default for aws_credentials_provider_imds_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)] pub struct aws_credentials_provider_ecs_environment_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_ecs_environment_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_ecs_environment_options > () - 48usize] ; ["Alignment of aws_credentials_provider_ecs_environment_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_ecs_environment_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , tls_ctx) - 24usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , proxy_ev_settings) - 32usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , function_table) - 40usize] ; } ; impl Default for aws_credentials_provider_ecs_environment_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)] pub struct aws_credentials_provider_ecs_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub host : aws_byte_cursor , pub path_and_query : aws_byte_cursor , pub auth_token_file_path : aws_byte_cursor , pub auth_token : aws_byte_cursor , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , pub port : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_ecs_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_ecs_options > () - 120usize] ; ["Alignment of aws_credentials_provider_ecs_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_ecs_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_ecs_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_ecs_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_ecs_options::host"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , host) - 24usize] ; ["Offset of field: aws_credentials_provider_ecs_options::path_and_query"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , path_and_query) - 40usize] ; ["Offset of field: aws_credentials_provider_ecs_options::auth_token_file_path"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , auth_token_file_path) - 56usize] ; ["Offset of field: aws_credentials_provider_ecs_options::auth_token"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , auth_token) - 72usize] ; ["Offset of field: aws_credentials_provider_ecs_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , tls_ctx) - 88usize] ; ["Offset of field: aws_credentials_provider_ecs_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , proxy_ev_settings) - 96usize] ; ["Offset of field: aws_credentials_provider_ecs_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , function_table) - 104usize] ; ["Offset of field: aws_credentials_provider_ecs_options::port"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , port) - 112usize] ; } ; impl Default for aws_credentials_provider_ecs_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 () } } } # [doc = " Configuration options for the X509 credentials provider\n\n The x509 credentials provider sources temporary credentials from AWS IoT Core using TLS mutual authentication.\n See details: https://docs.aws.amazon.com/iot/latest/developerguide/authorizing-direct-aws.html\n An end to end demo with detailed steps can be found here:\n https://aws.amazon.com/blogs/security/how-to-eliminate-the-need-for-hardcoded-aws-credentials-in-devices-by-using-the-aws-iot-credentials-provider/"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_x509_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub tls_connection_options : * const aws_tls_connection_options , pub thing_name : aws_byte_cursor , pub role_alias : aws_byte_cursor , # [doc = " Per-account X509 credentials sourcing endpoint."] pub endpoint : aws_byte_cursor , # [doc = " (Optional) Http proxy configuration for the http request that fetches credentials"] pub proxy_options : * const aws_http_proxy_options , # [doc = " (Optional) Settings propagated down to http connection manager to choose proxy options from environment. Read\n aws_http_credentials_provider.h for more information."] pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_x509_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_x509_options > () - 104usize] ; ["Alignment of aws_credentials_provider_x509_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_x509_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_x509_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_x509_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_x509_options::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , tls_connection_options) - 24usize] ; ["Offset of field: aws_credentials_provider_x509_options::thing_name"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , thing_name) - 32usize] ; ["Offset of field: aws_credentials_provider_x509_options::role_alias"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , role_alias) - 48usize] ; ["Offset of field: aws_credentials_provider_x509_options::endpoint"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , endpoint) - 64usize] ; ["Offset of field: aws_credentials_provider_x509_options::proxy_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , proxy_options) - 80usize] ; ["Offset of field: aws_credentials_provider_x509_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , proxy_ev_settings) - 88usize] ; ["Offset of field: aws_credentials_provider_x509_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , function_table) - 96usize] ; } ; impl Default for aws_credentials_provider_x509_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 () } } } # [doc = " Configuration options for the STS web identity provider\n\n Sts with web identity credentials provider sources a set of temporary security credentials for users who have been\n authenticated in a mobile or web application with a web identity provider.\n Example providers include Amazon Cognito, Login with Amazon, Facebook, Google, or any OpenID Connect-compatible\n identity provider like Elastic Kubernetes Service\n https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoleWithWebIdentity.html\n The required parameters used in the request (region, roleArn, sessionName, tokenFilePath) are automatically resolved\n by SDK from envrionment variables or config file if not set.\n---------------------------------------------------------------------------------\n| Parameter           | Environment Variable Name    | Config File Property Name |\n----------------------------------------------------------------------------------\n| region              | AWS_REGION/AWS_DEFAULT_REGION| region                    |\n| role_arn            | AWS_ROLE_ARN                 | role_arn                  |\n| role_session_name   | AWS_ROLE_SESSION_NAME        | role_session_name         |\n| token_file_path     | AWS_WEB_IDENTITY_TOKEN_FILE  | web_identity_token_file   |\n|--------------------------------------------------------------------------------|\n The order of resolution is the following\n 1. Parameters\n 2. Environment Variables (in case of region, the AWS_REGION is preferred over the AWS_DEFAULT_REGION)\n 3. Config File"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_sts_web_identity_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , # [doc = " (Optional)\n Use a cached config profile collection. You can also pass a merged collection."] pub config_profile_collection_cached : * mut aws_profile_collection , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , pub profile_name_override : aws_byte_cursor , pub region : aws_byte_cursor , pub role_arn : aws_byte_cursor , pub role_session_name : aws_byte_cursor , pub token_file_path : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_sts_web_identity_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_sts_web_identity_options > () - 136usize] ; ["Alignment of aws_credentials_provider_sts_web_identity_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_sts_web_identity_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::config_profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , config_profile_collection_cached) - 24usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , tls_ctx) - 32usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , proxy_ev_settings) - 40usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , function_table) - 48usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , profile_name_override) - 56usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::region"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , region) - 72usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::role_arn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , role_arn) - 88usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::role_session_name"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , role_session_name) - 104usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::token_file_path"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , token_file_path) - 120usize] ; } ; impl Default for aws_credentials_provider_sts_web_identity_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)] pub struct aws_credentials_provider_sso_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub profile_name_override : aws_byte_cursor , pub config_file_name_override : aws_byte_cursor , # [doc = " (Optional)\n Use a cached config profile collection. You can also pass a merged collection.\n config_file_name_override will be ignored if this option is provided."] pub config_file_cached : * mut aws_profile_collection , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , pub system_clock_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_sso_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_sso_options > () - 96usize] ; ["Alignment of aws_credentials_provider_sso_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_sso_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_sso_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_sso_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , profile_name_override) - 16usize] ; ["Offset of field: aws_credentials_provider_sso_options::config_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , config_file_name_override) - 32usize] ; ["Offset of field: aws_credentials_provider_sso_options::config_file_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , config_file_cached) - 48usize] ; ["Offset of field: aws_credentials_provider_sso_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , bootstrap) - 56usize] ; ["Offset of field: aws_credentials_provider_sso_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , tls_ctx) - 64usize] ; ["Offset of field: aws_credentials_provider_sso_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , proxy_ev_settings) - 72usize] ; ["Offset of field: aws_credentials_provider_sso_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , function_table) - 80usize] ; ["Offset of field: aws_credentials_provider_sso_options::system_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , system_clock_fn) - 88usize] ; } ; impl Default for aws_credentials_provider_sso_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 () } } } # [doc = " Configuration options for the STS credentials provider.\n STS Credentials Provider will try to automatically resolve the region and use a regional STS endpoint if successful.\n The region resolution order is the following:\n 1. AWS_REGION environment variable\n 2. AWS_DEFAULT_REGION environment variable\n 3. The region property in the config file."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_sts_options { pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub creds_provider : * mut aws_credentials_provider , pub role_arn : aws_byte_cursor , pub session_name : aws_byte_cursor , pub external_id : aws_byte_cursor , pub duration_seconds : u16 , # [doc = " (Optional) Http proxy configuration for the AssumeRole http request that fetches credentials"] pub http_proxy_options : * const aws_http_proxy_options , # [doc = " (Optional) Settings propagated down to http connection manager to choose proxy options from environment. Read\n aws_http_credentials_provider.h for more information."] pub proxy_ev_settings : * const proxy_env_var_settings , # [doc = " (Optional)\n Uses a cached config file profile collection (~/.aws/config). You can also pass a merged profile collection,\n which contains both a config file and a credentials file.\n If provided, config_file_name_override is ignored."] pub profile_collection_cached : * mut aws_profile_collection , pub profile_name_override : aws_byte_cursor , pub config_file_name_override : aws_byte_cursor , pub shutdown_options : aws_credentials_provider_shutdown_options , pub function_table : * mut aws_auth_http_system_vtable , pub system_clock_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_sts_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_sts_options > () - 168usize] ; ["Alignment of aws_credentials_provider_sts_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_sts_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_sts_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , bootstrap) - 0usize] ; ["Offset of field: aws_credentials_provider_sts_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , tls_ctx) - 8usize] ; ["Offset of field: aws_credentials_provider_sts_options::creds_provider"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , creds_provider) - 16usize] ; ["Offset of field: aws_credentials_provider_sts_options::role_arn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , role_arn) - 24usize] ; ["Offset of field: aws_credentials_provider_sts_options::session_name"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , session_name) - 40usize] ; ["Offset of field: aws_credentials_provider_sts_options::external_id"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , external_id) - 56usize] ; ["Offset of field: aws_credentials_provider_sts_options::duration_seconds"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , duration_seconds) - 72usize] ; ["Offset of field: aws_credentials_provider_sts_options::http_proxy_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , http_proxy_options) - 80usize] ; ["Offset of field: aws_credentials_provider_sts_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , proxy_ev_settings) - 88usize] ; ["Offset of field: aws_credentials_provider_sts_options::profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , profile_collection_cached) - 96usize] ; ["Offset of field: aws_credentials_provider_sts_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , profile_name_override) - 104usize] ; ["Offset of field: aws_credentials_provider_sts_options::config_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , config_file_name_override) - 120usize] ; ["Offset of field: aws_credentials_provider_sts_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , shutdown_options) - 136usize] ; ["Offset of field: aws_credentials_provider_sts_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , function_table) - 152usize] ; ["Offset of field: aws_credentials_provider_sts_options::system_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , system_clock_fn) - 160usize] ; } ; impl Default for aws_credentials_provider_sts_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 () } } } # [doc = " Configuration options for the process credentials provider\n\n The process credentials provider sources credentials from running a command or process.\n The command to run is sourced from a profile in the AWS config file, using the standard\n profile selection rules. The profile key the command is read from is \"credential_process.\"\n E.g.:\n  [default]\n  credential_process=/opt/amazon/bin/my-credential-fetcher --argsA=abc\n On successfully running the command, the output should be a json data with the following\n format:\n {\n\"Version\": 1,\n\"AccessKeyId\": \"accesskey\",\n\"SecretAccessKey\": \"secretAccessKey\"\n\"SessionToken\": \"....\",\n\"Expiration\": \"2019-05-29T00:21:43Z\"\n}\n Version here identifies the command output format version."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_process_options { pub shutdown_options : aws_credentials_provider_shutdown_options , # [doc = " In which profile name to look for credential_process,\n if not provided, we will try environment variable: AWS_PROFILE."] pub profile_to_use : aws_byte_cursor , # [doc = " (Optional)\n Use a cached config profile collection. You can also pass a merged collection."] pub config_profile_collection_cached : * mut aws_profile_collection , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_process_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_process_options > () - 40usize] ; ["Alignment of aws_credentials_provider_process_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_process_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_process_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_process_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_process_options::profile_to_use"] [:: std :: mem :: offset_of ! (aws_credentials_provider_process_options , profile_to_use) - 16usize] ; ["Offset of field: aws_credentials_provider_process_options::config_profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_process_options , config_profile_collection_cached) - 32usize] ; } ; impl Default for aws_credentials_provider_process_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 () } } } # [doc = " Configuration options for the default credentials provider chain."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_chain_default_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , # [doc = " (Optional)\n Use a cached merged profile collection. A merge collection has both config file\n (~/.aws/config) and credentials file based profile collection (~/.aws/credentials) using\n `aws_profile_collection_new_from_merge`."] pub profile_collection_cached : * mut aws_profile_collection , pub profile_name_override : aws_byte_cursor , pub skip_environment_credentials_provider : bool , pub proxy_ev_settings : * const proxy_env_var_settings , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_chain_default_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_chain_default_options > () - 72usize] ; ["Alignment of aws_credentials_provider_chain_default_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_chain_default_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , tls_ctx) - 24usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , profile_collection_cached) - 32usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , profile_name_override) - 40usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::skip_environment_credentials_provider"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , skip_environment_credentials_provider) - 56usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , proxy_ev_settings) - 64usize] ; } ; impl Default for aws_credentials_provider_chain_default_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_credentials_provider_delegate_get_credentials_fn = :: std :: option :: Option < unsafe extern "C" fn (delegate_user_data : * mut :: libc :: c_void , callback : aws_on_get_credentials_callback_fn , callback_user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Configuration options for the delegate credentials provider."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_delegate_options { pub shutdown_options : aws_credentials_provider_shutdown_options , # [doc = " Delegated get_credentials() callback."] pub get_credentials : aws_credentials_provider_delegate_get_credentials_fn , # [doc = " User data for delegated callbacks."] pub delegate_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_delegate_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_delegate_options > () - 32usize] ; ["Alignment of aws_credentials_provider_delegate_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_delegate_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_delegate_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_delegate_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_delegate_options::get_credentials"] [:: std :: mem :: offset_of ! (aws_credentials_provider_delegate_options , get_credentials) - 16usize] ; ["Offset of field: aws_credentials_provider_delegate_options::delegate_user_data"] [:: std :: mem :: offset_of ! (aws_credentials_provider_delegate_options , delegate_user_data) - 24usize] ; } ; impl Default for aws_credentials_provider_delegate_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 () } } } # [doc = " A (string) pair defining an identity provider and a valid login token sourced from it."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_cognito_identity_provider_token_pair { # [doc = " Name of an identity provider"] pub identity_provider_name : aws_byte_cursor , # [doc = " Valid login token source from the identity provider"] pub identity_provider_token : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_cognito_identity_provider_token_pair"] [:: std :: mem :: size_of :: < aws_cognito_identity_provider_token_pair > () - 32usize] ; ["Alignment of aws_cognito_identity_provider_token_pair"] [:: std :: mem :: align_of :: < aws_cognito_identity_provider_token_pair > () - 8usize] ; ["Offset of field: aws_cognito_identity_provider_token_pair::identity_provider_name"] [:: std :: mem :: offset_of ! (aws_cognito_identity_provider_token_pair , identity_provider_name) - 0usize] ; ["Offset of field: aws_cognito_identity_provider_token_pair::identity_provider_token"] [:: std :: mem :: offset_of ! (aws_cognito_identity_provider_token_pair , identity_provider_token) - 16usize] ; } ; impl Default for aws_cognito_identity_provider_token_pair { 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_credentials_provider_cognito_get_token_pairs_completion_fn = :: std :: option :: Option < unsafe extern "C" fn (logins : * mut aws_cognito_identity_provider_token_pair , login_count : usize , error_code : :: libc :: c_int , completion_user_data : * mut :: libc :: c_void) > ; pub type aws_credentials_provider_cognito_get_token_pairs_async_fn = :: std :: option :: Option < unsafe extern "C" fn (get_token_pairs_user_data : * mut :: libc :: c_void , completion_callback : aws_credentials_provider_cognito_get_token_pairs_completion_fn , completion_user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Configuration options needed to create a Cognito-based Credentials Provider"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_cognito_options { pub shutdown_options : aws_credentials_provider_shutdown_options , # [doc = " Cognito service regional endpoint to source credentials from."] pub endpoint : aws_byte_cursor , # [doc = " Cognito identity to fetch credentials relative to."] pub identity : aws_byte_cursor , # [doc = " Optional set of identity provider token pairs to allow for authenticated identity access."] pub logins : * mut aws_cognito_identity_provider_token_pair , pub login_count : usize , # [doc = " Optional ARN of the role to be assumed when multiple roles were received in the token from the identity provider."] pub custom_role_arn : * mut aws_byte_cursor , # [doc = " Connection bootstrap to use for network connections made while sourcing credentials"] pub bootstrap : * mut aws_client_bootstrap , # [doc = " Client TLS context to use when querying cognito credentials.\n Required."] pub tls_ctx : * mut aws_tls_ctx , # [doc = " (Optional) Http proxy configuration for the http request that fetches credentials"] pub http_proxy_options : * const aws_http_proxy_options , # [doc = " (Optional) Settings propagated down to http connection manager to choose proxy options from environment. Read\n aws_http_credentials_provider.h for more information."] pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , # [doc = " Optional async function to allow for dynamic augmentation of the token pair set on a per-request basis."] pub get_token_pairs : aws_credentials_provider_cognito_get_token_pairs_async_fn , # [doc = " User data that should be passed in to the get_token_pairs function as the first parameter.  In practice, this\n will be a reference to a CRT binding object."] pub get_token_pairs_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_cognito_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_cognito_options > () - 128usize] ; ["Alignment of aws_credentials_provider_cognito_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_cognito_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_cognito_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_cognito_options::endpoint"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , endpoint) - 16usize] ; ["Offset of field: aws_credentials_provider_cognito_options::identity"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , identity) - 32usize] ; ["Offset of field: aws_credentials_provider_cognito_options::logins"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , logins) - 48usize] ; ["Offset of field: aws_credentials_provider_cognito_options::login_count"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , login_count) - 56usize] ; ["Offset of field: aws_credentials_provider_cognito_options::custom_role_arn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , custom_role_arn) - 64usize] ; ["Offset of field: aws_credentials_provider_cognito_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , bootstrap) - 72usize] ; ["Offset of field: aws_credentials_provider_cognito_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , tls_ctx) - 80usize] ; ["Offset of field: aws_credentials_provider_cognito_options::http_proxy_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , http_proxy_options) - 88usize] ; ["Offset of field: aws_credentials_provider_cognito_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , proxy_ev_settings) - 96usize] ; ["Offset of field: aws_credentials_provider_cognito_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , function_table) - 104usize] ; ["Offset of field: aws_credentials_provider_cognito_options::get_token_pairs"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , get_token_pairs) - 112usize] ; ["Offset of field: aws_credentials_provider_cognito_options::get_token_pairs_user_data"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , get_token_pairs_user_data) - 120usize] ; } ; impl Default for aws_credentials_provider_cognito_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)] pub struct aws_credentials_provider_login_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub login_session : aws_byte_cursor , pub login_region : aws_byte_cursor , pub login_cache_directory_override : aws_byte_cursor , pub profile_name_override : aws_byte_cursor , pub config_file_name_override : aws_byte_cursor , pub config_file_cached : * mut aws_profile_collection , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , pub system_clock_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_login_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_login_options > () - 144usize] ; ["Alignment of aws_credentials_provider_login_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_login_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_login_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_login_options::login_session"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , login_session) - 16usize] ; ["Offset of field: aws_credentials_provider_login_options::login_region"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , login_region) - 32usize] ; ["Offset of field: aws_credentials_provider_login_options::login_cache_directory_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , login_cache_directory_override) - 48usize] ; ["Offset of field: aws_credentials_provider_login_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , profile_name_override) - 64usize] ; ["Offset of field: aws_credentials_provider_login_options::config_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , config_file_name_override) - 80usize] ; ["Offset of field: aws_credentials_provider_login_options::config_file_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , config_file_cached) - 96usize] ; ["Offset of field: aws_credentials_provider_login_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , bootstrap) - 104usize] ; ["Offset of field: aws_credentials_provider_login_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , tls_ctx) - 112usize] ; ["Offset of field: aws_credentials_provider_login_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , proxy_ev_settings) - 120usize] ; ["Offset of field: aws_credentials_provider_login_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , function_table) - 128usize] ; ["Offset of field: aws_credentials_provider_login_options::system_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , system_clock_fn) - 136usize] ; } ; impl Default for aws_credentials_provider_login_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 () } } } # [doc = " Configuration options for `aws_credentials_new_with_options`"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_options { pub access_key_id_cursor : aws_byte_cursor , pub secret_access_key_cursor : aws_byte_cursor , pub session_token_cursor : aws_byte_cursor , pub account_id_cursor : aws_byte_cursor , pub expiration_timepoint_seconds : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_options"] [:: std :: mem :: size_of :: < aws_credentials_options > () - 72usize] ; ["Alignment of aws_credentials_options"] [:: std :: mem :: align_of :: < aws_credentials_options > () - 8usize] ; ["Offset of field: aws_credentials_options::access_key_id_cursor"] [:: std :: mem :: offset_of ! (aws_credentials_options , access_key_id_cursor) - 0usize] ; ["Offset of field: aws_credentials_options::secret_access_key_cursor"] [:: std :: mem :: offset_of ! (aws_credentials_options , secret_access_key_cursor) - 16usize] ; ["Offset of field: aws_credentials_options::session_token_cursor"] [:: std :: mem :: offset_of ! (aws_credentials_options , session_token_cursor) - 32usize] ; ["Offset of field: aws_credentials_options::account_id_cursor"] [:: std :: mem :: offset_of ! (aws_credentials_options , account_id_cursor) - 48usize] ; ["Offset of field: aws_credentials_options::expiration_timepoint_seconds"] [:: std :: mem :: offset_of ! (aws_credentials_options , expiration_timepoint_seconds) - 64usize] ; } ; impl Default for aws_credentials_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 () } } } unsafe extern "C" { # [doc = " Creates a new set of aws credentials\n\n @param allocator memory allocator to use\n @param access_key_id_cursor value for the aws access key id field\n @param secret_access_key_cursor value for the secret access key field\n @param session_token_cursor (optional) security token associated with the credentials\n @param expiration_timepoint_seconds timepoint, in seconds since epoch, that the credentials will no longer\n be valid past.  For credentials that do not expire, use UINT64_MAX\n\n @return a valid credentials object, or NULL"] pub fn aws_credentials_new (allocator : * mut aws_allocator , access_key_id_cursor : aws_byte_cursor , secret_access_key_cursor : aws_byte_cursor , session_token_cursor : aws_byte_cursor , expiration_timepoint_seconds : u64) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Creates a new set of aws credentials with account_id\n\n @param allocator memory allocator to use\n @param access_key_id_cursor value for the aws access key id field\n @param secret_access_key_cursor value for the secret access key field\n @param session_token_cursor (optional) security token associated with the credentials\n @param account_id (optional) value for the account_id field\n @param expiration_timepoint_seconds timepoint, in seconds since epoch, that the credentials will no longer\n be valid past.  For credentials that do not expire, use UINT64_MAX\n\n @return a valid credentials object, or NULL"] pub fn aws_credentials_new_with_options (allocator : * mut aws_allocator , options : * const aws_credentials_options) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Creates a new set of aws anonymous credentials.\n Use Anonymous credentials, when you want to skip the signing process.\n\n @param allocator memory allocator to use\n\n @return a valid credentials object, or NULL"] pub fn aws_credentials_new_anonymous (allocator : * mut aws_allocator) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Creates a new set of AWS credentials\n\n @param allocator memory allocator to use\n @param access_key_id  value for the aws access key id field\n @param secret_access_key value for the secret access key field\n @param session_token (optional) security token associated with the credentials\n @param expiration_timepoint_seconds timepoint, in seconds since epoch, that the credentials will no longer\n be valid past.  For credentials that do not expire, use UINT64_MAX\n\n @return a valid credentials object, or NULL"] pub fn aws_credentials_new_from_string (allocator : * mut aws_allocator , access_key_id : * const aws_string , secret_access_key : * const aws_string , session_token : * const aws_string , expiration_timepoint_seconds : u64) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Creates a set of AWS credentials that includes an ECC key pair.  These credentials do not have a value for\n the secret access key; the ecc key takes over that field's role in sigv4a signing.\n\n @param allocator memory allocator to use for all memory allocations\n @param access_key_id access key id for the credential set\n @param ecc_key ecc key to use during signing when using these credentials\n @param session_token (optional) session token associated with the credentials\n @param expiration_timepoint_in_seconds (optional) if session-based, time at which these credentials expire\n @return a new pair of AWS credentials, or NULL"] pub fn aws_credentials_new_ecc (allocator : * mut aws_allocator , access_key_id : aws_byte_cursor , ecc_key : * mut aws_ecc_key_pair , session_token : aws_byte_cursor , expiration_timepoint_in_seconds : u64) -> * mut aws_credentials ; } unsafe extern "C" { pub fn aws_credentials_new_ecc_from_aws_credentials (allocator : * mut aws_allocator , credentials : * const aws_credentials) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Add a reference to some credentials\n\n @param credentials credentials to increment the ref count on"] pub fn aws_credentials_acquire (credentials : * const aws_credentials) ; } unsafe extern "C" { # [doc = " Remove a reference to some credentials\n\n @param credentials credentials to decrement the ref count on"] pub fn aws_credentials_release (credentials : * const aws_credentials) ; } unsafe extern "C" { # [doc = " Get the AWS access key id from a set of credentials\n\n @param credentials credentials to get the access key id from\n @return a byte cursor to the access key id"] pub fn aws_credentials_get_access_key_id (credentials : * const aws_credentials) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the AWS secret access key from a set of credentials\n\n @param credentials credentials to get the secret access key from\n @return a byte cursor to the secret access key"] pub fn aws_credentials_get_secret_access_key (credentials : * const aws_credentials) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the AWS session token from a set of credentials\n\n @param credentials credentials to get the session token from\n @return a byte cursor to the session token or an empty byte cursor if there is no session token"] pub fn aws_credentials_get_session_token (credentials : * const aws_credentials) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the AWS account id from a set of credentials\n\n @param credentials to get the account id from\n @return a byte cursor to the account id or an empty byte cursor if there is no account id"] pub fn aws_credentials_get_account_id (credentials : * const aws_credentials) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the expiration timepoint (in seconds since epoch) associated with a set of credentials\n\n @param credentials credentials to get the expiration timepoint for\n @return the time, in seconds since epoch, the credentials will expire; UINT64_MAX for credentials\n without a specific expiration time"] pub fn aws_credentials_get_expiration_timepoint_seconds (credentials : * const aws_credentials) -> u64 ; } unsafe extern "C" { # [doc = " Get the elliptic curve key associated with this set of credentials\n @param credentials credentials to get the the elliptic curve key for\n @return the elliptic curve key associated with the credentials, or NULL if no key is associated with\n these credentials"] pub fn aws_credentials_get_ecc_key_pair (credentials : * const aws_credentials) -> * mut aws_ecc_key_pair ; } unsafe extern "C" { # [doc = " If credentials are anonymous, then the signing process is skipped.\n\n @param credentials credentials to check\n\n @return true if the credentials are anonymous; false otherwise."] pub fn aws_credentials_is_anonymous (credentials : * const aws_credentials) -> bool ; } unsafe extern "C" { # [doc = " Derives an ecc key pair (based on the nist P256 curve) from the access key id and secret access key components\n of a set of AWS credentials using an internal key derivation specification.  Used to perform sigv4a signing in\n the hybrid mode based on AWS credentials.\n\n @param allocator memory allocator to use for all memory allocations\n @param credentials AWS credentials to derive the ECC key from using the AWS sigv4a key derivation specification\n @return a new ecc key pair or NULL on failure"] pub fn aws_ecc_key_pair_new_ecdsa_p256_key_from_aws_credentials (allocator : * mut aws_allocator , credentials : * const aws_credentials) -> * mut aws_ecc_key_pair ; } unsafe extern "C" { # [doc = " Release a reference to a credentials provider\n\n @param provider provider to decrement the ref count on"] pub fn aws_credentials_provider_release (provider : * mut aws_credentials_provider) -> * mut aws_credentials_provider ; } unsafe extern "C" { pub fn aws_credentials_provider_acquire (provider : * mut aws_credentials_provider) -> * mut aws_credentials_provider ; } unsafe extern "C" { pub fn aws_credentials_provider_get_credentials (provider : * mut aws_credentials_provider , callback : aws_on_get_credentials_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Creates a simple provider that just returns a fixed set of credentials\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_static (allocator : * mut aws_allocator , options : * const aws_credentials_provider_static_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a simple anonymous credentials provider\n\n @param allocator memory allocator to use for all memory allocation\n @param shutdown_options an optional shutdown callback that gets\n invoked when the resources used by the provider are no longer in use.\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_anonymous (allocator : * mut aws_allocator , shutdown_options : * const aws_credentials_provider_shutdown_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that returns credentials sourced from the environment variables:\n\n AWS_ACCESS_KEY_ID\n AWS_SECRET_ACCESS_KEY\n AWS_SESSION_TOKEN\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_environment (allocator : * mut aws_allocator , options : * const aws_credentials_provider_environment_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that functions as a caching decorating of another provider.\n\n For example, the default chain is implemented as:\n\n CachedProvider -> ProviderChain(EnvironmentProvider -> ProfileProvider -> ECS/EC2IMD etc...)\n\n A reference is taken on the target provider\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_cached (allocator : * mut aws_allocator , options : * const aws_credentials_provider_cached_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from key-value profiles loaded from the aws credentials\n file (\"~/.aws/credentials\" by default) and the aws config file (\"~/.aws/config\" by\n default)\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_profile (allocator : * mut aws_allocator , options : * const aws_credentials_provider_profile_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that assumes an IAM role via. STS AssumeRole() API. This provider will fetch new credentials\n upon each call to aws_credentials_provider_get_credentials().\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_sts (allocator : * mut aws_allocator , options : * const aws_credentials_provider_sts_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from an ordered sequence of providers, with the overall result\n being from the first provider to return a valid set of credentials\n\n References are taken on all supplied providers\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_chain (allocator : * mut aws_allocator , options : * const aws_credentials_provider_chain_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from the ec2 instance metadata service\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_imds (allocator : * mut aws_allocator , options : * const aws_credentials_provider_imds_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from the ecs role credentials service and reads the required params from\n environment variables\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_ecs_from_environment (allocator : * mut aws_allocator , options : * const aws_credentials_provider_ecs_environment_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from the ecs role credentials service\n This function doesn't read anything from the environment and requires everything to be explicitly passed in.\n If you need to read properties from the environment, use the `aws_credentials_provider_new_ecs_from_environment`.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_ecs (allocator : * mut aws_allocator , options : * const aws_credentials_provider_ecs_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from IoT Core\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_x509 (allocator : * mut aws_allocator , options : * const aws_credentials_provider_x509_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from STS using AssumeRoleWithWebIdentity\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_sts_web_identity (allocator : * mut aws_allocator , options : * const aws_credentials_provider_sts_web_identity_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from SSO using a SSOToken.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_sso (allocator : * mut aws_allocator , options : * const aws_credentials_provider_sso_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { pub fn aws_credentials_provider_new_process (allocator : * mut aws_allocator , options : * const aws_credentials_provider_process_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Create a credentials provider depends on provided vtable to fetch the credentials.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_delegate (allocator : * mut aws_allocator , options : * const aws_credentials_provider_delegate_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from the Cognito-Identity service via an\n invocation of the GetCredentialsForIdentity API call.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_cognito (allocator : * mut aws_allocator , options : * const aws_credentials_provider_cognito_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a cognito-based provider that has a caching layer wrapped around it\n\n @param allocator memory allocator to use for all memory allocation\n @param options cognito-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_cognito_caching (allocator : * mut aws_allocator , options : * const aws_credentials_provider_cognito_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from AWS Login.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_login (allocator : * mut aws_allocator , options : * const aws_credentials_provider_login_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates the default provider chain used by most AWS SDKs.\n\n Generally:\n\n (1) Environment\n (2) Profile\n    - STSCredentialsProvider\n    - ProcessCredentialsProvider\n    - ProfileCredentialsProvider\n (3) STS web identity\n (4) (conditional, off by default) ECS\n (5) (conditional, on by default) EC2 Instance Metadata\n\n Support for environmental control of the default provider chain is not yet\n implemented.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_chain_default (allocator : * mut aws_allocator , options : * const aws_credentials_provider_chain_default_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { pub static mut g_aws_credentials_provider_http_function_table : * const aws_auth_http_system_vtable ; } pub const AWS_DATE_TIME_STR_MAX_LEN : _bindgen_ty_21 = _bindgen_ty_21 :: AWS_DATE_TIME_STR_MAX_LEN ; pub const AWS_DATE_TIME_STR_MAX_BASIC_LEN : _bindgen_ty_21 = _bindgen_ty_21 :: AWS_DATE_TIME_STR_MAX_BASIC_LEN ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_21 { AWS_DATE_TIME_STR_MAX_LEN = 100 , AWS_DATE_TIME_STR_MAX_BASIC_LEN = 20 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_date_format { AWS_DATE_FORMAT_RFC822 = 0 , AWS_DATE_FORMAT_ISO_8601 = 1 , AWS_DATE_FORMAT_ISO_8601_BASIC = 2 , AWS_DATE_FORMAT_AUTO_DETECT = 3 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_date_month { AWS_DATE_MONTH_JANUARY = 0 , AWS_DATE_MONTH_FEBRUARY = 1 , AWS_DATE_MONTH_MARCH = 2 , AWS_DATE_MONTH_APRIL = 3 , AWS_DATE_MONTH_MAY = 4 , AWS_DATE_MONTH_JUNE = 5 , AWS_DATE_MONTH_JULY = 6 , AWS_DATE_MONTH_AUGUST = 7 , AWS_DATE_MONTH_SEPTEMBER = 8 , AWS_DATE_MONTH_OCTOBER = 9 , AWS_DATE_MONTH_NOVEMBER = 10 , AWS_DATE_MONTH_DECEMBER = 11 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_date_day_of_week { AWS_DATE_DAY_OF_WEEK_SUNDAY = 0 , AWS_DATE_DAY_OF_WEEK_MONDAY = 1 , AWS_DATE_DAY_OF_WEEK_TUESDAY = 2 , AWS_DATE_DAY_OF_WEEK_WEDNESDAY = 3 , AWS_DATE_DAY_OF_WEEK_THURSDAY = 4 , AWS_DATE_DAY_OF_WEEK_FRIDAY = 5 , AWS_DATE_DAY_OF_WEEK_SATURDAY = 6 , } # [repr (C)] pub struct aws_date_time { pub timestamp : time_t , pub milliseconds : u16 , pub tz : [:: libc :: c_char ; 6usize] , pub gmt_time : tm , pub local_time : tm , pub utc_assumed : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_date_time"] [:: std :: mem :: size_of :: < aws_date_time > () - 136usize] ; ["Alignment of aws_date_time"] [:: std :: mem :: align_of :: < aws_date_time > () - 8usize] ; ["Offset of field: aws_date_time::timestamp"] [:: std :: mem :: offset_of ! (aws_date_time , timestamp) - 0usize] ; ["Offset of field: aws_date_time::milliseconds"] [:: std :: mem :: offset_of ! (aws_date_time , milliseconds) - 8usize] ; ["Offset of field: aws_date_time::tz"] [:: std :: mem :: offset_of ! (aws_date_time , tz) - 10usize] ; ["Offset of field: aws_date_time::gmt_time"] [:: std :: mem :: offset_of ! (aws_date_time , gmt_time) - 16usize] ; ["Offset of field: aws_date_time::local_time"] [:: std :: mem :: offset_of ! (aws_date_time , local_time) - 72usize] ; ["Offset of field: aws_date_time::utc_assumed"] [:: std :: mem :: offset_of ! (aws_date_time , utc_assumed) - 128usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Initializes dt to be the current system time."] pub fn aws_date_time_init_now (dt : * mut aws_date_time) ; } unsafe 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) ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Initializes dt to be the time represented by date_str in format 'fmt'. Returns AWS_OP_SUCCESS if the\n string was successfully parsed, returns  AWS_OP_ERR if parsing failed.\n\n The parser is lenient regarding AWS_DATE_FORMAT_ISO_8601 vs AWS_DATE_FORMAT_ISO_8601_BASIC.\n Regardless of which you pass in, both \"2002-10-02T08:05:09Z\" and \"20021002T080509Z\" would be accepted.\n\n Notes for AWS_DATE_FORMAT_RFC822:\n If no time zone information is provided, it is assumed to be local time (please don't do this).\n\n Only time zones indicating Universal Time (e.g. Z, UT, UTC, or GMT),\n or offsets from UTC (e.g. +0100, -0700), are accepted.\n\n 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) -> :: libc :: c_int ; } unsafe 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) -> :: libc :: c_int ; } unsafe 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\n return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not\n 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) -> :: libc :: c_int ; } unsafe 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\n return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not\n 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) -> :: libc :: c_int ; } unsafe 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\n will return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not\n 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) -> :: libc :: c_int ; } unsafe 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\n return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not\n 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) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_date_time_as_epoch_secs (dt : * const aws_date_time) -> f64 ; } unsafe extern "C" { pub fn aws_date_time_as_nanos (dt : * const aws_date_time) -> u64 ; } unsafe extern "C" { pub fn aws_date_time_as_millis (dt : * const aws_date_time) -> u64 ; } unsafe extern "C" { pub fn aws_date_time_year (dt : * const aws_date_time , local_time : bool) -> u16 ; } unsafe extern "C" { pub fn aws_date_time_month (dt : * const aws_date_time , local_time : bool) -> aws_date_month ; } unsafe extern "C" { pub fn aws_date_time_month_day (dt : * const aws_date_time , local_time : bool) -> u8 ; } unsafe extern "C" { pub fn aws_date_time_day_of_week (dt : * const aws_date_time , local_time : bool) -> aws_date_day_of_week ; } unsafe extern "C" { pub fn aws_date_time_hour (dt : * const aws_date_time , local_time : bool) -> u8 ; } unsafe extern "C" { pub fn aws_date_time_minute (dt : * const aws_date_time , local_time : bool) -> u8 ; } unsafe extern "C" { pub fn aws_date_time_second (dt : * const aws_date_time , local_time : bool) -> u8 ; } unsafe extern "C" { pub fn aws_date_time_dst (dt : * const aws_date_time , local_time : bool) -> bool ; } unsafe 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 ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_connection_manager { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_socket_options { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_tls_connection_options { _unused : [u8 ; 0] , } pub type aws_http_connection_manager_on_connection_setup_fn = :: std :: option :: Option < unsafe extern "C" fn (connection : * mut aws_http_connection , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_http_connection_manager_shutdown_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " Metrics for logging and debugging purpose."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_manager_metrics { # [doc = " The number of additional concurrent requests that can be supported by the HTTP manager without needing to\n establish additional connections to the target server.\n\n For connection manager, it equals to connections that's idle.\n For stream manager, it equals to the number of streams that are possible to be made without creating new\n connection, although the implementation can create new connection without fully filling it."] pub available_concurrency : usize , pub pending_concurrency_acquires : usize , pub leased_concurrency : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_manager_metrics"] [:: std :: mem :: size_of :: < aws_http_manager_metrics > () - 24usize] ; ["Alignment of aws_http_manager_metrics"] [:: std :: mem :: align_of :: < aws_http_manager_metrics > () - 8usize] ; ["Offset of field: aws_http_manager_metrics::available_concurrency"] [:: std :: mem :: offset_of ! (aws_http_manager_metrics , available_concurrency) - 0usize] ; ["Offset of field: aws_http_manager_metrics::pending_concurrency_acquires"] [:: std :: mem :: offset_of ! (aws_http_manager_metrics , pending_concurrency_acquires) - 8usize] ; ["Offset of field: aws_http_manager_metrics::leased_concurrency"] [:: std :: mem :: offset_of ! (aws_http_manager_metrics , leased_concurrency) - 16usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_connection_manager_options { pub bootstrap : * mut aws_client_bootstrap , pub initial_window_size : usize , pub socket_options : * const aws_socket_options , # [doc = " Optional (ignored if 0).\n After a request is fully sent, if the server does not begin responding within N milliseconds,\n then fail with AWS_ERROR_HTTP_RESPONSE_FIRST_BYTE_TIMEOUT.\n This can be overridden per-request by aws_http_make_request_options.response_first_byte_timeout_ms.\n TODO: Only supported in HTTP/1.1 now, support it in HTTP/2"] pub response_first_byte_timeout_ms : u64 , # [doc = " Options to create secure (HTTPS) connections.\n For secure connections, set \"h2\" in the ALPN string for HTTP/2, otherwise HTTP/1.1 is used.\n\n Leave NULL to create cleartext (HTTP) connections.\n For cleartext connections, use `http2_prior_knowledge` (RFC-7540 3.4)\n to control whether that are treated as HTTP/1.1 or HTTP/2."] pub tls_connection_options : * const aws_tls_connection_options , # [doc = " Specify whether you have prior knowledge that cleartext (HTTP) connections are HTTP/2 (RFC-7540 3.4).\n If false, then cleartext connections are treated as HTTP/1.1.\n It is illegal to set this true when secure connections are being used.\n Note that upgrading from HTTP/1.1 to HTTP/2 is not supported (RFC-7540 3.2)."] pub http2_prior_knowledge : bool , pub monitoring_options : * const aws_http_connection_monitoring_options , pub host : aws_byte_cursor , pub port : u32 , # [doc = " Optional.\n HTTP/2 specific configuration. Check `struct aws_http2_connection_options` for details of each config"] pub initial_settings_array : * const aws_http2_setting , pub num_initial_settings : usize , pub max_closed_streams : usize , pub http2_conn_manual_window_management : bool , pub proxy_options : * const aws_http_proxy_options , pub proxy_ev_settings : * const proxy_env_var_settings , pub max_connections : usize , pub shutdown_complete_user_data : * mut :: libc :: c_void , pub shutdown_complete_callback : aws_http_connection_manager_shutdown_complete_fn , # [doc = " If set to true, the read back pressure mechanism will be enabled."] pub enable_read_back_pressure : bool , # [doc = " If set to a non-zero value, then connections that stay in the pool longer than the specified\n timeout will be closed automatically."] pub max_connection_idle_in_milliseconds : u64 , # [doc = " If set to a non-zero value, aws_http_connection_manager_acquire_connection() calls\n will give up after waiting this long for a connection from the pool,\n failing with error AWS_ERROR_HTTP_CONNECTION_MANAGER_ACQUISITION_TIMEOUT."] pub connection_acquisition_timeout_ms : u64 , pub max_pending_connection_acquisitions : u64 , # [doc = " THIS IS AN EXPERIMENTAL AND UNSTABLE API\n (Optional)\n An array of network interface names. The manager will distribute the\n connections across network interface names provided in this array. If any interface name is invalid, goes down,\n or has any issues like network access, you will see connection failures. If\n `socket_options.network_interface_name` is also set, an `AWS_ERROR_INVALID_ARGUMENT` error will be raised.\n\n This option is only supported on Linux, MacOS, and platforms that have either SO_BINDTODEVICE or IP_BOUND_IF. It\n is not supported on Windows. `AWS_ERROR_PLATFORM_NOT_SUPPORTED` will be raised on unsupported platforms."] pub network_interface_names_array : * const aws_byte_cursor , pub num_network_interface_names : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_connection_manager_options"] [:: std :: mem :: size_of :: < aws_http_connection_manager_options > () - 200usize] ; ["Alignment of aws_http_connection_manager_options"] [:: std :: mem :: align_of :: < aws_http_connection_manager_options > () - 8usize] ; ["Offset of field: aws_http_connection_manager_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , bootstrap) - 0usize] ; ["Offset of field: aws_http_connection_manager_options::initial_window_size"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , initial_window_size) - 8usize] ; ["Offset of field: aws_http_connection_manager_options::socket_options"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , socket_options) - 16usize] ; ["Offset of field: aws_http_connection_manager_options::response_first_byte_timeout_ms"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , response_first_byte_timeout_ms) - 24usize] ; ["Offset of field: aws_http_connection_manager_options::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , tls_connection_options) - 32usize] ; ["Offset of field: aws_http_connection_manager_options::http2_prior_knowledge"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , http2_prior_knowledge) - 40usize] ; ["Offset of field: aws_http_connection_manager_options::monitoring_options"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , monitoring_options) - 48usize] ; ["Offset of field: aws_http_connection_manager_options::host"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , host) - 56usize] ; ["Offset of field: aws_http_connection_manager_options::port"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , port) - 72usize] ; ["Offset of field: aws_http_connection_manager_options::initial_settings_array"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , initial_settings_array) - 80usize] ; ["Offset of field: aws_http_connection_manager_options::num_initial_settings"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , num_initial_settings) - 88usize] ; ["Offset of field: aws_http_connection_manager_options::max_closed_streams"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , max_closed_streams) - 96usize] ; ["Offset of field: aws_http_connection_manager_options::http2_conn_manual_window_management"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , http2_conn_manual_window_management) - 104usize] ; ["Offset of field: aws_http_connection_manager_options::proxy_options"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , proxy_options) - 112usize] ; ["Offset of field: aws_http_connection_manager_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , proxy_ev_settings) - 120usize] ; ["Offset of field: aws_http_connection_manager_options::max_connections"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , max_connections) - 128usize] ; ["Offset of field: aws_http_connection_manager_options::shutdown_complete_user_data"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , shutdown_complete_user_data) - 136usize] ; ["Offset of field: aws_http_connection_manager_options::shutdown_complete_callback"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , shutdown_complete_callback) - 144usize] ; ["Offset of field: aws_http_connection_manager_options::enable_read_back_pressure"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , enable_read_back_pressure) - 152usize] ; ["Offset of field: aws_http_connection_manager_options::max_connection_idle_in_milliseconds"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , max_connection_idle_in_milliseconds) - 160usize] ; ["Offset of field: aws_http_connection_manager_options::connection_acquisition_timeout_ms"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , connection_acquisition_timeout_ms) - 168usize] ; ["Offset of field: aws_http_connection_manager_options::max_pending_connection_acquisitions"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , max_pending_connection_acquisitions) - 176usize] ; ["Offset of field: aws_http_connection_manager_options::network_interface_names_array"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , network_interface_names_array) - 184usize] ; ["Offset of field: aws_http_connection_manager_options::num_network_interface_names"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , num_network_interface_names) - 192usize] ; } ; impl Default for aws_http_connection_manager_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 () } } } unsafe extern "C" { pub fn aws_http_connection_manager_acquire (manager : * mut aws_http_connection_manager) ; } unsafe extern "C" { pub fn aws_http_connection_manager_release (manager : * mut aws_http_connection_manager) ; } unsafe extern "C" { pub fn aws_http_connection_manager_new (allocator : * mut aws_allocator , options : * const aws_http_connection_manager_options) -> * mut aws_http_connection_manager ; } unsafe extern "C" { pub fn aws_http_connection_manager_acquire_connection (manager : * mut aws_http_connection_manager , callback : aws_http_connection_manager_on_connection_setup_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_http_connection_manager_release_connection (manager : * mut aws_http_connection_manager , connection : * mut aws_http_connection) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Fetch the current manager metrics from connection manager."] pub fn aws_http_connection_manager_fetch_metrics (manager : * const aws_http_connection_manager , out_metrics : * mut aws_http_manager_metrics) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop_group { _unused : [u8 ; 0] , } # [doc = " Invoked upon the acquisition, or failure to acquire a retry token. This function will always be invoked if and only\n if aws_retry_strategy_acquire_retry_token() returns AWS_OP_SUCCESS. It will never be invoked synchronously from\n aws_retry_strategy_acquire_retry_token(). Token will always be NULL if error_code is non-zero, and vice-versa. If\n token is non-null, it will have a reference count of 1, and you must call aws_retry_token_release() on it later. See\n the comments for aws_retry_strategy_on_retry_ready_fn for more info."] pub type aws_retry_strategy_on_retry_token_acquired_fn = :: std :: option :: Option < unsafe extern "C" fn (retry_strategy : * mut aws_retry_strategy , error_code : :: libc :: c_int , token : * mut aws_retry_token , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked after a successful call to aws_retry_strategy_schedule_retry(). This function will always be invoked if and\n only if aws_retry_strategy_schedule_retry() returns AWS_OP_SUCCESS. It will never be invoked synchronously from\n aws_retry_strategy_schedule_retry(). After attempting the operation, either call aws_retry_strategy_schedule_retry()\n with an aws_retry_error_type or call aws_retry_token_record_success() and then release the token via.\n aws_retry_token_release()."] pub type aws_retry_strategy_on_retry_ready_fn = :: std :: option :: Option < unsafe extern "C" fn (token : * mut aws_retry_token , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Optional function to supply your own generate random implementation"] pub type aws_generate_random_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) -> u64 > ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_retry_error_type { # [doc = " This is a connection level error such as a socket timeout, socket connect error, tls negotiation timeout etc...\n Typically these should never be applied for non-idempotent request types since in this scenario, it's impossible\n to know whether the operation had a side effect on the server."] AWS_RETRY_ERROR_TYPE_TRANSIENT = 0 , # [doc = " This is an error where the server explicitly told the client to back off, such as a 429 or 503 Http error."] AWS_RETRY_ERROR_TYPE_THROTTLING = 1 , # [doc = " This is a server error that isn't explicitly throttling but is considered by the client\n to be something that should be retried."] AWS_RETRY_ERROR_TYPE_SERVER_ERROR = 2 , # [doc = " Doesn't count against any budgets. This could be something like a 401 challenge in Http."] AWS_RETRY_ERROR_TYPE_CLIENT_ERROR = 3 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_retry_strategy_vtable { pub destroy : :: std :: option :: Option < unsafe extern "C" fn (retry_strategy : * mut aws_retry_strategy) > , pub acquire_token : :: std :: option :: Option < unsafe extern "C" fn (retry_strategy : * mut aws_retry_strategy , partition_id : * const aws_byte_cursor , on_acquired : aws_retry_strategy_on_retry_token_acquired_fn , user_data : * mut :: libc :: c_void , timeout_ms : u64) -> :: libc :: c_int > , pub schedule_retry : :: std :: option :: Option < unsafe extern "C" fn (token : * mut aws_retry_token , error_type : aws_retry_error_type , retry_ready : aws_retry_strategy_on_retry_ready_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > , pub record_success : :: std :: option :: Option < unsafe extern "C" fn (token : * mut aws_retry_token) -> :: libc :: c_int > , pub release_token : :: std :: option :: Option < unsafe extern "C" fn (token : * mut aws_retry_token) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_retry_strategy_vtable"] [:: std :: mem :: size_of :: < aws_retry_strategy_vtable > () - 40usize] ; ["Alignment of aws_retry_strategy_vtable"] [:: std :: mem :: align_of :: < aws_retry_strategy_vtable > () - 8usize] ; ["Offset of field: aws_retry_strategy_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , destroy) - 0usize] ; ["Offset of field: aws_retry_strategy_vtable::acquire_token"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , acquire_token) - 8usize] ; ["Offset of field: aws_retry_strategy_vtable::schedule_retry"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , schedule_retry) - 16usize] ; ["Offset of field: aws_retry_strategy_vtable::record_success"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , record_success) - 24usize] ; ["Offset of field: aws_retry_strategy_vtable::release_token"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , release_token) - 32usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_retry_strategy { pub allocator : * mut aws_allocator , pub vtable : * mut aws_retry_strategy_vtable , pub ref_count : aws_atomic_var , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_retry_strategy"] [:: std :: mem :: size_of :: < aws_retry_strategy > () - 32usize] ; ["Alignment of aws_retry_strategy"] [:: std :: mem :: align_of :: < aws_retry_strategy > () - 8usize] ; ["Offset of field: aws_retry_strategy::allocator"] [:: std :: mem :: offset_of ! (aws_retry_strategy , allocator) - 0usize] ; ["Offset of field: aws_retry_strategy::vtable"] [:: std :: mem :: offset_of ! (aws_retry_strategy , vtable) - 8usize] ; ["Offset of field: aws_retry_strategy::ref_count"] [:: std :: mem :: offset_of ! (aws_retry_strategy , ref_count) - 16usize] ; ["Offset of field: aws_retry_strategy::impl_"] [:: std :: mem :: offset_of ! (aws_retry_strategy , impl_) - 24usize] ; } ; impl Default for aws_retry_strategy { 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)] pub struct aws_retry_token { pub allocator : * mut aws_allocator , pub retry_strategy : * mut aws_retry_strategy , pub ref_count : aws_atomic_var , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_retry_token"] [:: std :: mem :: size_of :: < aws_retry_token > () - 32usize] ; ["Alignment of aws_retry_token"] [:: std :: mem :: align_of :: < aws_retry_token > () - 8usize] ; ["Offset of field: aws_retry_token::allocator"] [:: std :: mem :: offset_of ! (aws_retry_token , allocator) - 0usize] ; ["Offset of field: aws_retry_token::retry_strategy"] [:: std :: mem :: offset_of ! (aws_retry_token , retry_strategy) - 8usize] ; ["Offset of field: aws_retry_token::ref_count"] [:: std :: mem :: offset_of ! (aws_retry_token , ref_count) - 16usize] ; ["Offset of field: aws_retry_token::impl_"] [:: std :: mem :: offset_of ! (aws_retry_token , impl_) - 24usize] ; } ; impl Default for aws_retry_token { 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 (u32)] # [non_exhaustive] # [doc = " Jitter mode for exponential backoff.\n\n For a great writeup on these options see:\n https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_exponential_backoff_jitter_mode { AWS_EXPONENTIAL_BACKOFF_JITTER_DEFAULT = 0 , AWS_EXPONENTIAL_BACKOFF_JITTER_NONE = 1 , AWS_EXPONENTIAL_BACKOFF_JITTER_FULL = 2 , AWS_EXPONENTIAL_BACKOFF_JITTER_DECORRELATED = 3 , } # [doc = " Options for exponential backoff retry strategy. el_group must be set, any other option, if set to 0 will signify\n \"use defaults\""] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_exponential_backoff_retry_options { pub el_group : * mut aws_event_loop_group , pub max_retries : usize , pub backoff_scale_factor_ms : u32 , pub max_backoff_secs : u32 , # [doc = " Jitter mode to use, see comments for aws_exponential_backoff_jitter_mode.\n Default is AWS_EXPONENTIAL_BACKOFF_JITTER_DEFAULT"] pub jitter_mode : aws_exponential_backoff_jitter_mode , # [doc = " Deprecated. Use generate_random_impl instead\n By default this will be set to use aws_device_random. If you want something else, set it here."] pub generate_random : :: std :: option :: Option < unsafe extern "C" fn () -> u64 > , pub generate_random_impl : aws_generate_random_fn , # [doc = " Optional user data for the generate random generate_random_impl."] pub generate_random_user_data : * mut :: libc :: c_void , # [doc = " Optional shutdown callback that gets invoked, with appropriate user data,\n when the resources used by the retry_strategy are no longer in use."] pub shutdown_options : * const aws_shutdown_callback_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_exponential_backoff_retry_options"] [:: std :: mem :: size_of :: < aws_exponential_backoff_retry_options > () - 64usize] ; ["Alignment of aws_exponential_backoff_retry_options"] [:: std :: mem :: align_of :: < aws_exponential_backoff_retry_options > () - 8usize] ; ["Offset of field: aws_exponential_backoff_retry_options::el_group"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , el_group) - 0usize] ; ["Offset of field: aws_exponential_backoff_retry_options::max_retries"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , max_retries) - 8usize] ; ["Offset of field: aws_exponential_backoff_retry_options::backoff_scale_factor_ms"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , backoff_scale_factor_ms) - 16usize] ; ["Offset of field: aws_exponential_backoff_retry_options::max_backoff_secs"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , max_backoff_secs) - 20usize] ; ["Offset of field: aws_exponential_backoff_retry_options::jitter_mode"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , jitter_mode) - 24usize] ; ["Offset of field: aws_exponential_backoff_retry_options::generate_random"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , generate_random) - 32usize] ; ["Offset of field: aws_exponential_backoff_retry_options::generate_random_impl"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , generate_random_impl) - 40usize] ; ["Offset of field: aws_exponential_backoff_retry_options::generate_random_user_data"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , generate_random_user_data) - 48usize] ; ["Offset of field: aws_exponential_backoff_retry_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , shutdown_options) - 56usize] ; } ; impl Default for aws_exponential_backoff_retry_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)] pub struct aws_no_retry_options { # [doc = " Optional shutdown callback that gets invoked, with appropriate user data,\n when the resources used by the retry_strategy are no longer in use."] pub shutdown_options : * const aws_shutdown_callback_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_no_retry_options"] [:: std :: mem :: size_of :: < aws_no_retry_options > () - 8usize] ; ["Alignment of aws_no_retry_options"] [:: std :: mem :: align_of :: < aws_no_retry_options > () - 8usize] ; ["Offset of field: aws_no_retry_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_no_retry_options , shutdown_options) - 0usize] ; } ; impl Default for aws_no_retry_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)] pub struct aws_standard_retry_options { pub backoff_retry_options : aws_exponential_backoff_retry_options , # [doc = " capacity for partitions. Defaults to 500"] pub initial_bucket_capacity : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_standard_retry_options"] [:: std :: mem :: size_of :: < aws_standard_retry_options > () - 72usize] ; ["Alignment of aws_standard_retry_options"] [:: std :: mem :: align_of :: < aws_standard_retry_options > () - 8usize] ; ["Offset of field: aws_standard_retry_options::backoff_retry_options"] [:: std :: mem :: offset_of ! (aws_standard_retry_options , backoff_retry_options) - 0usize] ; ["Offset of field: aws_standard_retry_options::initial_bucket_capacity"] [:: std :: mem :: offset_of ! (aws_standard_retry_options , initial_bucket_capacity) - 64usize] ; } ; impl Default for aws_standard_retry_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 () } } } unsafe extern "C" { # [doc = " Acquire a reference count on retry_strategy."] pub fn aws_retry_strategy_acquire (retry_strategy : * mut aws_retry_strategy) ; } unsafe extern "C" { # [doc = " Releases a reference count on retry_strategy."] pub fn aws_retry_strategy_release (retry_strategy : * mut aws_retry_strategy) ; } unsafe extern "C" { # [doc = " Attempts to acquire a retry token for use with retries. On success, on_acquired will be invoked when a token is\n available, or an error will be returned if the timeout expires. partition_id identifies operations that should be\n grouped together. This allows for more sophisticated strategies such as AIMD and circuit breaker patterns. Pass NULL\n to use the global partition."] pub fn aws_retry_strategy_acquire_retry_token (retry_strategy : * mut aws_retry_strategy , partition_id : * const aws_byte_cursor , on_acquired : aws_retry_strategy_on_retry_token_acquired_fn , user_data : * mut :: libc :: c_void , timeout_ms : u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Schedules a retry based on the backoff and token based strategies. retry_ready is invoked when the retry is either\n ready for execution or if it has been canceled due to application shutdown.\n\n This function can return an error to reject the retry attempt if, for example, a circuit breaker has opened. If this\n occurs users should fail their calls back to their callers.\n\n error_type is used for book keeping. See the comments above for aws_retry_error_type."] pub fn aws_retry_strategy_schedule_retry (token : * mut aws_retry_token , error_type : aws_retry_error_type , retry_ready : aws_retry_strategy_on_retry_ready_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Records a successful retry. This is used for making future decisions to open up token buckets, AIMD breakers etc...\n some strategies such as exponential backoff will ignore this, but you should always call it after a successful\n operation or your system will never recover during an outage."] pub fn aws_retry_token_record_success (token : * mut aws_retry_token) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Increments reference count for token. This should be called any time you seat the token to a pointer you own."] pub fn aws_retry_token_acquire (token : * mut aws_retry_token) ; } unsafe extern "C" { # [doc = " Releases the reference count for token. This should always be invoked after either calling\n aws_retry_strategy_schedule_retry() and failing, or after calling aws_retry_token_record_success()."] pub fn aws_retry_token_release (token : * mut aws_retry_token) ; } unsafe extern "C" { # [doc = " Creates a retry strategy using exponential backoff. This strategy does not perform any bookkeeping on error types and\n success. There is no circuit breaker functionality in here. See the comments above for\n aws_exponential_backoff_retry_options."] pub fn aws_retry_strategy_new_exponential_backoff (allocator : * mut aws_allocator , config : * const aws_exponential_backoff_retry_options) -> * mut aws_retry_strategy ; } unsafe extern "C" { # [doc = " This is a retry implementation that cuts off traffic if it's\n detected that an endpoint partition is having availability\n problems. This is necessary to keep from making outages worse\n by scheduling work that's unlikely to succeed yet increases\n load on an already ailing system.\n\n We do this by creating a bucket for each partition. A partition\n is an arbitrary specifier. It can be anything: a region, a service,\n a combination of region and service, a literal dns name.... doesn't matter.\n\n Each bucket has a budget for maximum allowed retries. Different types of events\n carry different weights. Things that indicate an unhealthy partition such as\n transient errors (timeouts, unhealthy connection etc...) cost more.\n A retry for any other reason (service sending a 5xx response code) cost a bit less.\n When a retry is attempted this capacity is leased out to the retry. On success it is\n released back to the capacity pool. On failure, it remains leased.\n Operations that succeed without a retry slowly restore the capacity pool.\n\n If a partition runs out of capacity it is assumed unhealthy and retries will be blocked\n until capacity returns to the pool. To prevent a partition from staying unhealthy after\n an outage has recovered, new requests that succeed without a retry will increase the capacity\n slowly ( a new request gets a payback lease of 1, but the lease is never actually deducted from the capacity pool)."] pub fn aws_retry_strategy_new_standard (allocator : * mut aws_allocator , config : * const aws_standard_retry_options) -> * mut aws_retry_strategy ; } unsafe extern "C" { # [doc = " This retry strategy is used to disable retries. Passed config can be null.\n Calling `aws_retry_strategy_acquire_retry_token` will raise error `AWS_IO_RETRY_PERMISSION_DENIED`.\n Calling any function apart from the `aws_retry_strategy_acquire_retry_token` and `aws_retry_strategy_release` will\n result in a fatal error."] pub fn aws_retry_strategy_new_no_retry (allocator : * mut aws_allocator , config : * const aws_no_retry_options) -> * mut aws_retry_strategy ; } pub type aws_imds_client_shutdown_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " Optional callback and user data to be invoked when an imds client has fully shut down"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_imds_client_shutdown_options { pub shutdown_callback : aws_imds_client_shutdown_completed_fn , pub shutdown_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_imds_client_shutdown_options"] [:: std :: mem :: size_of :: < aws_imds_client_shutdown_options > () - 16usize] ; ["Alignment of aws_imds_client_shutdown_options"] [:: std :: mem :: align_of :: < aws_imds_client_shutdown_options > () - 8usize] ; ["Offset of field: aws_imds_client_shutdown_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_imds_client_shutdown_options , shutdown_callback) - 0usize] ; ["Offset of field: aws_imds_client_shutdown_options::shutdown_user_data"] [:: std :: mem :: offset_of ! (aws_imds_client_shutdown_options , shutdown_user_data) - 8usize] ; } ; impl Default for aws_imds_client_shutdown_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 () } } } # [doc = " Configuration options when creating an imds client"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_imds_client_options { pub shutdown_options : aws_imds_client_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub retry_strategy : * mut aws_retry_strategy , pub proxy_ev_settings : * const proxy_env_var_settings , pub imds_version : aws_imds_protocol_version , pub ec2_metadata_v1_disabled : bool , pub function_table : * mut aws_auth_http_system_vtable , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_imds_client_options"] [:: std :: mem :: size_of :: < aws_imds_client_options > () - 56usize] ; ["Alignment of aws_imds_client_options"] [:: std :: mem :: align_of :: < aws_imds_client_options > () - 8usize] ; ["Offset of field: aws_imds_client_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_imds_client_options , shutdown_options) - 0usize] ; ["Offset of field: aws_imds_client_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_imds_client_options , bootstrap) - 16usize] ; ["Offset of field: aws_imds_client_options::retry_strategy"] [:: std :: mem :: offset_of ! (aws_imds_client_options , retry_strategy) - 24usize] ; ["Offset of field: aws_imds_client_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_imds_client_options , proxy_ev_settings) - 32usize] ; ["Offset of field: aws_imds_client_options::imds_version"] [:: std :: mem :: offset_of ! (aws_imds_client_options , imds_version) - 40usize] ; ["Offset of field: aws_imds_client_options::ec2_metadata_v1_disabled"] [:: std :: mem :: offset_of ! (aws_imds_client_options , ec2_metadata_v1_disabled) - 44usize] ; ["Offset of field: aws_imds_client_options::function_table"] [:: std :: mem :: offset_of ! (aws_imds_client_options , function_table) - 48usize] ; } ; impl Default for aws_imds_client_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_imds_client_on_get_resource_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (resource : * const aws_byte_buf , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-categories.html"] # [repr (C)] pub struct aws_imds_iam_profile { pub last_updated : aws_date_time , pub instance_profile_arn : aws_byte_cursor , pub instance_profile_id : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_imds_iam_profile"] [:: std :: mem :: size_of :: < aws_imds_iam_profile > () - 168usize] ; ["Alignment of aws_imds_iam_profile"] [:: std :: mem :: align_of :: < aws_imds_iam_profile > () - 8usize] ; ["Offset of field: aws_imds_iam_profile::last_updated"] [:: std :: mem :: offset_of ! (aws_imds_iam_profile , last_updated) - 0usize] ; ["Offset of field: aws_imds_iam_profile::instance_profile_arn"] [:: std :: mem :: offset_of ! (aws_imds_iam_profile , instance_profile_arn) - 136usize] ; ["Offset of field: aws_imds_iam_profile::instance_profile_id"] [:: std :: mem :: offset_of ! (aws_imds_iam_profile , instance_profile_id) - 152usize] ; } ; impl Default for aws_imds_iam_profile { 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 = " Block of per-instance EC2-specific data\n\n https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html"] # [repr (C)] pub struct aws_imds_instance_info { pub marketplace_product_codes : aws_array_list , pub availability_zone : aws_byte_cursor , pub private_ip : aws_byte_cursor , pub version : aws_byte_cursor , pub instance_id : aws_byte_cursor , pub billing_products : aws_array_list , pub instance_type : aws_byte_cursor , pub account_id : aws_byte_cursor , pub image_id : aws_byte_cursor , pub pending_time : aws_date_time , pub architecture : aws_byte_cursor , pub kernel_id : aws_byte_cursor , pub ramdisk_id : aws_byte_cursor , pub region : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_imds_instance_info"] [:: std :: mem :: size_of :: < aws_imds_instance_info > () - 392usize] ; ["Alignment of aws_imds_instance_info"] [:: std :: mem :: align_of :: < aws_imds_instance_info > () - 8usize] ; ["Offset of field: aws_imds_instance_info::marketplace_product_codes"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , marketplace_product_codes) - 0usize] ; ["Offset of field: aws_imds_instance_info::availability_zone"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , availability_zone) - 40usize] ; ["Offset of field: aws_imds_instance_info::private_ip"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , private_ip) - 56usize] ; ["Offset of field: aws_imds_instance_info::version"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , version) - 72usize] ; ["Offset of field: aws_imds_instance_info::instance_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , instance_id) - 88usize] ; ["Offset of field: aws_imds_instance_info::billing_products"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , billing_products) - 104usize] ; ["Offset of field: aws_imds_instance_info::instance_type"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , instance_type) - 144usize] ; ["Offset of field: aws_imds_instance_info::account_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , account_id) - 160usize] ; ["Offset of field: aws_imds_instance_info::image_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , image_id) - 176usize] ; ["Offset of field: aws_imds_instance_info::pending_time"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , pending_time) - 192usize] ; ["Offset of field: aws_imds_instance_info::architecture"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , architecture) - 328usize] ; ["Offset of field: aws_imds_instance_info::kernel_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , kernel_id) - 344usize] ; ["Offset of field: aws_imds_instance_info::ramdisk_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , ramdisk_id) - 360usize] ; ["Offset of field: aws_imds_instance_info::region"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , region) - 376usize] ; } ; impl Default for aws_imds_instance_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 () } } } pub type aws_imds_client_on_get_array_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (array : * const aws_array_list , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_imds_client_on_get_credentials_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (credentials : * const aws_credentials , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_imds_client_on_get_iam_profile_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (iam_profile_info : * const aws_imds_iam_profile , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_imds_client_on_get_instance_info_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (instance_info : * const aws_imds_instance_info , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " AWS EC2 Metadata Client is used to retrieve AWS EC2 Instance Metadata info."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_imds_client { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " Creates a new imds client\n\n @param allocator memory allocator to use for creation and queries\n @param options configuration options for the imds client\n\n @return a newly-constructed imds client, or NULL on failure"] pub fn aws_imds_client_new (allocator : * mut aws_allocator , options : * const aws_imds_client_options) -> * mut aws_imds_client ; } unsafe extern "C" { # [doc = " Increments the ref count on the client\n\n @param client imds client to acquire a reference to"] pub fn aws_imds_client_acquire (client : * mut aws_imds_client) ; } unsafe extern "C" { # [doc = " Decrements the ref count on the client\n\n @param client imds client to release a reference to"] pub fn aws_imds_client_release (client : * mut aws_imds_client) ; } unsafe extern "C" { # [doc = " Queries a generic resource (string) from the ec2 instance metadata document\n\n @param client imds client to use for the query\n @param resource_path path of the resource to query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_resource_async (client : * mut aws_imds_client , resource_path : aws_byte_cursor , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the ami id of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ami_id (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the ami launch index of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ami_launch_index (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the ami manifest path of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ami_manifest_path (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the list of ancestor ami ids of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ancestor_ami_ids (client : * mut aws_imds_client , callback : aws_imds_client_on_get_array_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the instance-action of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_action (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the instance id of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_id (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the instance type of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_type (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the mac address of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_mac_address (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the private ip address of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_private_ip_address (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the availability zone of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_availability_zone (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the product codes of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_product_codes (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the public key of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_public_key (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the ramdisk id of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ramdisk_id (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the reservation id of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_reservation_id (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the list of the security groups of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_security_groups (client : * mut aws_imds_client , callback : aws_imds_client_on_get_array_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the list of block device mappings of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_block_device_mapping (client : * mut aws_imds_client , callback : aws_imds_client_on_get_array_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the attached iam role of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_attached_iam_role (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets temporary credentials based on the attached iam role of the ec2 instance\n\n @param client imds client to use for the query\n @param iam_role_name iam role name to get temporary credentials through\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_credentials (client : * mut aws_imds_client , iam_role_name : aws_byte_cursor , callback : aws_imds_client_on_get_credentials_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the iam profile information of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_iam_profile (client : * mut aws_imds_client , callback : aws_imds_client_on_get_iam_profile_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the user data of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_user_data (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the signature of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_signature (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the instance information data block of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_info (client : * mut aws_imds_client , callback : aws_imds_client_on_get_instance_info_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_hash_vtable { pub alg_name : * const :: libc :: c_char , pub provider : * const :: libc :: c_char , pub destroy : :: std :: option :: Option < unsafe extern "C" fn (hash : * mut aws_hash) > , pub update : :: std :: option :: Option < unsafe extern "C" fn (hash : * mut aws_hash , buf : * const aws_byte_cursor) -> :: libc :: c_int > , pub finalize : :: std :: option :: Option < unsafe extern "C" fn (hash : * mut aws_hash , out : * mut aws_byte_buf) -> :: libc :: c_int > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash_vtable"] [:: std :: mem :: size_of :: < aws_hash_vtable > () - 40usize] ; ["Alignment of aws_hash_vtable"] [:: std :: mem :: align_of :: < aws_hash_vtable > () - 8usize] ; ["Offset of field: aws_hash_vtable::alg_name"] [:: std :: mem :: offset_of ! (aws_hash_vtable , alg_name) - 0usize] ; ["Offset of field: aws_hash_vtable::provider"] [:: std :: mem :: offset_of ! (aws_hash_vtable , provider) - 8usize] ; ["Offset of field: aws_hash_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_hash_vtable , destroy) - 16usize] ; ["Offset of field: aws_hash_vtable::update"] [:: std :: mem :: offset_of ! (aws_hash_vtable , update) - 24usize] ; ["Offset of field: aws_hash_vtable::finalize"] [:: std :: mem :: offset_of ! (aws_hash_vtable , finalize) - 32usize] ; } ; impl Default for aws_hash_vtable { 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)] pub struct aws_hash { pub allocator : * mut aws_allocator , pub vtable : * mut aws_hash_vtable , pub digest_size : usize , pub good : bool , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash"] [:: std :: mem :: size_of :: < aws_hash > () - 40usize] ; ["Alignment of aws_hash"] [:: std :: mem :: align_of :: < aws_hash > () - 8usize] ; ["Offset of field: aws_hash::allocator"] [:: std :: mem :: offset_of ! (aws_hash , allocator) - 0usize] ; ["Offset of field: aws_hash::vtable"] [:: std :: mem :: offset_of ! (aws_hash , vtable) - 8usize] ; ["Offset of field: aws_hash::digest_size"] [:: std :: mem :: offset_of ! (aws_hash , digest_size) - 16usize] ; ["Offset of field: aws_hash::good"] [:: std :: mem :: offset_of ! (aws_hash , good) - 24usize] ; ["Offset of field: aws_hash::impl_"] [:: std :: mem :: offset_of ! (aws_hash , impl_) - 32usize] ; } ; impl Default for aws_hash { 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_hash_new_fn = :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator) -> * mut aws_hash > ; unsafe extern "C" { # [doc = " Allocates and initializes a sha512 hash instance."] pub fn aws_sha512_new (allocator : * mut aws_allocator) -> * mut aws_hash ; } unsafe extern "C" { # [doc = " Allocates and initializes a sha256 hash instance."] pub fn aws_sha256_new (allocator : * mut aws_allocator) -> * mut aws_hash ; } unsafe extern "C" { # [doc = " Allocates and initializes a sha1 hash instance."] pub fn aws_sha1_new (allocator : * mut aws_allocator) -> * mut aws_hash ; } unsafe extern "C" { # [doc = " Allocates and initializes an md5 hash instance."] pub fn aws_md5_new (allocator : * mut aws_allocator) -> * mut aws_hash ; } unsafe extern "C" { # [doc = " Cleans up and deallocates hash."] pub fn aws_hash_destroy (hash : * mut aws_hash) ; } unsafe extern "C" { # [doc = " Updates the running hash with to_hash. this can be called multiple times."] pub fn aws_hash_update (hash : * mut aws_hash , to_hash : * const aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Completes the hash computation and writes the final digest to output.\n Allocation of output is the caller's responsibility. If you specify\n truncate_to to something other than 0, the output will be truncated to that\n number of bytes. For example, if you want a SHA256 digest as the first 16\n bytes, set truncate_to to 16. If you want the full digest size, just set this\n to 0."] pub fn aws_hash_finalize (hash : * mut aws_hash , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Computes the md5 hash over input and writes the digest output to 'output'.\n Use this if you don't need to stream the data you're hashing and you can load\n the entire input to hash into memory."] pub fn aws_md5_compute (allocator : * mut aws_allocator , input : * const aws_byte_cursor , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Computes the sha512 hash over input and writes the digest output to 'output'.\n Use this if you don't need to stream the data you're hashing and you can load\n the entire input to hash into memory. If you specify truncate_to to something\n other than 0, the output will be truncated to that number of bytes. For\n example, if you want a SHA512 digest as the first 16 bytes, set truncate_to\n to 16. If you want the full digest size, just set this to 0."] pub fn aws_sha512_compute (allocator : * mut aws_allocator , input : * const aws_byte_cursor , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Computes the sha256 hash over input and writes the digest output to 'output'.\n Use this if you don't need to stream the data you're hashing and you can load\n the entire input to hash into memory. If you specify truncate_to to something\n other than 0, the output will be truncated to that number of bytes. For\n example, if you want a SHA256 digest as the first 16 bytes, set truncate_to\n to 16. If you want the full digest size, just set this to 0."] pub fn aws_sha256_compute (allocator : * mut aws_allocator , input : * const aws_byte_cursor , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Computes the sha1 hash over input and writes the digest output to 'output'.\n Use this if you don't need to stream the data you're hashing and you can load\n the entire input to hash into memory. If you specify truncate_to to something\n other than 0, the output will be truncated to that number of bytes. For\n example, if you want a SHA1 digest as the first 16 bytes, set truncate_to\n to 16. If you want the full digest size, just set this to 0."] pub fn aws_sha1_compute (allocator : * mut aws_allocator , input : * const aws_byte_cursor , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set the implementation of md5 to use. If you compiled without BYO_CRYPTO,\n you do not need to call this. However, if use this, we will honor it,\n regardless of compile options. This may be useful for testing purposes. If\n you did set BYO_CRYPTO, and you do not call this function you will\n segfault."] pub fn aws_set_md5_new_fn (fn_ : aws_hash_new_fn) ; } unsafe extern "C" { # [doc = " Set the implementation of sha512 to use. If you compiled without\n BYO_CRYPTO, you do not need to call this. However, if use this, we will\n honor it, regardless of compile options. This may be useful for testing\n purposes. If you did set BYO_CRYPTO, and you do not call this function\n you will segfault."] pub fn aws_set_sha512_new_fn (fn_ : aws_hash_new_fn) ; } unsafe extern "C" { # [doc = " Set the implementation of sha256 to use. If you compiled without\n BYO_CRYPTO, you do not need to call this. However, if use this, we will\n honor it, regardless of compile options. This may be useful for testing\n purposes. If you did set BYO_CRYPTO, and you do not call this function\n you will segfault."] pub fn aws_set_sha256_new_fn (fn_ : aws_hash_new_fn) ; } unsafe extern "C" { # [doc = " Set the implementation of sha1 to use. If you compiled without\n BYO_CRYPTO, you do not need to call this. However, if use this, we will\n honor it, regardless of compile options. This may be useful for testing\n purposes. If you did set BYO_CRYPTO, and you do not call this function\n you will segfault."] pub fn aws_set_sha1_new_fn (fn_ : aws_hash_new_fn) ; } unsafe extern "C" { # [doc = " The entry point function to perform a CRC32 (Ethernet, gzip) computation.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc32 parameter as an initial value unless continuing\n to update a running crc in a subsequent call."] pub fn aws_checksums_crc32 (input : * const u8 , length : :: libc :: c_int , previous_crc32 : u32) -> u32 ; } unsafe extern "C" { # [doc = " The entry point function to perform a CRC32 (Ethernet, gzip) computation.\n Supports buffer lengths up to size_t max.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc32 parameter as an initial value unless continuing\n to update a running crc in a subsequent call."] pub fn aws_checksums_crc32_ex (input : * const u8 , length : usize , previous_crc32 : u32) -> u32 ; } unsafe extern "C" { # [doc = " The entry point function to perform a Castagnoli CRC32c (iSCSI) computation.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc32 parameter as an initial value unless continuing\n to update a running crc in a subsequent call."] pub fn aws_checksums_crc32c (input : * const u8 , length : :: libc :: c_int , previous_crc32c : u32) -> u32 ; } unsafe extern "C" { # [doc = " The entry point function to perform a Castagnoli CRC32c (iSCSI) computation.\n Supports buffer lengths up to size_t max.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc32 parameter as an initial value unless continuing\n to update a running crc in a subsequent call."] pub fn aws_checksums_crc32c_ex (input : * const u8 , length : usize , previous_crc32c : u32) -> u32 ; } unsafe extern "C" { # [doc = " The entry point function to perform a CRC64-NVME (a.k.a. CRC64-Rocksoft) computation.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc64 parameter as an initial value unless continuing\n to update a running crc in a subsequent call.\n There are many variants of CRC64 algorithms. This CRC64 variant is bit-reflected (based on\n the non bit-reflected polynomial 0xad93d23594c93659) and inverts the CRC input and output bits."] pub fn aws_checksums_crc64nvme (input : * const u8 , length : :: libc :: c_int , previous_crc64 : u64) -> u64 ; } unsafe extern "C" { # [doc = " The entry point function to perform a CRC64-NVME (a.k.a. CRC64-Rocksoft) computation.\n Supports buffer lengths up to size_t max.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc64 parameter as an initial value unless continuing\n to update a running crc in a subsequent call.\n There are many variants of CRC64 algorithms. This CRC64 variant is bit-reflected (based on\n the non bit-reflected polynomial 0xad93d23594c93659) and inverts the CRC input and output bits."] pub fn aws_checksums_crc64nvme_ex (input : * const u8 , length : usize , previous_crc64 : u64) -> u64 ; } unsafe extern "C" { # [doc = " Combines two CRC32 (Ethernet, gzip) checksums computed over separate data blocks.\n This is equivalent to computing the CRC32 of the concatenated data blocks without\n having to re-scan the data.\n\n Given:\n   crc1 = CRC32(data_block_A)\n   crc2 = CRC32(data_block_B)\n\n This function computes:\n   result = CRC32(data_block_A || data_block_B)\n\n @param crc1 The CRC32 checksum of the first data block\n @param crc2 The CRC32 checksum of the second data block\n @param len2 The length (in bytes) of the original data that produced crc2.\n             This is NOT the size of the checksum (which is always 4 bytes),\n             but rather the size of the data block that was checksummed.\n @return The combined CRC32 checksum as if computed over the concatenated data"] pub fn aws_checksums_crc32_combine (crc1 : u32 , crc2 : u32 , len2 : u64) -> u32 ; } unsafe extern "C" { # [doc = " Combines two CRC32C (Castagnoli, iSCSI) checksums computed over separate data blocks.\n This is equivalent to computing the CRC32C of the concatenated data blocks without\n having to re-scan the data.\n\n Given:\n   crc1 = CRC32C(data_block_A)\n   crc2 = CRC32C(data_block_B)\n\n This function computes:\n   result = CRC32C(data_block_A || data_block_B)\n\n @param crc1 The CRC32C checksum of the first data block\n @param crc2 The CRC32C checksum of the second data block\n @param len2 The length (in bytes) of the original data that produced crc2.\n             This is NOT the size of the checksum (which is always 4 bytes),\n             but rather the size of the data block that was checksummed.\n @return The combined CRC32C checksum as if computed over the concatenated data"] pub fn aws_checksums_crc32c_combine (crc1 : u32 , crc2 : u32 , len2 : u64) -> u32 ; } unsafe extern "C" { # [doc = " Combines two CRC64-NVME (CRC64-Rocksoft) checksums computed over separate data blocks.\n This is equivalent to computing the CRC64-NVME of the concatenated data blocks without\n having to re-scan the data.\n\n Given:\n   crc1 = CRC64_NVME(data_block_A)\n   crc2 = CRC64_NVME(data_block_B)\n\n This function computes:\n   result = CRC64_NVME(data_block_A || data_block_B)\n\n @param crc1 The CRC64-NVME checksum of the first data block\n @param crc2 The CRC64-NVME checksum of the second data block\n @param len2 The length (in bytes) of the original data that produced crc2.\n             This is NOT the size of the checksum (which is always 8 bytes),\n             but rather the size of the data block that was checksummed.\n @return The combined CRC64-NVME checksum as if computed over the concatenated data"] pub fn aws_checksums_crc64nvme_combine (crc1 : u64 , crc2 : u64 , len2 : u64) -> u64 ; } pub type aws_log_channel_send_fn = :: std :: option :: Option < unsafe extern "C" fn (channel : * mut aws_log_channel , output : * mut aws_string) -> :: libc :: 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)] pub struct aws_log_channel_vtable { pub send : aws_log_channel_send_fn , pub clean_up : aws_log_channel_clean_up_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_channel_vtable"] [:: std :: mem :: size_of :: < aws_log_channel_vtable > () - 16usize] ; ["Alignment of aws_log_channel_vtable"] [:: std :: mem :: align_of :: < aws_log_channel_vtable > () - 8usize] ; ["Offset of field: aws_log_channel_vtable::send"] [:: std :: mem :: offset_of ! (aws_log_channel_vtable , send) - 0usize] ; ["Offset of field: aws_log_channel_vtable::clean_up"] [:: std :: mem :: offset_of ! (aws_log_channel_vtable , clean_up) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] 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 :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_channel"] [:: std :: mem :: size_of :: < aws_log_channel > () - 32usize] ; ["Alignment of aws_log_channel"] [:: std :: mem :: align_of :: < aws_log_channel > () - 8usize] ; ["Offset of field: aws_log_channel::vtable"] [:: std :: mem :: offset_of ! (aws_log_channel , vtable) - 0usize] ; ["Offset of field: aws_log_channel::allocator"] [:: std :: mem :: offset_of ! (aws_log_channel , allocator) - 8usize] ; ["Offset of field: aws_log_channel::writer"] [:: std :: mem :: offset_of ! (aws_log_channel , writer) - 16usize] ; ["Offset of field: aws_log_channel::impl_"] [:: std :: mem :: offset_of ! (aws_log_channel , impl_) - 24usize] ; } ; 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 () } } } unsafe extern "C" { pub fn aws_log_channel_init_foreground (channel : * mut aws_log_channel , allocator : * mut aws_allocator , writer : * mut aws_log_writer) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_channel_init_background (channel : * mut aws_log_channel , allocator : * mut aws_allocator , writer : * mut aws_log_writer) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_channel_clean_up (channel : * mut aws_log_channel) ; } pub type aws_log_formatter_format_fn = :: std :: option :: Option < unsafe extern "C" fn (formatter : * mut aws_log_formatter , formatted_output : * mut * mut aws_string , level : aws_log_level :: Type , subject : aws_log_subject_t , format : * const :: libc :: c_char , args : * mut __va_list_tag) -> :: libc :: 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)] pub struct aws_log_formatter_vtable { pub format : aws_log_formatter_format_fn , pub clean_up : aws_log_formatter_clean_up_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_formatter_vtable"] [:: std :: mem :: size_of :: < aws_log_formatter_vtable > () - 16usize] ; ["Alignment of aws_log_formatter_vtable"] [:: std :: mem :: align_of :: < aws_log_formatter_vtable > () - 8usize] ; ["Offset of field: aws_log_formatter_vtable::format"] [:: std :: mem :: offset_of ! (aws_log_formatter_vtable , format) - 0usize] ; ["Offset of field: aws_log_formatter_vtable::clean_up"] [:: std :: mem :: offset_of ! (aws_log_formatter_vtable , clean_up) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_log_formatter { pub vtable : * mut aws_log_formatter_vtable , pub allocator : * mut aws_allocator , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_formatter"] [:: std :: mem :: size_of :: < aws_log_formatter > () - 24usize] ; ["Alignment of aws_log_formatter"] [:: std :: mem :: align_of :: < aws_log_formatter > () - 8usize] ; ["Offset of field: aws_log_formatter::vtable"] [:: std :: mem :: offset_of ! (aws_log_formatter , vtable) - 0usize] ; ["Offset of field: aws_log_formatter::allocator"] [:: std :: mem :: offset_of ! (aws_log_formatter , allocator) - 8usize] ; ["Offset of field: aws_log_formatter::impl_"] [:: std :: mem :: offset_of ! (aws_log_formatter , impl_) - 16usize] ; } ; 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)] pub struct aws_log_formatter_standard_options { pub date_format : aws_date_format , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_formatter_standard_options"] [:: std :: mem :: size_of :: < aws_log_formatter_standard_options > () - 4usize] ; ["Alignment of aws_log_formatter_standard_options"] [:: std :: mem :: align_of :: < aws_log_formatter_standard_options > () - 4usize] ; ["Offset of field: aws_log_formatter_standard_options::date_format"] [:: std :: mem :: offset_of ! (aws_log_formatter_standard_options , date_format) - 0usize] ; } ; 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)] pub struct aws_logging_standard_formatting_data { pub log_line_buffer : * mut :: libc :: c_char , pub total_length : usize , pub level : aws_log_level :: Type , pub subject_name : * const :: libc :: c_char , pub format : * const :: libc :: c_char , pub date_format : aws_date_format , pub allocator : * mut aws_allocator , pub amount_written : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logging_standard_formatting_data"] [:: std :: mem :: size_of :: < aws_logging_standard_formatting_data > () - 64usize] ; ["Alignment of aws_logging_standard_formatting_data"] [:: std :: mem :: align_of :: < aws_logging_standard_formatting_data > () - 8usize] ; ["Offset of field: aws_logging_standard_formatting_data::log_line_buffer"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , log_line_buffer) - 0usize] ; ["Offset of field: aws_logging_standard_formatting_data::total_length"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , total_length) - 8usize] ; ["Offset of field: aws_logging_standard_formatting_data::level"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , level) - 16usize] ; ["Offset of field: aws_logging_standard_formatting_data::subject_name"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , subject_name) - 24usize] ; ["Offset of field: aws_logging_standard_formatting_data::format"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , format) - 32usize] ; ["Offset of field: aws_logging_standard_formatting_data::date_format"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , date_format) - 40usize] ; ["Offset of field: aws_logging_standard_formatting_data::allocator"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , allocator) - 48usize] ; ["Offset of field: aws_logging_standard_formatting_data::amount_written"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , amount_written) - 56usize] ; } ; 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 () } } } unsafe 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) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_formatter_clean_up (formatter : * mut aws_log_formatter) ; } unsafe extern "C" { pub fn aws_format_standard_log_line (formatting_data : * mut aws_logging_standard_formatting_data , args : * mut __va_list_tag) -> :: libc :: 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) -> :: libc :: 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)] pub struct aws_log_writer_vtable { pub write : aws_log_writer_write_fn , pub clean_up : aws_log_writer_clean_up_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_writer_vtable"] [:: std :: mem :: size_of :: < aws_log_writer_vtable > () - 16usize] ; ["Alignment of aws_log_writer_vtable"] [:: std :: mem :: align_of :: < aws_log_writer_vtable > () - 8usize] ; ["Offset of field: aws_log_writer_vtable::write"] [:: std :: mem :: offset_of ! (aws_log_writer_vtable , write) - 0usize] ; ["Offset of field: aws_log_writer_vtable::clean_up"] [:: std :: mem :: offset_of ! (aws_log_writer_vtable , clean_up) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_log_writer { pub vtable : * mut aws_log_writer_vtable , pub allocator : * mut aws_allocator , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_writer"] [:: std :: mem :: size_of :: < aws_log_writer > () - 24usize] ; ["Alignment of aws_log_writer"] [:: std :: mem :: align_of :: < aws_log_writer > () - 8usize] ; ["Offset of field: aws_log_writer::vtable"] [:: std :: mem :: offset_of ! (aws_log_writer , vtable) - 0usize] ; ["Offset of field: aws_log_writer::allocator"] [:: std :: mem :: offset_of ! (aws_log_writer , allocator) - 8usize] ; ["Offset of field: aws_log_writer::impl_"] [:: std :: mem :: offset_of ! (aws_log_writer , impl_) - 16usize] ; } ; 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)] pub struct aws_log_writer_file_options { pub filename : * const :: libc :: c_char , pub file : * mut FILE , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_writer_file_options"] [:: std :: mem :: size_of :: < aws_log_writer_file_options > () - 16usize] ; ["Alignment of aws_log_writer_file_options"] [:: std :: mem :: align_of :: < aws_log_writer_file_options > () - 8usize] ; ["Offset of field: aws_log_writer_file_options::filename"] [:: std :: mem :: offset_of ! (aws_log_writer_file_options , filename) - 0usize] ; ["Offset of field: aws_log_writer_file_options::file"] [:: std :: mem :: offset_of ! (aws_log_writer_file_options , file) - 8usize] ; } ; 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 () } } } unsafe extern "C" { pub fn aws_log_writer_init_stdout (writer : * mut aws_log_writer , allocator : * mut aws_allocator) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_writer_init_stderr (writer : * mut aws_log_writer , allocator : * mut aws_allocator) -> :: libc :: c_int ; } unsafe 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) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_writer_clean_up (writer : * mut aws_log_writer) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_socket_endpoint { _unused : [u8 ; 0] , } # [doc = " Invoked when connect completes.\n\n If unsuccessful, error_code will be set, connection will be NULL,\n and the on_shutdown callback will never be invoked.\n\n If successful, error_code will be 0 and connection will be valid.\n The user is now responsible for the connection and must\n call aws_http_connection_release() when they are done with it.\n\n The connection uses one event-loop thread to do all its work.\n The thread invoking this callback will be the same thread that invokes all\n future callbacks for this connection and its streams."] pub type aws_http_on_client_connection_setup_fn = :: std :: option :: Option < unsafe extern "C" fn (connection : * mut aws_http_connection , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when the connection has finished shutting down.\n Never invoked if on_setup failed.\n This is always invoked on connection's event-loop thread.\n Note that the connection is not completely done until on_shutdown has been invoked\n AND aws_http_connection_release() has been called."] pub type aws_http_on_client_connection_shutdown_fn = :: std :: option :: Option < unsafe extern "C" fn (connection : * mut aws_http_connection , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when the HTTP/2 settings change is complete.\n If connection setup successfully this will always be invoked whether settings change successfully or unsuccessfully.\n If error_code is AWS_ERROR_SUCCESS (0), then the peer has acknowledged the settings and the change has been applied.\n If error_code is non-zero, then a connection error occurred before the settings could be fully acknowledged and\n applied. This is always invoked on the connection's event-loop thread."] pub type aws_http2_on_change_settings_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (http2_connection : * mut aws_http_connection , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when the HTTP/2 PING completes, whether peer has acknowledged it or not.\n If error_code is AWS_ERROR_SUCCESS (0), then the peer has acknowledged the PING and round_trip_time_ns will be the\n round trip time in nano seconds for the connection.\n If error_code is non-zero, then a connection error occurred before the PING get acknowledgment and round_trip_time_ns\n will be useless in this case."] pub type aws_http2_on_ping_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (http2_connection : * mut aws_http_connection , round_trip_time_ns : u64 , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when an HTTP/2 GOAWAY frame is received from peer.\n Implies that the peer has initiated shutdown, or encountered a serious error.\n Once a GOAWAY is received, no further streams may be created on this connection.\n\n @param http2_connection This HTTP/2 connection.\n @param last_stream_id ID of the last locally-initiated stream that peer will\n      process. Any locally-initiated streams with a higher ID are ignored by\n      peer, and are safe to retry on another connection.\n @param http2_error_code The HTTP/2 error code (RFC-7540 section 7) sent by peer.\n      `enum aws_http2_error_code` lists official codes.\n @param debug_data The debug data sent by peer. It can be empty. (NOTE: this data is only valid for the lifetime of\n      the callback. Make a deep copy if you wish to keep it longer.)\n @param user_data User-data passed to the callback."] pub type aws_http2_on_goaway_received_fn = :: std :: option :: Option < unsafe extern "C" fn (http2_connection : * mut aws_http_connection , last_stream_id : u32 , http2_error_code : u32 , debug_data : aws_byte_cursor , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when new HTTP/2 settings from peer have been applied.\n Settings_array is the array of aws_http2_settings that contains all the settings we just changed in the order we\n applied (the order settings arrived). Num_settings is the number of elements in that array."] pub type aws_http2_on_remote_settings_change_fn = :: std :: option :: Option < unsafe extern "C" fn (http2_connection : * mut aws_http_connection , settings_array : * const aws_http2_setting , num_settings : usize , user_data : * mut :: libc :: c_void) > ; # [doc = " Callback invoked on each statistics sample.\n\n connection_nonce is unique to each connection for disambiguation of each callback per connection."] pub type aws_http_statistics_observer_fn = :: std :: option :: Option < unsafe extern "C" fn (connection_nonce : usize , stats_list : * const aws_array_list , user_data : * mut :: libc :: c_void) > ; # [doc = " Configuration options for connection monitoring"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_connection_monitoring_options { # [doc = " minimum required throughput of the connection.  Throughput is only measured against the interval of time where\n there is actual io to perform.  Read and write throughput are measured and checked independently of one another."] pub minimum_throughput_bytes_per_second : u64 , pub allowable_throughput_failure_interval_seconds : u32 , # [doc = " invoked on each statistics publish by the underlying IO channel. Install this callback to receive the statistics\n for observation. This field is optional."] pub statistics_observer_fn : aws_http_statistics_observer_fn , # [doc = " user_data to be passed to statistics_observer_fn."] pub statistics_observer_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_connection_monitoring_options"] [:: std :: mem :: size_of :: < aws_http_connection_monitoring_options > () - 32usize] ; ["Alignment of aws_http_connection_monitoring_options"] [:: std :: mem :: align_of :: < aws_http_connection_monitoring_options > () - 8usize] ; ["Offset of field: aws_http_connection_monitoring_options::minimum_throughput_bytes_per_second"] [:: std :: mem :: offset_of ! (aws_http_connection_monitoring_options , minimum_throughput_bytes_per_second) - 0usize] ; ["Offset of field: aws_http_connection_monitoring_options::allowable_throughput_failure_interval_seconds"] [:: std :: mem :: offset_of ! (aws_http_connection_monitoring_options , allowable_throughput_failure_interval_seconds) - 8usize] ; ["Offset of field: aws_http_connection_monitoring_options::statistics_observer_fn"] [:: std :: mem :: offset_of ! (aws_http_connection_monitoring_options , statistics_observer_fn) - 16usize] ; ["Offset of field: aws_http_connection_monitoring_options::statistics_observer_user_data"] [:: std :: mem :: offset_of ! (aws_http_connection_monitoring_options , statistics_observer_user_data) - 24usize] ; } ; impl Default for aws_http_connection_monitoring_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 () } } } # [doc = " Options specific to HTTP/1.x connections."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http1_connection_options { # [doc = " Optional\n Capacity in bytes of the HTTP/1 connection's read buffer.\n The buffer grows if the flow-control window of the incoming HTTP-stream\n reaches zero. If the buffer reaches capacity, no further socket data is\n read until the HTTP-stream's window opens again, allowing data to resume flowing.\n\n Ignored if `manual_window_management` is false.\n If zero is specified (the default) then a default capacity is chosen.\n A capacity that is too small may hinder throughput.\n A capacity that is too big may waste memory without helping throughput."] pub read_buffer_capacity : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http1_connection_options"] [:: std :: mem :: size_of :: < aws_http1_connection_options > () - 8usize] ; ["Alignment of aws_http1_connection_options"] [:: std :: mem :: align_of :: < aws_http1_connection_options > () - 8usize] ; ["Offset of field: aws_http1_connection_options::read_buffer_capacity"] [:: std :: mem :: offset_of ! (aws_http1_connection_options , read_buffer_capacity) - 0usize] ; } ; # [doc = " Options specific to HTTP/2 connections."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http2_connection_options { # [doc = " Optional\n The data of settings to change for initial settings.\n Note: each setting has its boundary. If settings_array is not set, num_settings has to be 0 to send an empty\n SETTINGS frame."] pub initial_settings_array : * mut aws_http2_setting , # [doc = " Required\n The num of settings to change (Length of the initial_settings_array)."] pub num_initial_settings : usize , # [doc = " Optional.\n Invoked when the HTTP/2 initial settings change is complete.\n If failed to setup the connection, this will not be invoked.\n Otherwise, this will be invoked, whether settings change successfully or unsuccessfully.\n See `aws_http2_on_change_settings_complete_fn`."] pub on_initial_settings_completed : aws_http2_on_change_settings_complete_fn , # [doc = " Optional\n The max number of recently-closed streams to remember.\n Set it to zero to use the default setting, AWS_HTTP2_DEFAULT_MAX_CLOSED_STREAMS\n\n If the connection receives a frame for a closed stream,\n the frame will be ignored or cause a connection error,\n depending on the frame type and how the stream was closed.\n Remembering more streams reduces the chances that a late frame causes\n a connection error, but costs some memory."] pub max_closed_streams : usize , # [doc = " Optional.\n Invoked when a valid GOAWAY frame received.\n See `aws_http2_on_goaway_received_fn`."] pub on_goaway_received : aws_http2_on_goaway_received_fn , # [doc = " Optional.\n Invoked when new settings from peer have been applied.\n See `aws_http2_on_remote_settings_change_fn`."] pub on_remote_settings_change : aws_http2_on_remote_settings_change_fn , # [doc = " Optional.\n Set to true to manually manage the flow-control window of whole HTTP/2 connection.\n\n If false, the connection will maintain its flow-control windows such that\n no back-pressure is applied and data arrives as fast as possible.\n\n If true, the flow-control window of the whole connection will shrink as body data\n is received (headers, padding, and other metadata do not affect the window) for every streams\n created on this connection.\n The initial connection flow-control window is 65,535.\n Once the connection's flow-control window reaches to 0, all the streams on the connection stop receiving any\n further data.\n The user must call aws_http2_connection_update_window() to increment the connection's\n window and keep data flowing.\n Note: the padding of data frame counts to the flow-control window.\n But, the client will always automatically update the window for padding even for manual window update."] pub conn_manual_window_management : bool , # [doc = " Optional.\n The threshold to send out a window update frame for the connection.\n Ignored if `conn_manual_window_management` is false.\n When the window_size_self for the connection is larger than the threshold,\n client will batch the window update and not send it out until the window_size_self\n drops below the threshold.\n Default to half of the initial connection flow-control window size, which is 32767."] pub conn_window_size_threshold_to_send_update : u32 , # [doc = " Optional.\n The threshold to send out a window update frame for the streams.\n Ignored if `manual_window_management` is false.\n When the window_size_self for the stream is larger than the threshold,\n client will batch the window update and not send it out until the window_size_self\n drops below the threshold.\n Default to half of the `initial_window_size`."] pub stream_window_size_threshold_to_send_update : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http2_connection_options"] [:: std :: mem :: size_of :: < aws_http2_connection_options > () - 64usize] ; ["Alignment of aws_http2_connection_options"] [:: std :: mem :: align_of :: < aws_http2_connection_options > () - 8usize] ; ["Offset of field: aws_http2_connection_options::initial_settings_array"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , initial_settings_array) - 0usize] ; ["Offset of field: aws_http2_connection_options::num_initial_settings"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , num_initial_settings) - 8usize] ; ["Offset of field: aws_http2_connection_options::on_initial_settings_completed"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , on_initial_settings_completed) - 16usize] ; ["Offset of field: aws_http2_connection_options::max_closed_streams"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , max_closed_streams) - 24usize] ; ["Offset of field: aws_http2_connection_options::on_goaway_received"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , on_goaway_received) - 32usize] ; ["Offset of field: aws_http2_connection_options::on_remote_settings_change"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , on_remote_settings_change) - 40usize] ; ["Offset of field: aws_http2_connection_options::conn_manual_window_management"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , conn_manual_window_management) - 48usize] ; ["Offset of field: aws_http2_connection_options::conn_window_size_threshold_to_send_update"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , conn_window_size_threshold_to_send_update) - 52usize] ; ["Offset of field: aws_http2_connection_options::stream_window_size_threshold_to_send_update"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , stream_window_size_threshold_to_send_update) - 56usize] ; } ; impl Default for aws_http2_connection_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 () } } } # [doc = " Options for creating an HTTP client connection.\n Initialize with AWS_HTTP_CLIENT_CONNECTION_OPTIONS_INIT to set default values."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_client_connection_options { # [doc = " The sizeof() this struct, used for versioning.\n Set by AWS_HTTP_CLIENT_CONNECTION_OPTIONS_INIT."] pub self_size : usize , # [doc = " Required.\n Must outlive the connection."] pub allocator : * mut aws_allocator , # [doc = " Required.\n The connection keeps the bootstrap alive via ref-counting."] pub bootstrap : * mut aws_client_bootstrap , # [doc = " Required.\n aws_http_client_connect() makes a copy."] pub host_name : aws_byte_cursor , # [doc = " Required."] pub port : u32 , # [doc = " Required.\n aws_http_client_connect() makes a copy."] pub socket_options : * const aws_socket_options , # [doc = " Optional.\n aws_http_client_connect() deep-copies all contents,\n and keeps `aws_tls_ctx` alive via ref-counting."] pub tls_options : * const aws_tls_connection_options , # [doc = " Optional\n Configuration options related to http proxy usage.\n Relevant fields are copied internally."] pub proxy_options : * const aws_http_proxy_options , pub proxy_ev_settings : * const proxy_env_var_settings , # [doc = " Optional\n Configuration options related to connection health monitoring"] pub monitoring_options : * const aws_http_connection_monitoring_options , # [doc = " Optional (ignored if 0).\n After a request is fully sent, if the server does not begin responding within N milliseconds,\n then fail with AWS_ERROR_HTTP_RESPONSE_FIRST_BYTE_TIMEOUT.\n This can be overridden per-request by aws_http_make_request_options.response_first_byte_timeout_ms.\n TODO: Only supported in HTTP/1.1 now, support it in HTTP/2"] pub response_first_byte_timeout_ms : u64 , # [doc = " Set to true to manually manage the flow-control window of each stream.\n\n If false, the connection will maintain its flow-control windows such that\n no back-pressure is applied and data arrives as fast as possible.\n\n If true, the flow-control window of each stream will shrink as body data\n is received (headers, padding, and other metadata do not affect the window).\n `initial_window_size` determines the starting size of each stream's window.\n\n If a stream's flow-control window reaches 0, no further data will be received. The user must call\n aws_http_stream_update_window() to increment the stream's window and keep data flowing.\n\n If a HTTP/2 connection created, it will ONLY control the stream window management.\n Connection window management is controlled by `conn_manual_window_management`.\n `stream_window_size_threshold_to_send_update` controls when to send the WINDOW_UPDATE frame for the stream.\n Note: the padding of data frame counts to the flow-control window. But, the client will always automatically\n update the window for padding even for manual window update."] pub manual_window_management : bool , # [doc = " The starting size of each HTTP stream's flow-control window.\n Required if `manual_window_management` is true,\n ignored if `manual_window_management` is false.\n\n For HTTP/2 connection, this value will end up being one of the initial settings for the connection,\n `AWS_HTTP2_SETTINGS_INITIAL_WINDOW_SIZE`.\n The corresponding settings from `initial_settings_array` will override this value.\n Notes:\n  - the setting value has the limitation of 2^31-1, otherwise the connection will be failed to be established with\n      AWS_ERROR_INVALID_ARGUMENT.\n  - when this set to 0, the initial window size will be set to 0, when `manual_window_management` is true."] pub initial_window_size : usize , # [doc = " User data for callbacks\n Optional."] pub user_data : * mut :: libc :: c_void , # [doc = " Invoked when connect completes.\n Required.\n See `aws_http_on_client_connection_setup_fn`."] pub on_setup : aws_http_on_client_connection_setup_fn , # [doc = " Invoked when the connection has finished shutting down.\n Never invoked if setup failed.\n Optional.\n See `aws_http_on_client_connection_shutdown_fn`."] pub on_shutdown : aws_http_on_client_connection_shutdown_fn , # [doc = " Optional.\n When true, use prior knowledge to set up an HTTP/2 connection on a cleartext\n connection.\n When TLS is set and this is true, the connection will failed to be established,\n as prior knowledge only works for cleartext TLS.\n Refer to RFC7540 3.4"] pub prior_knowledge_http2 : bool , # [doc = " Optional.\n Pointer to the hash map containing the ALPN string to protocol to use.\n Hash from `struct aws_string *` to `enum aws_http_version`.\n If not set, only the predefined string `h2` and `http/1.1` will be recognized. Other negotiated ALPN string will\n result in a HTTP1/1 connection\n Note: Connection will keep a deep copy of the table and the strings."] pub alpn_string_map : * mut aws_hash_table , # [doc = " Options specific to HTTP/1.x connections.\n Optional.\n Ignored if connection is not HTTP/1.x.\n If connection is HTTP/1.x and options were not specified, default values are used."] pub http1_options : * const aws_http1_connection_options , # [doc = " Options specific to HTTP/2 connections.\n Optional.\n Ignored if connection is not HTTP/2.\n If connection is HTTP/2 and options were not specified, default values are used."] pub http2_options : * const aws_http2_connection_options , # [doc = " Optional.\n Requests the channel/connection be bound to a specific event loop rather than chosen sequentially from the\n event loop group associated with the client bootstrap."] pub requested_event_loop : * mut aws_event_loop , # [doc = " Optional\n Host resolution override that allows the user to override DNS behavior for this particular connection."] pub host_resolution_config : * const aws_host_resolution_config , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_client_connection_options"] [:: std :: mem :: size_of :: < aws_http_client_connection_options > () - 184usize] ; ["Alignment of aws_http_client_connection_options"] [:: std :: mem :: align_of :: < aws_http_client_connection_options > () - 8usize] ; ["Offset of field: aws_http_client_connection_options::self_size"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , self_size) - 0usize] ; ["Offset of field: aws_http_client_connection_options::allocator"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , allocator) - 8usize] ; ["Offset of field: aws_http_client_connection_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , bootstrap) - 16usize] ; ["Offset of field: aws_http_client_connection_options::host_name"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , host_name) - 24usize] ; ["Offset of field: aws_http_client_connection_options::port"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , port) - 40usize] ; ["Offset of field: aws_http_client_connection_options::socket_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , socket_options) - 48usize] ; ["Offset of field: aws_http_client_connection_options::tls_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , tls_options) - 56usize] ; ["Offset of field: aws_http_client_connection_options::proxy_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , proxy_options) - 64usize] ; ["Offset of field: aws_http_client_connection_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , proxy_ev_settings) - 72usize] ; ["Offset of field: aws_http_client_connection_options::monitoring_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , monitoring_options) - 80usize] ; ["Offset of field: aws_http_client_connection_options::response_first_byte_timeout_ms"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , response_first_byte_timeout_ms) - 88usize] ; ["Offset of field: aws_http_client_connection_options::manual_window_management"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , manual_window_management) - 96usize] ; ["Offset of field: aws_http_client_connection_options::initial_window_size"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , initial_window_size) - 104usize] ; ["Offset of field: aws_http_client_connection_options::user_data"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , user_data) - 112usize] ; ["Offset of field: aws_http_client_connection_options::on_setup"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , on_setup) - 120usize] ; ["Offset of field: aws_http_client_connection_options::on_shutdown"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , on_shutdown) - 128usize] ; ["Offset of field: aws_http_client_connection_options::prior_knowledge_http2"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , prior_knowledge_http2) - 136usize] ; ["Offset of field: aws_http_client_connection_options::alpn_string_map"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , alpn_string_map) - 144usize] ; ["Offset of field: aws_http_client_connection_options::http1_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , http1_options) - 152usize] ; ["Offset of field: aws_http_client_connection_options::http2_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , http2_options) - 160usize] ; ["Offset of field: aws_http_client_connection_options::requested_event_loop"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , requested_event_loop) - 168usize] ; ["Offset of field: aws_http_client_connection_options::host_resolution_config"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , host_resolution_config) - 176usize] ; } ; impl Default for aws_http_client_connection_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 () } } } impl aws_http2_settings_id { pub const AWS_HTTP2_SETTINGS_HEADER_TABLE_SIZE : aws_http2_settings_id = aws_http2_settings_id :: AWS_HTTP2_SETTINGS_BEGIN_RANGE ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http2_settings_id { AWS_HTTP2_SETTINGS_BEGIN_RANGE = 1 , AWS_HTTP2_SETTINGS_ENABLE_PUSH = 2 , AWS_HTTP2_SETTINGS_MAX_CONCURRENT_STREAMS = 3 , AWS_HTTP2_SETTINGS_INITIAL_WINDOW_SIZE = 4 , AWS_HTTP2_SETTINGS_MAX_FRAME_SIZE = 5 , AWS_HTTP2_SETTINGS_MAX_HEADER_LIST_SIZE = 6 , AWS_HTTP2_SETTINGS_END_RANGE = 7 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http2_setting { pub id : aws_http2_settings_id , pub value : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http2_setting"] [:: std :: mem :: size_of :: < aws_http2_setting > () - 8usize] ; ["Alignment of aws_http2_setting"] [:: std :: mem :: align_of :: < aws_http2_setting > () - 4usize] ; ["Offset of field: aws_http2_setting::id"] [:: std :: mem :: offset_of ! (aws_http2_setting , id) - 0usize] ; ["Offset of field: aws_http2_setting::value"] [:: std :: mem :: offset_of ! (aws_http2_setting , value) - 4usize] ; } ; impl Default for aws_http2_setting { 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 () } } } unsafe extern "C" { # [doc = " Asynchronously establish a client connection.\n The on_setup callback is invoked when the operation has created a connection or failed."] pub fn aws_http_client_connect (options : * const aws_http_client_connection_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Users must release the connection when they are done with it.\n The connection's memory cannot be reclaimed until this is done.\n If the connection was not already shutting down, it will be shut down.\n\n Users should always wait for the on_shutdown() callback to be called before releasing any data passed to the\n http_connection (Eg aws_tls_connection_options, aws_socket_options) otherwise there will be race conditions between\n http_connection shutdown tasks and memory release tasks, causing Segfaults."] pub fn aws_http_connection_release (connection : * mut aws_http_connection) ; } unsafe extern "C" { # [doc = " Begin shutdown sequence of the connection if it hasn't already started. This will schedule shutdown tasks on the\n EventLoop that may send HTTP/TLS/TCP shutdown messages to peers if necessary, and will eventually cause internal\n connection memory to stop being accessed and on_shutdown() callback to be called.\n\n It's safe to call this function regardless of the connection state as long as you hold a reference to the connection."] pub fn aws_http_connection_close (connection : * mut aws_http_connection) ; } unsafe extern "C" { # [doc = " Stop accepting new requests for the connection. It will NOT start the shutdown process for the connection. The\n requests that are already open can still wait to be completed, but new requests will fail to be created,"] pub fn aws_http_connection_stop_new_requests (connection : * mut aws_http_connection) ; } unsafe extern "C" { # [doc = " Returns true unless the connection is closed or closing."] pub fn aws_http_connection_is_open (connection : * const aws_http_connection) -> bool ; } unsafe extern "C" { # [doc = " Return whether the connection can make a new requests.\n If false, then a new connection must be established to make further requests."] pub fn aws_http_connection_new_requests_allowed (connection : * const aws_http_connection) -> bool ; } unsafe extern "C" { # [doc = " Returns true if this is a client connection."] pub fn aws_http_connection_is_client (connection : * const aws_http_connection) -> bool ; } unsafe extern "C" { pub fn aws_http_connection_get_version (connection : * const aws_http_connection) -> aws_http_version ; } unsafe extern "C" { # [doc = " Returns the channel hosting the HTTP connection.\n Do not expose this function to language bindings."] pub fn aws_http_connection_get_channel (connection : * mut aws_http_connection) -> * mut aws_channel ; } unsafe extern "C" { # [doc = " Returns the remote endpoint of the HTTP connection."] pub fn aws_http_connection_get_remote_endpoint (connection : * const aws_http_connection) -> * const aws_socket_endpoint ; } unsafe extern "C" { # [doc = " Initialize an map copied from the *src map, which maps `struct aws_string *` to `enum aws_http_version`."] pub fn aws_http_alpn_map_init_copy (allocator : * mut aws_allocator , dest : * mut aws_hash_table , src : * mut aws_hash_table) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initialize an empty hash-table that maps `struct aws_string *` to `enum aws_http_version`.\n This map can used in aws_http_client_connections_options.alpn_string_map."] pub fn aws_http_alpn_map_init (allocator : * mut aws_allocator , map : * mut aws_hash_table) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Checks http proxy options for correctness"] pub fn aws_http_options_validate_proxy_configuration (options : * const aws_http_client_connection_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Send a SETTINGS frame (HTTP/2 only).\n SETTINGS will be applied locally when SETTINGS ACK is received from peer.\n\n @param http2_connection HTTP/2 connection.\n @param settings_array The array of settings to change. Note: each setting has its boundary.\n @param num_settings The num of settings to change in settings_array.\n @param on_completed Optional callback, see `aws_http2_on_change_settings_complete_fn`.\n @param user_data User-data pass to on_completed callback."] pub fn aws_http2_connection_change_settings (http2_connection : * mut aws_http_connection , settings_array : * const aws_http2_setting , num_settings : usize , on_completed : aws_http2_on_change_settings_complete_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Send a PING frame (HTTP/2 only).\n Round-trip-time is calculated when PING ACK is received from peer.\n\n @param http2_connection HTTP/2 connection.\n @param optional_opaque_data Optional payload for PING frame.\n      Must be NULL, or exactly 8 bytes (AWS_HTTP2_PING_DATA_SIZE).\n      If NULL, the 8 byte payload will be all zeroes.\n @param on_completed Optional callback, invoked when PING ACK is received from peer,\n      or when a connection error prevents the PING ACK from being received.\n      Callback always fires on the connection's event-loop thread.\n @param user_data User-data pass to on_completed callback."] pub fn aws_http2_connection_ping (http2_connection : * mut aws_http_connection , optional_opaque_data : * const aws_byte_cursor , on_completed : aws_http2_on_ping_complete_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the local settings we are using to affect the decoding.\n\n @param http2_connection HTTP/2 connection.\n @param out_settings fixed size array of aws_http2_setting gets set to the local settings"] pub fn aws_http2_connection_get_local_settings (http2_connection : * const aws_http_connection , out_settings : * mut aws_http2_setting) ; } unsafe extern "C" { # [doc = " Get the settings received from remote peer, which we are using to restricts the message to send.\n\n @param http2_connection HTTP/2 connection.\n @param out_settings fixed size array of aws_http2_setting gets set to the remote settings"] pub fn aws_http2_connection_get_remote_settings (http2_connection : * const aws_http_connection , out_settings : * mut aws_http2_setting) ; } unsafe extern "C" { # [doc = " Send a custom GOAWAY frame (HTTP/2 only).\n\n Note that the connection automatically attempts to send a GOAWAY during\n shutdown (unless a GOAWAY with a valid Last-Stream-ID has already been sent).\n\n This call can be used to gracefully warn the peer of an impending shutdown\n (http2_error=0, allow_more_streams=true), or to customize the final GOAWAY\n frame that is sent by this connection.\n\n The other end may not receive the goaway, if the connection already closed.\n\n @param http2_connection HTTP/2 connection.\n @param http2_error The HTTP/2 error code (RFC-7540 section 7) to send.\n      `enum aws_http2_error_code` lists official codes.\n @param allow_more_streams If true, new peer-initiated streams will continue\n      to be acknowledged and the GOAWAY's Last-Stream-ID will be set to a max value.\n      If false, new peer-initiated streams will be ignored and the GOAWAY's\n      Last-Stream-ID will be set to the latest acknowledged stream.\n @param optional_debug_data Optional debug data to send. Size must not exceed 16KB."] pub fn aws_http2_connection_send_goaway (http2_connection : * mut aws_http_connection , http2_error : u32 , allow_more_streams : bool , optional_debug_data : * const aws_byte_cursor) ; } unsafe extern "C" { # [doc = " Get data about the latest GOAWAY frame sent to peer (HTTP/2 only).\n If no GOAWAY has been sent, AWS_ERROR_HTTP_DATA_NOT_AVAILABLE will be raised.\n Note that GOAWAY frames are typically sent automatically by the connection\n during shutdown.\n\n @param http2_connection HTTP/2 connection.\n @param out_http2_error Gets set to HTTP/2 error code sent in most recent GOAWAY.\n @param out_last_stream_id Gets set to Last-Stream-ID sent in most recent GOAWAY."] pub fn aws_http2_connection_get_sent_goaway (http2_connection : * mut aws_http_connection , out_http2_error : * mut u32 , out_last_stream_id : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get data about the latest GOAWAY frame received from peer (HTTP/2 only).\n If no GOAWAY has been received, or the GOAWAY payload is still in transmitting,\n AWS_ERROR_HTTP_DATA_NOT_AVAILABLE will be raised.\n\n @param http2_connection HTTP/2 connection.\n @param out_http2_error Gets set to HTTP/2 error code received in most recent GOAWAY.\n @param out_last_stream_id Gets set to Last-Stream-ID received in most recent GOAWAY."] pub fn aws_http2_connection_get_received_goaway (http2_connection : * mut aws_http_connection , out_http2_error : * mut u32 , out_last_stream_id : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Increment the connection's flow-control window to keep data flowing (HTTP/2 only).\n\n If the connection was created with `conn_manual_window_management` set true,\n the flow-control window of the connection will shrink as body data is received for all the streams created on it.\n (headers, padding, and other metadata do not affect the window).\n The initial connection flow-control window is 65,535.\n Once the connection's flow-control window reaches to 0, all the streams on the connection stop receiving any further\n data.\n\n If `conn_manual_window_management` is false, this call will have no effect.\n The connection maintains its flow-control windows such that\n no back-pressure is applied and data arrives as fast as possible.\n\n If you are not connected, this call will have no effect.\n\n Crashes when the connection is not http2 connection.\n The limit of the Maximum Size is 2**31 - 1.\n And client will make sure the WINDOW_UPDATE frame to be valid.\n\n The client control exactly when the WINDOW_UPDATE frame sent.\n Check `conn_window_size_threshold_to_send_update` for details.\n\n @param http2_connection HTTP/2 connection.\n @param increment_size The size to increment for the connection's flow control window"] pub fn aws_http2_connection_update_window (http2_connection : * mut aws_http_connection , increment_size : u32) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_async_input_stream { pub vtable : * const aws_async_input_stream_vtable , pub alloc : * mut aws_allocator , pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_async_input_stream"] [:: std :: mem :: size_of :: < aws_async_input_stream > () - 48usize] ; ["Alignment of aws_async_input_stream"] [:: std :: mem :: align_of :: < aws_async_input_stream > () - 8usize] ; ["Offset of field: aws_async_input_stream::vtable"] [:: std :: mem :: offset_of ! (aws_async_input_stream , vtable) - 0usize] ; ["Offset of field: aws_async_input_stream::alloc"] [:: std :: mem :: offset_of ! (aws_async_input_stream , alloc) - 8usize] ; ["Offset of field: aws_async_input_stream::ref_count"] [:: std :: mem :: offset_of ! (aws_async_input_stream , ref_count) - 16usize] ; ["Offset of field: aws_async_input_stream::impl_"] [:: std :: mem :: offset_of ! (aws_async_input_stream , impl_) - 40usize] ; } ; impl Default for aws_async_input_stream { 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)] pub struct aws_async_input_stream_vtable { # [doc = " Destroy the stream, its refcount has reached 0."] pub destroy : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_async_input_stream) > , # [doc = " Read once into the buffer.\n Complete the read when at least 1 byte is read, the buffer is full, or EOF is reached.\n Do not resize the buffer (do not use \"aws_byte_buf_xyz_dynamic()\" functions)\n Do not assume that buffer len starts at 0.\n You may assume that read() won't be called again until the current one completes.\n You may assume that the buffer has some space available.\n Return a future, which will contain an error code if something went wrong,\n or a result bool indicating whether EOF has been reached."] pub read : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_async_input_stream , dest : * mut aws_byte_buf) -> * mut aws_future_bool > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_async_input_stream_vtable"] [:: std :: mem :: size_of :: < aws_async_input_stream_vtable > () - 16usize] ; ["Alignment of aws_async_input_stream_vtable"] [:: std :: mem :: align_of :: < aws_async_input_stream_vtable > () - 8usize] ; ["Offset of field: aws_async_input_stream_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_async_input_stream_vtable , destroy) - 0usize] ; ["Offset of field: aws_async_input_stream_vtable::read"] [:: std :: mem :: offset_of ! (aws_async_input_stream_vtable , read) - 8usize] ; } ; unsafe extern "C" { # [doc = " Initialize aws_async_input_stream \"base class\""] pub fn aws_async_input_stream_init_base (stream : * mut aws_async_input_stream , alloc : * mut aws_allocator , vtable : * const aws_async_input_stream_vtable , impl_ : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Increment reference count.\n You may pass in NULL (has no effect).\n Returns whatever pointer was passed in."] pub fn aws_async_input_stream_acquire (stream : * mut aws_async_input_stream) -> * mut aws_async_input_stream ; } unsafe extern "C" { # [doc = " Decrement reference count.\n You may pass in NULL (has no effect).\n Always returns NULL."] pub fn aws_async_input_stream_release (stream : * mut aws_async_input_stream) -> * mut aws_async_input_stream ; } unsafe extern "C" { # [doc = " Read once from the async stream into the buffer.\n The read completes when at least 1 byte is read, the buffer is full, or EOF is reached.\n Depending on implementation, the read could complete at any time.\n It may complete synchronously. It may complete on another thread.\n Returns a future, which will contain an error code if something went wrong,\n or a result bool indicating whether EOF has been reached.\n\n WARNING: The buffer must have space available.\n WARNING: Do not read again until the previous read is complete."] pub fn aws_async_input_stream_read (stream : * mut aws_async_input_stream , dest : * mut aws_byte_buf) -> * mut aws_future_bool ; } unsafe extern "C" { # [doc = " Read repeatedly from the async stream until the buffer is full, or EOF is reached.\n Depending on implementation, this could complete at any time.\n It may complete synchronously. It may complete on another thread.\n Returns a future, which will contain an error code if something went wrong,\n or a result bool indicating whether EOF has been reached.\n\n WARNING: The buffer must have space available.\n WARNING: Do not read again until the previous read is complete."] pub fn aws_async_input_stream_read_to_fill (stream : * mut aws_async_input_stream , dest : * mut aws_byte_buf) -> * mut aws_future_bool ; } pub type aws_crt_statistics_category_t = u32 ; pub const AWS_CRT_STATISTICS_CATEGORY_STRIDE_BITS : _bindgen_ty_22 = _bindgen_ty_22 :: AWS_CRT_STATISTICS_CATEGORY_STRIDE_BITS ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_22 { AWS_CRT_STATISTICS_CATEGORY_STRIDE_BITS = 8 , } # [repr (u32)] # [non_exhaustive] # [doc = " The common-specific range of the aws_crt_statistics_category cross-library enum.\n\n This enum functions as an RTTI value that lets statistics handler's interpret (via cast) a\n specific statistics structure if the RTTI value is understood.\n\n Common doesn't have any statistics structures presently, so its range is essentially empty.\n"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_crt_common_statistics_category { AWSCRT_STAT_CAT_INVALID = 0 , } # [doc = " Pattern-struct that functions as a base \"class\" for all statistics structures.  To conform\n to the pattern, a statistics structure must have its first member be the category.  In that\n case it becomes \"safe\" to cast from aws_crt_statistics_base to the specific statistics structure\n based on the category value."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_crt_statistics_base { pub category : aws_crt_statistics_category_t , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_crt_statistics_base"] [:: std :: mem :: size_of :: < aws_crt_statistics_base > () - 4usize] ; ["Alignment of aws_crt_statistics_base"] [:: std :: mem :: align_of :: < aws_crt_statistics_base > () - 4usize] ; ["Offset of field: aws_crt_statistics_base::category"] [:: std :: mem :: offset_of ! (aws_crt_statistics_base , category) - 0usize] ; } ; # [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)] pub struct aws_crt_statistics_sample_interval { pub begin_time_ms : u64 , pub end_time_ms : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_crt_statistics_sample_interval"] [:: std :: mem :: size_of :: < aws_crt_statistics_sample_interval > () - 16usize] ; ["Alignment of aws_crt_statistics_sample_interval"] [:: std :: mem :: align_of :: < aws_crt_statistics_sample_interval > () - 8usize] ; ["Offset of field: aws_crt_statistics_sample_interval::begin_time_ms"] [:: std :: mem :: offset_of ! (aws_crt_statistics_sample_interval , begin_time_ms) - 0usize] ; ["Offset of field: aws_crt_statistics_sample_interval::end_time_ms"] [:: std :: mem :: offset_of ! (aws_crt_statistics_sample_interval , end_time_ms) - 8usize] ; } ; 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 :: libc :: 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_crt_statistics_handler_vtable"] [:: std :: mem :: size_of :: < aws_crt_statistics_handler_vtable > () - 24usize] ; ["Alignment of aws_crt_statistics_handler_vtable"] [:: std :: mem :: align_of :: < aws_crt_statistics_handler_vtable > () - 8usize] ; ["Offset of field: aws_crt_statistics_handler_vtable::process_statistics"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler_vtable , process_statistics) - 0usize] ; ["Offset of field: aws_crt_statistics_handler_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler_vtable , destroy) - 8usize] ; ["Offset of field: aws_crt_statistics_handler_vtable::get_report_interval_ms"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler_vtable , get_report_interval_ms) - 16usize] ; } ; # [doc = " Base structure for all statistics handler implementations.\n\n A statistics handler is an object that listens to a stream of polymorphic (via the category RTTI enum) statistics\n structures emitted from some arbitrary source.  In the initial implementation, statistics handlers are primarily\n attached to channels, where they monitor IO throughput and state data (from channel handlers) to determine a\n connection's health.\n\n Statistics handlers are a generalization of the timeout and bandwidth filters that are often associated with\n SDK network connections.  Configurable, default implementations are defined at the protocol level (http, etc...)\n where they can be attached at connection (channel) creation time."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_crt_statistics_handler { pub vtable : * mut aws_crt_statistics_handler_vtable , pub allocator : * mut aws_allocator , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_crt_statistics_handler"] [:: std :: mem :: size_of :: < aws_crt_statistics_handler > () - 24usize] ; ["Alignment of aws_crt_statistics_handler"] [:: std :: mem :: align_of :: < aws_crt_statistics_handler > () - 8usize] ; ["Offset of field: aws_crt_statistics_handler::vtable"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler , vtable) - 0usize] ; ["Offset of field: aws_crt_statistics_handler::allocator"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler , allocator) - 8usize] ; ["Offset of field: aws_crt_statistics_handler::impl_"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler , impl_) - 16usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Submits a list of statistics objects to a statistics handler for processing\n\n handler - the statistics handler that will process the statistics objects\n interval - time period over which the statistics were gathered\n stats - list of pointers to structures that can be case to aws_crt_statistics_base (i.e. have category as a first\n   member)\n 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 :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Queries the frequency (via an interval in milliseconds) which a statistics handler would like to be informed\n of statistics."] pub fn aws_crt_statistics_handler_get_report_interval_ms (handler : * mut aws_crt_statistics_handler) -> u64 ; } unsafe extern "C" { # [doc = " completely destroys a statistics handler.  The handler's cleanup function must clean up the impl portion completely\n (including its allocation, if done separately)."] pub fn aws_crt_statistics_handler_destroy (handler : * mut aws_crt_statistics_handler) ; } pub type aws_priority_queue_compare_fn = :: std :: option :: Option < unsafe extern "C" fn (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> :: libc :: c_int > ; # [repr (C)] # [derive (Debug , Copy , Clone)] 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\n the first call to aws_priority_queue_push_bp is made, and is subsequently maintained\n through any heap node manipulations.\n\n Each element is a struct aws_priority_queue_node *, pointing to a backpointer field\n owned by the calling code, or a NULL. The backpointer field is continually updated\n with information needed to locate and remove a specific node later on."] pub backpointers : aws_array_list , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_priority_queue"] [:: std :: mem :: size_of :: < aws_priority_queue > () - 88usize] ; ["Alignment of aws_priority_queue"] [:: std :: mem :: align_of :: < aws_priority_queue > () - 8usize] ; ["Offset of field: aws_priority_queue::pred"] [:: std :: mem :: offset_of ! (aws_priority_queue , pred) - 0usize] ; ["Offset of field: aws_priority_queue::container"] [:: std :: mem :: offset_of ! (aws_priority_queue , container) - 8usize] ; ["Offset of field: aws_priority_queue::backpointers"] [:: std :: mem :: offset_of ! (aws_priority_queue , backpointers) - 48usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_priority_queue_node"] [:: std :: mem :: size_of :: < aws_priority_queue_node > () - 8usize] ; ["Alignment of aws_priority_queue_node"] [:: std :: mem :: align_of :: < aws_priority_queue_node > () - 8usize] ; ["Offset of field: aws_priority_queue_node::current_index"] [:: std :: mem :: offset_of ! (aws_priority_queue_node , current_index) - 0usize] ; } ; unsafe extern "C" { # [doc = " Initializes a priority queue struct for use. This mode will grow memory automatically (exponential model)\n Default size is the inital size of the queue\n item_size is the size of each element in bytes. Mixing items types is not supported by this API.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes a priority queue struct for use. This mode will not allocate any additional memory. When the heap fills\n new enqueue operations will fail with AWS_ERROR_PRIORITY_QUEUE_FULL.\n\n Heaps initialized using this call do not support the aws_priority_queue_push_ref call with a non-NULL backpointer\n parameter.\n\n heap is the raw memory allocated for this priority_queue\n item_count is the maximum number of elements the raw heap can contain\n item_size is the size of each element in bytes. Mixing items types is not supported by this API.\n 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 :: libc :: c_void , item_count : usize , item_size : usize , pred : aws_priority_queue_compare_fn) ; } unsafe extern "C" { # [doc = " Checks that the backpointer at a specific index of the queue is\n 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 ; } unsafe extern "C" { # [doc = " Checks that the backpointers of the priority queue are either NULL\n or correctly allocated to point at aws_priority_queue_nodes. This\n check is O(n), as it accesses every backpointer in a loop, and thus\n shouldn't be used carelessly."] pub fn aws_priority_queue_backpointers_valid_deep (queue : * const aws_priority_queue) -> bool ; } unsafe extern "C" { # [doc = " Checks that the backpointers of the priority queue satisfy validity\n constraints."] pub fn aws_priority_queue_backpointers_valid (queue : * const aws_priority_queue) -> bool ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies item into the queue and places it in the proper priority order. Complexity: O(log(n)).\n\n If the backpointer parameter is non-null, the heap will continually update the pointed-to field\n with information needed to remove the node later on. *backpointer must remain valid until the node\n is removed from the heap, and may be updated on any mutating operation on the priority queue.\n\n If the node is removed, the backpointer will be set to a sentinel value that indicates that the\n node has already been removed. It is safe (and a no-op) to call aws_priority_queue_remove with\n such a sentinel value."] pub fn aws_priority_queue_push_ref (queue : * mut aws_priority_queue , item : * mut :: libc :: c_void , backpointer : * mut aws_priority_queue_node) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the element of the highest priority, and removes it from the queue.. Complexity: O(log(n)).\n 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 :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes a specific node from the priority queue. Complexity: O(log(n))\n After removing a node (using either _remove or _pop), the backpointer set at push_ref time is set\n to a sentinel value. If this sentinel value is passed to aws_priority_queue_remove,\n AWS_ERROR_PRIORITY_QUEUE_BAD_NODE will be raised. Note, however, that passing uninitialized\n 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 :: libc :: c_void , node : * const aws_priority_queue_node) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Obtains a pointer to the element of the highest priority. Complexity: constant time.\n 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 :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes all elements from the queue, but does not free internal memory."] pub fn aws_priority_queue_clear (queue : * mut aws_priority_queue) ; } unsafe extern "C" { # [doc = " Current number of elements in the queue"] pub fn aws_priority_queue_size (queue : * const aws_priority_queue) -> usize ; } unsafe extern "C" { # [doc = " Current allocated capacity for the queue, in dynamic mode this grows over time, in static mode, this will never\n change."] pub fn aws_priority_queue_capacity (queue : * const aws_priority_queue) -> usize ; } unsafe extern "C" { # [doc = " Initializes a queue node to a default value that indicates the node is not in the queue.\n\n @param node priority queue node to initialize with a default value"] pub fn aws_priority_queue_node_init (node : * mut aws_priority_queue_node) ; } unsafe extern "C" { # [doc = " Checks if a priority queue node is currently in a priority queue.\n\n @param node priority queue node to check usage for\n\n @return true if the node is in a queue, false otherwise"] pub fn aws_priority_queue_node_is_in_queue (node : * const aws_priority_queue_node) -> bool ; } impl aws_task_status { pub const AWS_TASK_STATUS_RUN_READY : aws_task_status = aws_task_status (0) ; pub const AWS_TASK_STATUS_CANCELED : aws_task_status = aws_task_status (1) ; } # [repr (transparent)] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub struct aws_task_status (pub :: libc :: c_uint) ; # [doc = " A scheduled function."] pub type aws_task_fn = :: std :: option :: Option < unsafe extern "C" fn (task : * mut aws_task , arg : * mut :: libc :: c_void , arg1 : aws_task_status) > ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_task { pub fn_ : aws_task_fn , pub arg : * mut :: libc :: c_void , pub timestamp : u64 , pub node : aws_linked_list_node , pub priority_queue_node : aws_priority_queue_node , pub type_tag : * const :: libc :: 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_task__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_task__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_task__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_task__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_task__bindgen_ty_1::scheduled"] [:: std :: mem :: offset_of ! (aws_task__bindgen_ty_1 , scheduled) - 0usize] ; ["Offset of field: aws_task__bindgen_ty_1::reserved"] [:: std :: mem :: offset_of ! (aws_task__bindgen_ty_1 , reserved) - 0usize] ; } ; 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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_task"] [:: std :: mem :: size_of :: < aws_task > () - 64usize] ; ["Alignment of aws_task"] [:: std :: mem :: align_of :: < aws_task > () - 8usize] ; ["Offset of field: aws_task::fn_"] [:: std :: mem :: offset_of ! (aws_task , fn_) - 0usize] ; ["Offset of field: aws_task::arg"] [:: std :: mem :: offset_of ! (aws_task , arg) - 8usize] ; ["Offset of field: aws_task::timestamp"] [:: std :: mem :: offset_of ! (aws_task , timestamp) - 16usize] ; ["Offset of field: aws_task::node"] [:: std :: mem :: offset_of ! (aws_task , node) - 24usize] ; ["Offset of field: aws_task::priority_queue_node"] [:: std :: mem :: offset_of ! (aws_task , priority_queue_node) - 40usize] ; ["Offset of field: aws_task::type_tag"] [:: std :: mem :: offset_of ! (aws_task , type_tag) - 48usize] ; ["Offset of field: aws_task::abi_extension"] [:: std :: mem :: offset_of ! (aws_task , abi_extension) - 56usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_task_scheduler"] [:: std :: mem :: size_of :: < aws_task_scheduler > () - 160usize] ; ["Alignment of aws_task_scheduler"] [:: std :: mem :: align_of :: < aws_task_scheduler > () - 8usize] ; ["Offset of field: aws_task_scheduler::alloc"] [:: std :: mem :: offset_of ! (aws_task_scheduler , alloc) - 0usize] ; ["Offset of field: aws_task_scheduler::timed_queue"] [:: std :: mem :: offset_of ! (aws_task_scheduler , timed_queue) - 8usize] ; ["Offset of field: aws_task_scheduler::timed_list"] [:: std :: mem :: offset_of ! (aws_task_scheduler , timed_list) - 96usize] ; ["Offset of field: aws_task_scheduler::asap_list"] [:: std :: mem :: offset_of ! (aws_task_scheduler , asap_list) - 128usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Init an aws_task"] pub fn aws_task_init (task : * mut aws_task , fn_ : aws_task_fn , arg : * mut :: libc :: c_void , type_tag : * const :: libc :: c_char) ; } unsafe extern "C" { pub fn aws_task_run (task : * mut aws_task , status : aws_task_status) ; } unsafe extern "C" { # [doc = " Initializes a task scheduler instance."] pub fn aws_task_scheduler_init (scheduler : * mut aws_task_scheduler , alloc : * mut aws_allocator) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Empties and executes all queued tasks, passing the AWS_TASK_STATUS_CANCELED status to the task function.\n 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) ; } unsafe extern "C" { pub fn aws_task_scheduler_is_valid (scheduler : * const aws_task_scheduler) -> bool ; } unsafe extern "C" { # [doc = " Returns whether the scheduler has any scheduled tasks.\n next_task_time (optional) will be set to time of the next task, note that 0 will be set if tasks were\n 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 ; } unsafe extern "C" { # [doc = " Schedules a task to run immediately.\n 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) ; } unsafe extern "C" { # [doc = " Schedules a task to run at time_to_run.\n 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) ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Sequentially execute all tasks scheduled to run at, or before current_time.\n AWS_TASK_STATUS_RUN_READY will be passed to the task function as the task status.\n\n 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) ; } unsafe 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 :: libc :: c_char ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_channel_direction { AWS_CHANNEL_DIR_READ = 0 , AWS_CHANNEL_DIR_WRITE = 1 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop_local_object { _unused : [u8 ; 0] , } pub type aws_channel_on_setup_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (channel : * mut aws_channel , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_channel_on_shutdown_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (channel : * mut aws_channel , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_channel_slot { pub alloc : * mut aws_allocator , pub channel : * mut aws_channel , pub adj_left : * mut aws_channel_slot , pub adj_right : * mut aws_channel_slot , pub handler : * mut aws_channel_handler , pub window_size : usize , pub upstream_message_overhead : usize , pub current_window_update_batch_size : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_slot"] [:: std :: mem :: size_of :: < aws_channel_slot > () - 64usize] ; ["Alignment of aws_channel_slot"] [:: std :: mem :: align_of :: < aws_channel_slot > () - 8usize] ; ["Offset of field: aws_channel_slot::alloc"] [:: std :: mem :: offset_of ! (aws_channel_slot , alloc) - 0usize] ; ["Offset of field: aws_channel_slot::channel"] [:: std :: mem :: offset_of ! (aws_channel_slot , channel) - 8usize] ; ["Offset of field: aws_channel_slot::adj_left"] [:: std :: mem :: offset_of ! (aws_channel_slot , adj_left) - 16usize] ; ["Offset of field: aws_channel_slot::adj_right"] [:: std :: mem :: offset_of ! (aws_channel_slot , adj_right) - 24usize] ; ["Offset of field: aws_channel_slot::handler"] [:: std :: mem :: offset_of ! (aws_channel_slot , handler) - 32usize] ; ["Offset of field: aws_channel_slot::window_size"] [:: std :: mem :: offset_of ! (aws_channel_slot , window_size) - 40usize] ; ["Offset of field: aws_channel_slot::upstream_message_overhead"] [:: std :: mem :: offset_of ! (aws_channel_slot , upstream_message_overhead) - 48usize] ; ["Offset of field: aws_channel_slot::current_window_update_batch_size"] [:: std :: mem :: offset_of ! (aws_channel_slot , current_window_update_batch_size) - 56usize] ; } ; impl Default for aws_channel_slot { 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_channel_task_fn = :: std :: option :: Option < unsafe extern "C" fn (channel_task : * mut aws_channel_task , arg : * mut :: libc :: c_void , status : aws_task_status) > ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_channel_task { pub wrapper_task : aws_task , pub task_fn : aws_channel_task_fn , pub arg : * mut :: libc :: c_void , pub type_tag : * const :: libc :: c_char , pub node : aws_linked_list_node , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_task"] [:: std :: mem :: size_of :: < aws_channel_task > () - 104usize] ; ["Alignment of aws_channel_task"] [:: std :: mem :: align_of :: < aws_channel_task > () - 8usize] ; ["Offset of field: aws_channel_task::wrapper_task"] [:: std :: mem :: offset_of ! (aws_channel_task , wrapper_task) - 0usize] ; ["Offset of field: aws_channel_task::task_fn"] [:: std :: mem :: offset_of ! (aws_channel_task , task_fn) - 64usize] ; ["Offset of field: aws_channel_task::arg"] [:: std :: mem :: offset_of ! (aws_channel_task , arg) - 72usize] ; ["Offset of field: aws_channel_task::type_tag"] [:: std :: mem :: offset_of ! (aws_channel_task , type_tag) - 80usize] ; ["Offset of field: aws_channel_task::node"] [:: std :: mem :: offset_of ! (aws_channel_task , node) - 88usize] ; } ; impl Default for aws_channel_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 , Default , Copy , Clone)] pub struct aws_channel_handler_vtable { # [doc = " Called by the channel when a message is available for processing in the read direction. It is your\n responsibility to call aws_mem_release(message->allocator, message); on message when you are finished with it.\n You must only call `aws_mem_release(message->allocator, message);` if the `process_read_message`\n returns AWS_OP_SUCCESS. In case of an error, you must not clean up the message and should just raise the error.\n\n Also keep in mind that your slot's internal window has been decremented. You'll want to call\n aws_channel_slot_increment_read_window() at some point in the future if you want to keep receiving data."] pub process_read_message : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , message : * mut aws_io_message) -> :: libc :: c_int > , # [doc = " Called by the channel when a message is available for processing in the write direction. It is your\n responsibility to call aws_mem_release(message->allocator, message); on message when you are finished with it.\n You must only call `aws_mem_release(message->allocator, message);` if the `process_read_message`\n returns AWS_OP_SUCCESS. In case of an error, you must not clean up the message and should just raise the error."] pub process_write_message : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , message : * mut aws_io_message) -> :: libc :: c_int > , # [doc = " Called by the channel when a downstream handler has issued a window increment. You'll want to update your\n internal state and likely propagate a window increment message of your own by calling\n 'aws_channel_slot_increment_read_window()'"] pub increment_read_window : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , size : usize) -> :: libc :: c_int > , # [doc = " The channel calls shutdown on all handlers twice, once to shut down reading, and once to shut down writing.\n Shutdown always begins with the left-most handler, and proceeds to the right with dir set to\n AWS_CHANNEL_DIR_READ. Then shutdown is called on handlers from right to left with dir set to\n AWS_CHANNEL_DIR_WRITE.\n\n The shutdown process does not need to complete immediately and may rely on scheduled tasks.\n The handler must call aws_channel_slot_on_handler_shutdown_complete() when it is finished,\n which propagates shutdown to the next handler.  If 'free_scarce_resources_immediately' is true,\n then resources vulnerable to denial-of-service attacks (such as sockets and file handles)\n must be closed immediately before the shutdown() call returns."] pub shutdown : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , dir : aws_channel_direction , error_code : :: libc :: c_int , free_scarce_resources_immediately : bool) -> :: libc :: c_int > , # [doc = " Called by the channel when the handler is added to a slot, to get the initial window size."] pub initial_window_size : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) -> usize > , # [doc = " Called by the channel anytime a handler is added or removed, provides a hint for downstream\n handlers to avoid message fragmentation due to message overhead."] pub message_overhead : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) -> usize > , # [doc = " Clean up any resources and deallocate yourself. The shutdown process will already be completed before this\n function is called."] pub destroy : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) > , # [doc = " Directs the channel handler to reset all of the internal statistics it tracks about itself."] pub reset_statistics : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) > , # [doc = " Adds a pointer to the handler's internal statistics (if they exist) to a list of statistics structures\n associated with the channel's handler chain."] pub gather_statistics : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , stats_list : * mut aws_array_list) > , pub trigger_read : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_handler_vtable"] [:: std :: mem :: size_of :: < aws_channel_handler_vtable > () - 80usize] ; ["Alignment of aws_channel_handler_vtable"] [:: std :: mem :: align_of :: < aws_channel_handler_vtable > () - 8usize] ; ["Offset of field: aws_channel_handler_vtable::process_read_message"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , process_read_message) - 0usize] ; ["Offset of field: aws_channel_handler_vtable::process_write_message"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , process_write_message) - 8usize] ; ["Offset of field: aws_channel_handler_vtable::increment_read_window"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , increment_read_window) - 16usize] ; ["Offset of field: aws_channel_handler_vtable::shutdown"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , shutdown) - 24usize] ; ["Offset of field: aws_channel_handler_vtable::initial_window_size"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , initial_window_size) - 32usize] ; ["Offset of field: aws_channel_handler_vtable::message_overhead"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , message_overhead) - 40usize] ; ["Offset of field: aws_channel_handler_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , destroy) - 48usize] ; ["Offset of field: aws_channel_handler_vtable::reset_statistics"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , reset_statistics) - 56usize] ; ["Offset of field: aws_channel_handler_vtable::gather_statistics"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , gather_statistics) - 64usize] ; ["Offset of field: aws_channel_handler_vtable::trigger_read"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , trigger_read) - 72usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_channel_handler { pub vtable : * mut aws_channel_handler_vtable , pub alloc : * mut aws_allocator , pub slot : * mut aws_channel_slot , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_handler"] [:: std :: mem :: size_of :: < aws_channel_handler > () - 32usize] ; ["Alignment of aws_channel_handler"] [:: std :: mem :: align_of :: < aws_channel_handler > () - 8usize] ; ["Offset of field: aws_channel_handler::vtable"] [:: std :: mem :: offset_of ! (aws_channel_handler , vtable) - 0usize] ; ["Offset of field: aws_channel_handler::alloc"] [:: std :: mem :: offset_of ! (aws_channel_handler , alloc) - 8usize] ; ["Offset of field: aws_channel_handler::slot"] [:: std :: mem :: offset_of ! (aws_channel_handler , slot) - 16usize] ; ["Offset of field: aws_channel_handler::impl_"] [:: std :: mem :: offset_of ! (aws_channel_handler , impl_) - 24usize] ; } ; impl Default for aws_channel_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 () } } } # [doc = " Args for creating a new channel.\n  event_loop to use for IO and tasks. on_setup_completed will be invoked when\n  the setup process is finished It will be executed in the event loop's thread.\n  on_shutdown_completed will be executed upon channel shutdown.\n\n  enable_read_back_pressure toggles whether or not back pressure will be applied in the channel.\n  Leave this option off unless you're using something like reactive-streams, since it is a slight throughput\n  penalty.\n\n  Unless otherwise\n  specified all functions for channels and channel slots must be executed within that channel's event-loop's thread."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_channel_options { pub event_loop : * mut aws_event_loop , pub on_setup_completed : aws_channel_on_setup_completed_fn , pub on_shutdown_completed : aws_channel_on_shutdown_completed_fn , pub setup_user_data : * mut :: libc :: c_void , pub shutdown_user_data : * mut :: libc :: c_void , pub enable_read_back_pressure : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_options"] [:: std :: mem :: size_of :: < aws_channel_options > () - 48usize] ; ["Alignment of aws_channel_options"] [:: std :: mem :: align_of :: < aws_channel_options > () - 8usize] ; ["Offset of field: aws_channel_options::event_loop"] [:: std :: mem :: offset_of ! (aws_channel_options , event_loop) - 0usize] ; ["Offset of field: aws_channel_options::on_setup_completed"] [:: std :: mem :: offset_of ! (aws_channel_options , on_setup_completed) - 8usize] ; ["Offset of field: aws_channel_options::on_shutdown_completed"] [:: std :: mem :: offset_of ! (aws_channel_options , on_shutdown_completed) - 16usize] ; ["Offset of field: aws_channel_options::setup_user_data"] [:: std :: mem :: offset_of ! (aws_channel_options , setup_user_data) - 24usize] ; ["Offset of field: aws_channel_options::shutdown_user_data"] [:: std :: mem :: offset_of ! (aws_channel_options , shutdown_user_data) - 32usize] ; ["Offset of field: aws_channel_options::enable_read_back_pressure"] [:: std :: mem :: offset_of ! (aws_channel_options , enable_read_back_pressure) - 40usize] ; } ; impl Default for aws_channel_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 () } } } unsafe extern "C" { pub static mut g_aws_channel_max_fragment_size : usize ; } unsafe extern "C" { # [doc = " Initializes channel_task for use."] pub fn aws_channel_task_init (channel_task : * mut aws_channel_task , task_fn : aws_channel_task_fn , arg : * mut :: libc :: c_void , type_tag : * const :: libc :: c_char) ; } unsafe extern "C" { # [doc = " Allocates new channel, Unless otherwise specified all functions for channels and channel slots must be executed\n within that channel's event-loop's thread. channel_options are copied."] pub fn aws_channel_new (allocator : * mut aws_allocator , creation_args : * const aws_channel_options) -> * mut aws_channel ; } unsafe extern "C" { # [doc = " Mark the channel, along with all slots and handlers, for destruction.\n Must be called after shutdown has completed.\n Can be called from any thread assuming 'aws_channel_shutdown()' has completed.\n Note that memory will not be freed until all users which acquired holds on the channel via\n aws_channel_acquire_hold(), release them via aws_channel_release_hold()."] pub fn aws_channel_destroy (channel : * mut aws_channel) ; } unsafe extern "C" { # [doc = " Initiates shutdown of the channel. Shutdown will begin with the left-most slot. Each handler will invoke\n 'aws_channel_slot_on_handler_shutdown_complete' once they've finished their shutdown process for the read direction.\n Once the right-most slot has shutdown in the read direction, the process will start shutting down starting on the\n right-most slot. Once the left-most slot has shutdown in the write direction, 'callbacks->shutdown_completed' will be\n invoked in the event loop's thread.\n\n This function can be called from any thread."] pub fn aws_channel_shutdown (channel : * mut aws_channel , error_code : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Prevent a channel's memory from being freed.\n Any number of users may acquire a hold to prevent a channel and its handlers from being unexpectedly freed.\n Any user which acquires a hold must release it via aws_channel_release_hold().\n Memory will be freed once all holds are released and aws_channel_destroy() has been called."] pub fn aws_channel_acquire_hold (channel : * mut aws_channel) ; } unsafe extern "C" { # [doc = " Release a hold on the channel's memory, allowing it to be freed.\n This may be called before or after aws_channel_destroy()."] pub fn aws_channel_release_hold (channel : * mut aws_channel) ; } unsafe extern "C" { # [doc = " Allocates and initializes a new slot for use with the channel. If this is the first slot in the channel, it will\n automatically be added to the channel as the first slot. For all subsequent calls on a given channel, the slot will\n need to be added to the channel via. the aws_channel_slot_insert_right(), aws_channel_slot_insert_end(), and\n aws_channel_slot_insert_left() APIs."] pub fn aws_channel_slot_new (channel : * mut aws_channel) -> * mut aws_channel_slot ; } unsafe extern "C" { # [doc = " Fetches the event loop the channel is a part of."] pub fn aws_channel_get_event_loop (channel : * mut aws_channel) -> * mut aws_event_loop ; } unsafe extern "C" { # [doc = " Fetches the current timestamp from the event-loop's clock, in nanoseconds."] pub fn aws_channel_current_clock_time (channel : * mut aws_channel , time_nanos : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Retrieves an object by key from the event loop's local storage."] pub fn aws_channel_fetch_local_object (channel : * mut aws_channel , key : * const :: libc :: c_void , obj : * mut aws_event_loop_local_object) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Stores an object by key in the event loop's local storage."] pub fn aws_channel_put_local_object (channel : * mut aws_channel , key : * const :: libc :: c_void , obj : * const aws_event_loop_local_object) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes an object by key from the event loop's local storage."] pub fn aws_channel_remove_local_object (channel : * mut aws_channel , key : * const :: libc :: c_void , removed_obj : * mut aws_event_loop_local_object) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Acquires a message from the event loop's message pool. size_hint is merely a hint, it may be smaller than you\n requested and you are responsible for checking the bounds of it. If the returned message is not large enough, you\n must send multiple messages. This cannot fail, it never returns NULL."] pub fn aws_channel_acquire_message_from_pool (channel : * mut aws_channel , message_type : aws_io_message_type , size_hint : usize) -> * mut aws_io_message ; } unsafe extern "C" { # [doc = " Schedules a task to run on the event loop as soon as possible.\n This is the ideal way to move a task into the correct thread. It's also handy for context switches.\n This function is safe to call from any thread.\n\n If called from the channel's event loop, the task will get directly added to the run-now list.\n If called from outside the channel's event loop, the task will go into a cross-thread task queue.\n\n If tasks must be serialized relative to some source synchronization, you may not want to use this API\n because tasks submitted from the event loop thread can \"jump ahead\" of tasks submitted from external threads\n due to this optimization.  If this is a problem, you can either refactor your submission logic or use\n the aws_channel_schedule_task_now_serialized variant which does not perform this optimization.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_channel_schedule_task_now (channel : * mut aws_channel , task : * mut aws_channel_task) ; } unsafe extern "C" { # [doc = " Schedules a task to run on the event loop as soon as possible.\n\n This variant always uses the cross thread queue rather than conditionally skipping it when already in\n the destination event loop.  While not \"optimal\", this allows us to serialize task execution no matter where\n the task was submitted from: if you are submitting tasks from a critical section, the serialized order that you\n submit is guaranteed to be the order that they execute on the event loop.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_channel_schedule_task_now_serialized (channel : * mut aws_channel , task : * mut aws_channel_task) ; } unsafe extern "C" { # [doc = " Schedules a task to run on the event loop at the specified time.\n This is the ideal way to move a task into the correct thread. It's also handy for context switches.\n Use aws_channel_current_clock_time() to get the current time in nanoseconds.\n This function is safe to call from any thread.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_channel_schedule_task_future (channel : * mut aws_channel , task : * mut aws_channel_task , run_at_nanos : u64) ; } unsafe extern "C" { # [doc = " Instrument a channel with a statistics handler.  While instrumented with a statistics handler, the channel\n will periodically report per-channel-handler-specific statistics about handler performance and state.\n\n Assigning a statistics handler to a channel is a transfer of ownership -- the channel will clean up\n the handler appropriately.  Statistics handlers may be changed dynamically (for example, the upgrade\n from a vanilla http channel to a websocket channel), but this function may only be called from the\n event loop thread that the channel is a part of.\n\n The first possible hook to set a statistics handler is the channel's creation callback."] pub fn aws_channel_set_statistics_handler (channel : * mut aws_channel , handler : * mut aws_crt_statistics_handler) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Returns true if the caller is on the event loop's thread. If false, you likely need to use\n aws_channel_schedule_task(). This function is safe to call from any thread."] pub fn aws_channel_thread_is_callers_thread (channel : * mut aws_channel) -> bool ; } unsafe extern "C" { # [doc = " Sets the handler for a slot, the slot will also call get_current_window_size() and propagate a window update\n upstream."] pub fn aws_channel_slot_set_handler (slot : * mut aws_channel_slot , handler : * mut aws_channel_handler) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes slot from the channel and deallocates the slot and its handler."] pub fn aws_channel_slot_remove (slot : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Replaces remove with new_slot. Deallocates remove and its handler."] pub fn aws_channel_slot_replace (remove : * mut aws_channel_slot , new_slot : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " inserts 'to_add' to the position immediately to the right of slot. Note that the first call to\n aws_channel_slot_new() adds it to the channel implicitly."] pub fn aws_channel_slot_insert_right (slot : * mut aws_channel_slot , to_add : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Inserts to 'to_add' the end of the channel. Note that the first call to\n aws_channel_slot_new() adds it to the channel implicitly."] pub fn aws_channel_slot_insert_end (channel : * mut aws_channel , to_add : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " inserts 'to_add' to the position immediately to the left of slot. Note that the first call to\n aws_channel_slot_new() adds it to the channel implicitly."] pub fn aws_channel_slot_insert_left (slot : * mut aws_channel_slot , to_add : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Sends a message to the adjacent slot in the channel based on dir. Also does window size checking.\n\n NOTE: if this function returns an error code, it is the caller's responsibility to release message\n back to the pool. If this function returns AWS_OP_SUCCESS, the recipient of the message has taken\n ownership of the message. So, for example, don't release a message to the pool and then return an error.\n If you encounter an error condition in this case, shutdown the channel with the appropriate error code."] pub fn aws_channel_slot_send_message (slot : * mut aws_channel_slot , message : * mut aws_io_message , dir : aws_channel_direction) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Convenience function that invokes aws_channel_acquire_message_from_pool(),\n asking for the largest reasonable DATA message that can be sent in the write direction,\n with upstream overhead accounted for. This cannot fail, it never returns NULL."] pub fn aws_channel_slot_acquire_max_message_for_write (slot : * mut aws_channel_slot) -> * mut aws_io_message ; } unsafe extern "C" { # [doc = " Issues a window update notification upstream (to the left.)"] pub fn aws_channel_slot_increment_read_window (slot : * mut aws_channel_slot , window : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Called by handlers once they have finished their shutdown in the 'dir' direction. Propagates the shutdown process\n to the next handler in the channel."] pub fn aws_channel_slot_on_handler_shutdown_complete (slot : * mut aws_channel_slot , dir : aws_channel_direction , err_code : :: libc :: c_int , free_scarce_resources_immediately : bool) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initiates shutdown on slot. callbacks->on_shutdown_completed will be called\n once the shutdown process is completed."] pub fn aws_channel_slot_shutdown (slot : * mut aws_channel_slot , dir : aws_channel_direction , err_code : :: libc :: c_int , free_scarce_resources_immediately : bool) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Fetches the downstream read window. This gives you the information necessary to honor the read window. If you call\n send_message() and it exceeds this window, the message will be rejected."] pub fn aws_channel_slot_downstream_read_window (slot : * mut aws_channel_slot) -> usize ; } unsafe extern "C" { # [doc = " Fetches the current overhead of upstream handlers. This provides a hint to avoid fragmentation if you care."] pub fn aws_channel_slot_upstream_message_overhead (slot : * mut aws_channel_slot) -> usize ; } unsafe extern "C" { # [doc = " Calls destroy on handler's vtable"] pub fn aws_channel_handler_destroy (handler : * mut aws_channel_handler) ; } unsafe extern "C" { # [doc = " Calls process_read_message on handler's vtable"] pub fn aws_channel_handler_process_read_message (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , message : * mut aws_io_message) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Calls process_write_message on handler's vtable."] pub fn aws_channel_handler_process_write_message (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , message : * mut aws_io_message) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Calls on_window_update on handler's vtable."] pub fn aws_channel_handler_increment_read_window (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , size : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " calls shutdown_direction on handler's vtable."] pub fn aws_channel_handler_shutdown (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , dir : aws_channel_direction , error_code : :: libc :: c_int , free_scarce_resources_immediately : bool) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Calls initial_window_size on handler's vtable."] pub fn aws_channel_handler_initial_window_size (handler : * mut aws_channel_handler) -> usize ; } unsafe extern "C" { pub fn aws_channel_get_first_slot (channel : * mut aws_channel) -> * mut aws_channel_slot ; } unsafe extern "C" { # [doc = " A way for external processes to force a read by the data-source channel handler.  Necessary in certain cases, like\n when a server channel finishes setting up its initial handlers, a read may have already been triggered on the\n socket (the client's CLIENT_HELLO tls payload, for example) and absent further data/notifications, this data\n would never get processed."] pub fn aws_channel_trigger_read (channel : * mut aws_channel) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_address_record_type { AWS_ADDRESS_RECORD_TYPE_A = 0 , AWS_ADDRESS_RECORD_TYPE_AAAA = 1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_get_host_address_flags { AWS_GET_HOST_ADDRESS_COUNT_RECORD_TYPE_A = 1 , AWS_GET_HOST_ADDRESS_COUNT_RECORD_TYPE_AAAA = 2 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_host_address { pub allocator : * mut aws_allocator , pub host : * const aws_string , pub address : * const aws_string , pub record_type : aws_address_record_type , pub expiry : u64 , pub use_count : usize , pub connection_failure_count : usize , pub weight : u8 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_address"] [:: std :: mem :: size_of :: < aws_host_address > () - 64usize] ; ["Alignment of aws_host_address"] [:: std :: mem :: align_of :: < aws_host_address > () - 8usize] ; ["Offset of field: aws_host_address::allocator"] [:: std :: mem :: offset_of ! (aws_host_address , allocator) - 0usize] ; ["Offset of field: aws_host_address::host"] [:: std :: mem :: offset_of ! (aws_host_address , host) - 8usize] ; ["Offset of field: aws_host_address::address"] [:: std :: mem :: offset_of ! (aws_host_address , address) - 16usize] ; ["Offset of field: aws_host_address::record_type"] [:: std :: mem :: offset_of ! (aws_host_address , record_type) - 24usize] ; ["Offset of field: aws_host_address::expiry"] [:: std :: mem :: offset_of ! (aws_host_address , expiry) - 32usize] ; ["Offset of field: aws_host_address::use_count"] [:: std :: mem :: offset_of ! (aws_host_address , use_count) - 40usize] ; ["Offset of field: aws_host_address::connection_failure_count"] [:: std :: mem :: offset_of ! (aws_host_address , connection_failure_count) - 48usize] ; ["Offset of field: aws_host_address::weight"] [:: std :: mem :: offset_of ! (aws_host_address , weight) - 56usize] ; } ; impl Default for aws_host_address { 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 once an address has been resolved for host. The type in host_addresses is struct aws_host_address (by-value).\n The caller does not own this memory and you must copy the host address before returning from this function if you\n plan to use it later. For convenience, we've provided the aws_host_address_copy() and aws_host_address_clean_up()\n functions."] pub type aws_on_host_resolved_result_fn = :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , host_name : * const aws_string , err_code : :: libc :: c_int , host_addresses : * const aws_array_list , user_data : * mut :: libc :: c_void) > ; # [doc = " Function signature for configuring your own resolver (the default just uses getaddrinfo()). The type in\n output_addresses is struct aws_host_address (by-value). We assume this function blocks, hence this absurdly\n complicated design."] pub type aws_resolve_host_implementation_fn = :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , host_name : * const aws_string , output_addresses : * mut aws_array_list , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_host_resolution_config { pub impl_ : aws_resolve_host_implementation_fn , pub max_ttl : usize , pub impl_data : * mut :: libc :: c_void , pub resolve_frequency_ns : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolution_config"] [:: std :: mem :: size_of :: < aws_host_resolution_config > () - 32usize] ; ["Alignment of aws_host_resolution_config"] [:: std :: mem :: align_of :: < aws_host_resolution_config > () - 8usize] ; ["Offset of field: aws_host_resolution_config::impl_"] [:: std :: mem :: offset_of ! (aws_host_resolution_config , impl_) - 0usize] ; ["Offset of field: aws_host_resolution_config::max_ttl"] [:: std :: mem :: offset_of ! (aws_host_resolution_config , max_ttl) - 8usize] ; ["Offset of field: aws_host_resolution_config::impl_data"] [:: std :: mem :: offset_of ! (aws_host_resolution_config , impl_data) - 16usize] ; ["Offset of field: aws_host_resolution_config::resolve_frequency_ns"] [:: std :: mem :: offset_of ! (aws_host_resolution_config , resolve_frequency_ns) - 24usize] ; } ; impl Default for aws_host_resolution_config { 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)] pub struct aws_host_resolver_purge_host_options { pub host : * const aws_string , pub on_host_purge_complete_callback : aws_simple_completion_callback , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolver_purge_host_options"] [:: std :: mem :: size_of :: < aws_host_resolver_purge_host_options > () - 24usize] ; ["Alignment of aws_host_resolver_purge_host_options"] [:: std :: mem :: align_of :: < aws_host_resolver_purge_host_options > () - 8usize] ; ["Offset of field: aws_host_resolver_purge_host_options::host"] [:: std :: mem :: offset_of ! (aws_host_resolver_purge_host_options , host) - 0usize] ; ["Offset of field: aws_host_resolver_purge_host_options::on_host_purge_complete_callback"] [:: std :: mem :: offset_of ! (aws_host_resolver_purge_host_options , on_host_purge_complete_callback) - 8usize] ; ["Offset of field: aws_host_resolver_purge_host_options::user_data"] [:: std :: mem :: offset_of ! (aws_host_resolver_purge_host_options , user_data) - 16usize] ; } ; impl Default for aws_host_resolver_purge_host_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 () } } } # [doc = " should you absolutely disdain the default implementation, feel free to implement your own."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_host_resolver_vtable { # [doc = " clean up everything you allocated, but not resolver itself."] pub destroy : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver) > , # [doc = " resolve the host by host_name, the user owns host_name, so it needs to be copied if you persist it,\n invoke res with the result. This function should never block."] pub resolve_host : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , host_name : * const aws_string , res : aws_on_host_resolved_result_fn , config : * const aws_host_resolution_config , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > , # [doc = " gives your implementation a hint that an address has some failed connections occuring. Do whatever you want (or\n nothing) about it."] pub record_connection_failure : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , address : * const aws_host_address) -> :: libc :: c_int > , # [doc = " @Deprecated Use purge_cache_with_callback instead\n wipe out anything you have cached."] pub purge_cache : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver) -> :: libc :: c_int > , # [doc = " wipe out anything you have cached."] pub purge_cache_with_callback : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , on_purge_cache_complete_callback : aws_simple_completion_callback , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > , # [doc = " wipe out anything cached for a specific host"] pub purge_host_cache : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , options : * const aws_host_resolver_purge_host_options) -> :: libc :: c_int > , # [doc = " get number of addresses for a given host."] pub get_host_address_count : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , host_name : * const aws_string , flags : u32) -> usize > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolver_vtable"] [:: std :: mem :: size_of :: < aws_host_resolver_vtable > () - 56usize] ; ["Alignment of aws_host_resolver_vtable"] [:: std :: mem :: align_of :: < aws_host_resolver_vtable > () - 8usize] ; ["Offset of field: aws_host_resolver_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , destroy) - 0usize] ; ["Offset of field: aws_host_resolver_vtable::resolve_host"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , resolve_host) - 8usize] ; ["Offset of field: aws_host_resolver_vtable::record_connection_failure"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , record_connection_failure) - 16usize] ; ["Offset of field: aws_host_resolver_vtable::purge_cache"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , purge_cache) - 24usize] ; ["Offset of field: aws_host_resolver_vtable::purge_cache_with_callback"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , purge_cache_with_callback) - 32usize] ; ["Offset of field: aws_host_resolver_vtable::purge_host_cache"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , purge_host_cache) - 40usize] ; ["Offset of field: aws_host_resolver_vtable::get_host_address_count"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , get_host_address_count) - 48usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_host_resolver { pub allocator : * mut aws_allocator , pub impl_ : * mut :: libc :: c_void , pub vtable : * mut aws_host_resolver_vtable , pub ref_count : aws_ref_count , pub shutdown_options : aws_shutdown_callback_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolver"] [:: std :: mem :: size_of :: < aws_host_resolver > () - 64usize] ; ["Alignment of aws_host_resolver"] [:: std :: mem :: align_of :: < aws_host_resolver > () - 8usize] ; ["Offset of field: aws_host_resolver::allocator"] [:: std :: mem :: offset_of ! (aws_host_resolver , allocator) - 0usize] ; ["Offset of field: aws_host_resolver::impl_"] [:: std :: mem :: offset_of ! (aws_host_resolver , impl_) - 8usize] ; ["Offset of field: aws_host_resolver::vtable"] [:: std :: mem :: offset_of ! (aws_host_resolver , vtable) - 16usize] ; ["Offset of field: aws_host_resolver::ref_count"] [:: std :: mem :: offset_of ! (aws_host_resolver , ref_count) - 24usize] ; ["Offset of field: aws_host_resolver::shutdown_options"] [:: std :: mem :: offset_of ! (aws_host_resolver , shutdown_options) - 48usize] ; } ; impl Default for aws_host_resolver { 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)] pub struct aws_host_resolver_default_options { pub max_entries : usize , pub el_group : * mut aws_event_loop_group , pub shutdown_options : * const aws_shutdown_callback_options , pub system_clock_override_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolver_default_options"] [:: std :: mem :: size_of :: < aws_host_resolver_default_options > () - 32usize] ; ["Alignment of aws_host_resolver_default_options"] [:: std :: mem :: align_of :: < aws_host_resolver_default_options > () - 8usize] ; ["Offset of field: aws_host_resolver_default_options::max_entries"] [:: std :: mem :: offset_of ! (aws_host_resolver_default_options , max_entries) - 0usize] ; ["Offset of field: aws_host_resolver_default_options::el_group"] [:: std :: mem :: offset_of ! (aws_host_resolver_default_options , el_group) - 8usize] ; ["Offset of field: aws_host_resolver_default_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_host_resolver_default_options , shutdown_options) - 16usize] ; ["Offset of field: aws_host_resolver_default_options::system_clock_override_fn"] [:: std :: mem :: offset_of ! (aws_host_resolver_default_options , system_clock_override_fn) - 24usize] ; } ; impl Default for aws_host_resolver_default_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 () } } } unsafe extern "C" { # [doc = " Copies `from` to `to`."] pub fn aws_host_address_copy (from : * const aws_host_address , to : * mut aws_host_address) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Moves `from` to `to`. After this call, from is no longer usable. Though, it could be resused for another\n move or copy operation."] pub fn aws_host_address_move (from : * mut aws_host_address , to : * mut aws_host_address) ; } unsafe extern "C" { # [doc = " Cleans up the memory for `address`"] pub fn aws_host_address_clean_up (address : * mut aws_host_address) ; } unsafe extern "C" { # [doc = " WARNING! do not call this function directly (getaddrinfo()): it blocks. Provide a pointer to this function for other\n resolution functions."] pub fn aws_default_dns_resolve (allocator : * mut aws_allocator , host_name : * const aws_string , output_addresses : * mut aws_array_list , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Creates a host resolver with the default behavior. Here's the behavior:\n\n Since there's not a reliable way to do non-blocking DNS without a ton of risky work that would need years of testing\n on every Unix system in existence, we work around it by doing a threaded implementation.\n\n When you request an address, it checks the cache. If the entry isn't in the cache it creates a new one.\n Each entry has a potentially short lived back-ground thread based on ttl for the records. Once we've populated the\n cache and you keep the resolver active, the resolution callback will be invoked immediately. When it's idle, it will\n take a little while in the background thread to fetch more, evaluate TTLs etc... In that case your callback will be\n invoked from the background thread.\n\n --------------------------------------------------------------------------------------------------------------------\n\n A few things to note about TTLs and connection failures.\n\n We attempt to honor your max ttl but will not honor it if dns queries are failing or all of your connections are\n marked as failed. Once we are able to query dns again, we will re-evaluate the TTLs.\n\n Upon notification connection failures, we move them to a separate list. Eventually we retry them when it's likely\n that the endpoint is healthy again or we don't really have another choice, but we try to keep them out of your\n hot path.\n\n ---------------------------------------------------------------------------------------------------------------------\n\n Finally, this entire design attempts to prevent problems where developers have to choose between large TTLs and thus\n sticky hosts or short TTLs and good fleet utilization but now higher latencies. In this design, we resolve every\n second in the background (only while you're actually using the record), but we do not expire the earlier resolved\n addresses until max ttl has passed.\n\n This for example, should enable you to hit thousands of hosts in the Amazon S3 fleet instead of just one or two."] pub fn aws_host_resolver_new_default (allocator : * mut aws_allocator , options : * const aws_host_resolver_default_options) -> * mut aws_host_resolver ; } unsafe extern "C" { # [doc = " Increments the reference count on the host resolver, allowing the caller to take a reference to it.\n\n Returns the same host resolver passed in."] pub fn aws_host_resolver_acquire (resolver : * mut aws_host_resolver) -> * mut aws_host_resolver ; } unsafe extern "C" { # [doc = " Decrements a host resolver's ref count.  When the ref count drops to zero, the resolver will be destroyed."] pub fn aws_host_resolver_release (resolver : * mut aws_host_resolver) ; } unsafe extern "C" { # [doc = " calls resolve_host on the vtable. config will be copied."] pub fn aws_host_resolver_resolve_host (resolver : * mut aws_host_resolver , host_name : * const aws_string , res : aws_on_host_resolved_result_fn , config : * const aws_host_resolution_config , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " calls record_connection_failure on the vtable."] pub fn aws_host_resolver_record_connection_failure (resolver : * mut aws_host_resolver , address : * const aws_host_address) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " @Deprecated Use purge_cache_with_callback instead\n calls purge_cache on the vtable."] pub fn aws_host_resolver_purge_cache (resolver : * mut aws_host_resolver) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Calls aws_host_resolver_purge_cache_with_callback on the vtable which will wipe out everything host resolver has\n cached."] pub fn aws_host_resolver_purge_cache_with_callback (resolver : * mut aws_host_resolver , on_purge_cache_complete_callback : aws_simple_completion_callback , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes the cache for a host asynchronously."] pub fn aws_host_resolver_purge_host_cache (resolver : * mut aws_host_resolver , options : * const aws_host_resolver_purge_host_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " get number of addresses for a given host."] pub fn aws_host_resolver_get_host_address_count (resolver : * mut aws_host_resolver , host_name : * const aws_string , flags : u32) -> usize ; } unsafe extern "C" { # [doc = " Returns the default host resolution config used internally if none specified.\n\n @return default host resolution config"] pub fn aws_host_resolver_init_default_resolution_config () -> aws_host_resolution_config ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_socket { _unused : [u8 ; 0] , } # [doc = " Generic event function for channel lifecycle events.\n\n Callbacks are provided for:\n   (1) Channel creation\n   (2) Channel setup - If TLS is being used, this function is called once the socket has connected, the channel has\n been initialized, and TLS has been successfully negotiated. A TLS handler has already been added to the channel. If\n TLS negotiation fails, this function will be called with the corresponding error code. If TLS is not being used, this\n function is called once the socket has connected and the channel has been initialized.\n   (3) Channel shutdown\n\n These callbacks are always invoked within the thread of the event-loop that the channel is assigned to.\n\n This function does NOT always imply \"success\" -- if error_code is AWS_OP_SUCCESS then everything was successful,\n otherwise an error condition occurred."] pub type aws_client_bootstrap_on_channel_event_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_client_bootstrap , error_code : :: libc :: c_int , channel : * mut aws_channel , user_data : * mut :: libc :: c_void) > ; # [doc = " If ALPN is being used this function will be invoked by the channel once an ALPN message is received. The returned\n channel_handler will be added to, and managed by, the channel."] pub type aws_channel_on_protocol_negotiated_fn = :: std :: option :: Option < unsafe extern "C" fn (new_slot : * mut aws_channel_slot , protocol : * mut aws_byte_buf , user_data : * mut :: libc :: c_void) -> * mut aws_channel_handler > ; # [doc = " Called after client bootstrap has been completely cleaned up, after its last refcount is released."] pub type aws_client_bootstrap_shutdown_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " aws_client_bootstrap handles creation and setup of channels that communicate via socket with a specific endpoint."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_client_bootstrap { pub allocator : * mut aws_allocator , pub event_loop_group : * mut aws_event_loop_group , pub host_resolver : * mut aws_host_resolver , pub host_resolver_config : aws_host_resolution_config , pub on_protocol_negotiated : aws_channel_on_protocol_negotiated_fn , pub ref_count : aws_ref_count , pub on_shutdown_complete : aws_client_bootstrap_shutdown_complete_fn , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_client_bootstrap"] [:: std :: mem :: size_of :: < aws_client_bootstrap > () - 104usize] ; ["Alignment of aws_client_bootstrap"] [:: std :: mem :: align_of :: < aws_client_bootstrap > () - 8usize] ; ["Offset of field: aws_client_bootstrap::allocator"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , allocator) - 0usize] ; ["Offset of field: aws_client_bootstrap::event_loop_group"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , event_loop_group) - 8usize] ; ["Offset of field: aws_client_bootstrap::host_resolver"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , host_resolver) - 16usize] ; ["Offset of field: aws_client_bootstrap::host_resolver_config"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , host_resolver_config) - 24usize] ; ["Offset of field: aws_client_bootstrap::on_protocol_negotiated"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , on_protocol_negotiated) - 56usize] ; ["Offset of field: aws_client_bootstrap::ref_count"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , ref_count) - 64usize] ; ["Offset of field: aws_client_bootstrap::on_shutdown_complete"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , on_shutdown_complete) - 88usize] ; ["Offset of field: aws_client_bootstrap::user_data"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , user_data) - 96usize] ; } ; impl Default for aws_client_bootstrap { 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 = " aws_client_bootstrap creation options."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_client_bootstrap_options { pub event_loop_group : * mut aws_event_loop_group , pub host_resolver : * mut aws_host_resolver , pub host_resolution_config : * const aws_host_resolution_config , pub on_shutdown_complete : aws_client_bootstrap_shutdown_complete_fn , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_client_bootstrap_options"] [:: std :: mem :: size_of :: < aws_client_bootstrap_options > () - 40usize] ; ["Alignment of aws_client_bootstrap_options"] [:: std :: mem :: align_of :: < aws_client_bootstrap_options > () - 8usize] ; ["Offset of field: aws_client_bootstrap_options::event_loop_group"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , event_loop_group) - 0usize] ; ["Offset of field: aws_client_bootstrap_options::host_resolver"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , host_resolver) - 8usize] ; ["Offset of field: aws_client_bootstrap_options::host_resolution_config"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , host_resolution_config) - 16usize] ; ["Offset of field: aws_client_bootstrap_options::on_shutdown_complete"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , on_shutdown_complete) - 24usize] ; ["Offset of field: aws_client_bootstrap_options::user_data"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , user_data) - 32usize] ; } ; impl Default for aws_client_bootstrap_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 () } } } # [doc = " If TLS is being used, this function is called once the socket has received an incoming connection, the channel has\n been initialized, and TLS has been successfully negotiated. A TLS handler has already been added to the channel. If\n TLS negotiation fails, this function will be called with the corresponding error code.\n\n If TLS is not being used, this function is called once the socket has received an incoming connection and the channel\n has been initialized.\n\n This function is always called within the thread of the event-loop that the new channel is assigned to upon success.\n\n On failure, the channel might not be assigned to an event loop yet, and will thus be invoked on the listener's\n event-loop thread.\n\n This function does NOT mean \"success\", if error_code is AWS_OP_SUCCESS then everything was successful, otherwise an\n error condition occurred.\n\n If an error occurred, you do not need to shutdown the channel. The `aws_channel_client_shutdown_callback` will be\n invoked once the channel has finished shutting down."] pub type aws_server_bootstrap_on_accept_channel_setup_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_server_bootstrap , error_code : :: libc :: c_int , channel : * mut aws_channel , user_data : * mut :: libc :: c_void) > ; # [doc = " Once the channel shuts down, this function will be invoked within the thread of\n the event-loop that the channel is assigned to.\n\n Note: this function is only invoked if the channel was successfully setup,\n e.g. aws_server_bootstrap_on_accept_channel_setup_fn() was invoked without an error code."] pub type aws_server_bootstrap_on_accept_channel_shutdown_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_server_bootstrap , error_code : :: libc :: c_int , channel : * mut aws_channel , user_data : * mut :: libc :: c_void) > ; # [doc = " This function is only used for async listener (Apple Network Framework in this case).\n Once the server listener socket is finished setup and starting listening, this fuction\n will be invoked."] pub type aws_server_bootstrap_on_listener_setup_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_server_bootstrap , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Once the server listener socket is finished destroying, and all the existing connections are closed, this fuction\n will be invoked."] pub type aws_server_bootstrap_on_server_listener_destroy_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_server_bootstrap , user_data : * mut :: libc :: c_void) > ; # [doc = " aws_server_bootstrap manages listening sockets, creating and setting up channels to handle each incoming connection."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_server_bootstrap { pub allocator : * mut aws_allocator , pub event_loop_group : * mut aws_event_loop_group , pub on_protocol_negotiated : aws_channel_on_protocol_negotiated_fn , pub ref_count : aws_ref_count , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_server_bootstrap"] [:: std :: mem :: size_of :: < aws_server_bootstrap > () - 48usize] ; ["Alignment of aws_server_bootstrap"] [:: std :: mem :: align_of :: < aws_server_bootstrap > () - 8usize] ; ["Offset of field: aws_server_bootstrap::allocator"] [:: std :: mem :: offset_of ! (aws_server_bootstrap , allocator) - 0usize] ; ["Offset of field: aws_server_bootstrap::event_loop_group"] [:: std :: mem :: offset_of ! (aws_server_bootstrap , event_loop_group) - 8usize] ; ["Offset of field: aws_server_bootstrap::on_protocol_negotiated"] [:: std :: mem :: offset_of ! (aws_server_bootstrap , on_protocol_negotiated) - 16usize] ; ["Offset of field: aws_server_bootstrap::ref_count"] [:: std :: mem :: offset_of ! (aws_server_bootstrap , ref_count) - 24usize] ; } ; impl Default for aws_server_bootstrap { 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 = " Socket-based channel creation options.\n\n bootstrap - configs name resolution and which event loop group the connection will be seated into\n host_name - host to connect to; if a dns address, will be resolved prior to connecting\n port - port to connect to\n socket_options - socket properties, including type (tcp vs. udp vs. unix domain) and connect timeout.  TLS\n   connections are currently restricted to tcp (AWS_SOCKET_STREAM) only.\n tls_options - (optional) tls context to apply after connection establishment.  If NULL, the connection will\n   not be protected by TLS.\n creation_callback - (optional) callback invoked when the channel is first created.  This is always right after\n   the connection was successfully established.  *Does NOT* get called if the initial connect failed.\n setup_callback - callback invoked once the channel is ready for use and TLS has been negotiated or if an error\n   is encountered\n shutdown_callback - callback invoked once the channel has shutdown.\n enable_read_back_pressure - controls whether or not back pressure will be applied in the channel\n user_data - arbitrary data to pass back to the various callbacks\n requested_event_loop - if set, the connection will be placed on the requested event loop rather than one\n  chosen internally from the bootstrap's associated event loop group.  It is an error to pass in an event loop\n  that is not associated with the bootstrap's event loop group.\n\n Immediately after the `shutdown_callback` returns, the channel is cleaned up automatically. All callbacks are invoked\n in the thread of the event-loop that the new channel is assigned to.\n"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_socket_channel_bootstrap_options { pub bootstrap : * mut aws_client_bootstrap , pub host_name : * const :: libc :: c_char , pub port : u32 , pub socket_options : * const aws_socket_options , pub tls_options : * const aws_tls_connection_options , pub creation_callback : aws_client_bootstrap_on_channel_event_fn , pub setup_callback : aws_client_bootstrap_on_channel_event_fn , pub shutdown_callback : aws_client_bootstrap_on_channel_event_fn , pub enable_read_back_pressure : bool , pub user_data : * mut :: libc :: c_void , pub requested_event_loop : * mut aws_event_loop , pub host_resolution_override_config : * const aws_host_resolution_config , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_socket_channel_bootstrap_options"] [:: std :: mem :: size_of :: < aws_socket_channel_bootstrap_options > () - 96usize] ; ["Alignment of aws_socket_channel_bootstrap_options"] [:: std :: mem :: align_of :: < aws_socket_channel_bootstrap_options > () - 8usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , bootstrap) - 0usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::host_name"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , host_name) - 8usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::port"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , port) - 16usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::socket_options"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , socket_options) - 24usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::tls_options"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , tls_options) - 32usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::creation_callback"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , creation_callback) - 40usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::setup_callback"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , setup_callback) - 48usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , shutdown_callback) - 56usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::enable_read_back_pressure"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , enable_read_back_pressure) - 64usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::user_data"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , user_data) - 72usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::requested_event_loop"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , requested_event_loop) - 80usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::host_resolution_override_config"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , host_resolution_override_config) - 88usize] ; } ; impl Default for aws_socket_channel_bootstrap_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 () } } } # [doc = " Arguments to setup a server socket listener which will also negotiate and configure TLS.\n This creates a socket listener bound to `host` and 'port' using socket options `options`, and TLS options\n `tls_options`. `incoming_callback` will be invoked once an incoming channel is ready for use and TLS is\n finished negotiating, or if an error is encountered. `shutdown_callback` will be invoked once the channel has\n shutdown. `destroy_callback` will be invoked after the server socket listener is destroyed, and all associated\n connections and channels have finished shutting down. Immediately after the `shutdown_callback` returns, the channel\n is cleaned up automatically. All callbacks are invoked in the thread of the event-loop that listener is assigned to.\n\n Upon shutdown of your application, you'll want to call `aws_server_bootstrap_destroy_socket_listener` with the return\n value from this function.\n\n The socket type in `options` must be AWS_SOCKET_STREAM if tls_options is set.\n DTLS is not currently supported for tls."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_server_socket_channel_bootstrap_options { pub bootstrap : * mut aws_server_bootstrap , pub host_name : * const :: libc :: c_char , pub port : u32 , pub socket_options : * const aws_socket_options , pub tls_options : * const aws_tls_connection_options , pub setup_callback : aws_server_bootstrap_on_listener_setup_fn , pub incoming_callback : aws_server_bootstrap_on_accept_channel_setup_fn , pub shutdown_callback : aws_server_bootstrap_on_accept_channel_shutdown_fn , pub destroy_callback : aws_server_bootstrap_on_server_listener_destroy_fn , pub enable_read_back_pressure : bool , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_server_socket_channel_bootstrap_options"] [:: std :: mem :: size_of :: < aws_server_socket_channel_bootstrap_options > () - 88usize] ; ["Alignment of aws_server_socket_channel_bootstrap_options"] [:: std :: mem :: align_of :: < aws_server_socket_channel_bootstrap_options > () - 8usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , bootstrap) - 0usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::host_name"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , host_name) - 8usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::port"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , port) - 16usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::socket_options"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , socket_options) - 24usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::tls_options"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , tls_options) - 32usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::setup_callback"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , setup_callback) - 40usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::incoming_callback"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , incoming_callback) - 48usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , shutdown_callback) - 56usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::destroy_callback"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , destroy_callback) - 64usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::enable_read_back_pressure"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , enable_read_back_pressure) - 72usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::user_data"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , user_data) - 80usize] ; } ; impl Default for aws_server_socket_channel_bootstrap_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 () } } } unsafe extern "C" { # [doc = " Create the client bootstrap."] pub fn aws_client_bootstrap_new (allocator : * mut aws_allocator , options : * const aws_client_bootstrap_options) -> * mut aws_client_bootstrap ; } unsafe extern "C" { # [doc = " Increments a client bootstrap's ref count, allowing the caller to take a reference to it.\n\n Returns the same client bootstrap passed in."] pub fn aws_client_bootstrap_acquire (bootstrap : * mut aws_client_bootstrap) -> * mut aws_client_bootstrap ; } unsafe extern "C" { # [doc = " Decrements a client bootstrap's ref count.  When the ref count drops to zero, the bootstrap will be destroyed."] pub fn aws_client_bootstrap_release (bootstrap : * mut aws_client_bootstrap) ; } unsafe extern "C" { # [doc = " When using TLS, if ALPN is used, this callback will be invoked from the channel. The returned handler will be added\n to the channel."] pub fn aws_client_bootstrap_set_alpn_callback (bootstrap : * mut aws_client_bootstrap , on_protocol_negotiated : aws_channel_on_protocol_negotiated_fn) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Sets up a client socket channel."] pub fn aws_client_bootstrap_new_socket_channel (options : * mut aws_socket_channel_bootstrap_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes the server bootstrap with `allocator` and `el_group`. This object manages listeners, server connections,\n and channels."] pub fn aws_server_bootstrap_new (allocator : * mut aws_allocator , el_group : * mut aws_event_loop_group) -> * mut aws_server_bootstrap ; } unsafe extern "C" { # [doc = " Increments a server bootstrap's ref count, allowing the caller to take a reference to it.\n\n Returns the same server bootstrap passed in."] pub fn aws_server_bootstrap_acquire (bootstrap : * mut aws_server_bootstrap) -> * mut aws_server_bootstrap ; } unsafe extern "C" { # [doc = " Decrements a server bootstrap's ref count.  When the ref count drops to zero, the bootstrap will be destroyed."] pub fn aws_server_bootstrap_release (bootstrap : * mut aws_server_bootstrap) ; } unsafe extern "C" { # [doc = " When using TLS, if ALPN is used, this callback will be invoked from the channel. The returned handler will be added\n to the channel."] pub fn aws_server_bootstrap_set_alpn_callback (bootstrap : * mut aws_server_bootstrap , on_protocol_negotiated : aws_channel_on_protocol_negotiated_fn) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Sets up a server socket listener. If you are planning on using TLS, use\n `aws_server_bootstrap_new_tls_socket_listener` instead. This creates a socket listener bound to `local_endpoint`\n using socket options `options`. `incoming_callback` will be invoked once an incoming channel is ready for use or if\n an error is encountered. `shutdown_callback` will be invoked once the channel has shutdown. `destroy_callback` will\n be invoked after the server socket listener is destroyed, and all associated connections and channels have finished\n shutting down. Immediately after the `shutdown_callback` returns, the channel is cleaned up automatically. All\n callbacks are invoked the thread of the event-loop that the listening socket is assigned to\n\n `setup_callback`. If set, the callback will be asynchronously invoked when the listener is ready for use. For Apple\n Network Framework, the listener is not usable until the callback is invoked. If the listener creation failed\n (return NULL), the `setup_callback` will not be invoked.\n\n Upon shutdown of your application, you'll want to call `aws_server_bootstrap_destroy_socket_listener` with the return\n value from this function.\n\n bootstrap_options is copied."] pub fn aws_server_bootstrap_new_socket_listener (bootstrap_options : * const aws_server_socket_channel_bootstrap_options) -> * mut aws_socket ; } unsafe extern "C" { # [doc = " Shuts down 'listener' and cleans up any resources associated with it. Any incoming channels on `listener` will still\n be active. `destroy_callback` will be invoked after the server socket listener is destroyed, and all associated\n connections and channels have finished shutting down."] pub fn aws_server_bootstrap_destroy_socket_listener (bootstrap : * mut aws_server_bootstrap , listener : * mut aws_socket) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop_options { _unused : [u8 ; 0] , } # [doc = " @internal"] pub type aws_event_loop_on_event_fn = :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , handle : * mut aws_io_handle , events : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " @internal"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_event_loop_vtable { pub start_destroy : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) > , pub complete_destroy : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) > , pub run : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) -> :: libc :: c_int > , pub stop : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) -> :: libc :: c_int > , pub wait_for_stop_completion : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) -> :: libc :: c_int > , pub schedule_task_now : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , task : * mut aws_task) > , pub schedule_task_now_serialized : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , task : * mut aws_task) > , pub schedule_task_future : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , task : * mut aws_task , run_at_nanos : u64) > , pub cancel_task : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , task : * mut aws_task) > , pub connect_to_io_completion_port : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , handle : * mut aws_io_handle) -> :: libc :: c_int > , pub subscribe_to_io_events : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , handle : * mut aws_io_handle , events : :: libc :: c_int , on_event : aws_event_loop_on_event_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > , pub unsubscribe_from_io_events : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , handle : * mut aws_io_handle) -> :: libc :: c_int > , pub free_io_event_resources : :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > , pub is_on_callers_thread : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) -> bool > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_event_loop_vtable"] [:: std :: mem :: size_of :: < aws_event_loop_vtable > () - 112usize] ; ["Alignment of aws_event_loop_vtable"] [:: std :: mem :: align_of :: < aws_event_loop_vtable > () - 8usize] ; ["Offset of field: aws_event_loop_vtable::start_destroy"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , start_destroy) - 0usize] ; ["Offset of field: aws_event_loop_vtable::complete_destroy"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , complete_destroy) - 8usize] ; ["Offset of field: aws_event_loop_vtable::run"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , run) - 16usize] ; ["Offset of field: aws_event_loop_vtable::stop"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , stop) - 24usize] ; ["Offset of field: aws_event_loop_vtable::wait_for_stop_completion"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , wait_for_stop_completion) - 32usize] ; ["Offset of field: aws_event_loop_vtable::schedule_task_now"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , schedule_task_now) - 40usize] ; ["Offset of field: aws_event_loop_vtable::schedule_task_now_serialized"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , schedule_task_now_serialized) - 48usize] ; ["Offset of field: aws_event_loop_vtable::schedule_task_future"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , schedule_task_future) - 56usize] ; ["Offset of field: aws_event_loop_vtable::cancel_task"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , cancel_task) - 64usize] ; ["Offset of field: aws_event_loop_vtable::connect_to_io_completion_port"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , connect_to_io_completion_port) - 72usize] ; ["Offset of field: aws_event_loop_vtable::subscribe_to_io_events"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , subscribe_to_io_events) - 80usize] ; ["Offset of field: aws_event_loop_vtable::unsubscribe_from_io_events"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , unsubscribe_from_io_events) - 88usize] ; ["Offset of field: aws_event_loop_vtable::free_io_event_resources"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , free_io_event_resources) - 96usize] ; ["Offset of field: aws_event_loop_vtable::is_on_callers_thread"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , is_on_callers_thread) - 104usize] ; } ; # [repr (u32)] # [non_exhaustive] # [doc = " Event Loop Type.  If set to `AWS_EVENT_LOOP_PLATFORM_DEFAULT`, the event loop will automatically use the platform’s\n default.\n\n Default Event Loop Type\n Linux       | AWS_EVENT_LOOP_EPOLL\n Windows     | AWS_EVENT_LOOP_IOCP\n BSD Variants| AWS_EVENT_LOOP_KQUEUE\n macOS       | AWS_EVENT_LOOP_KQUEUE\n iOS         | AWS_EVENT_LOOP_DISPATCH_QUEUE"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_event_loop_type { AWS_EVENT_LOOP_PLATFORM_DEFAULT = 0 , AWS_EVENT_LOOP_EPOLL = 1 , AWS_EVENT_LOOP_IOCP = 2 , AWS_EVENT_LOOP_KQUEUE = 3 , AWS_EVENT_LOOP_DISPATCH_QUEUE = 4 , } # [doc = " Event loop group configuration options"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop_group_options { # [doc = " How many event loops that event loop group should contain.  For most group types, this implies\n the creation and management of an analagous amount of managed threads"] pub loop_count : u16 , # [doc = " Event loop type. If the event loop type is set to AWS_EVENT_LOOP_PLATFORM_DEFAULT, the\n creation function will automatically use the platform’s default event loop type."] pub type_ : aws_event_loop_type , # [doc = " Optional callback to invoke when the event loop group finishes destruction."] pub shutdown_options : * const aws_shutdown_callback_options , # [doc = " Optional configuration to control how the event loop group's threads bind to CPU groups"] pub cpu_group : * const u16 , # [doc = " Override for the clock function that event loops should use.  Defaults to the system's high resolution\n timer.\n\n Do not bind this value to managed code; it is only used in timing-sensitive tests."] pub clock_override : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_event_loop_group_options"] [:: std :: mem :: size_of :: < aws_event_loop_group_options > () - 32usize] ; ["Alignment of aws_event_loop_group_options"] [:: std :: mem :: align_of :: < aws_event_loop_group_options > () - 8usize] ; ["Offset of field: aws_event_loop_group_options::loop_count"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , loop_count) - 0usize] ; ["Offset of field: aws_event_loop_group_options::type_"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , type_) - 4usize] ; ["Offset of field: aws_event_loop_group_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , shutdown_options) - 8usize] ; ["Offset of field: aws_event_loop_group_options::cpu_group"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , cpu_group) - 16usize] ; ["Offset of field: aws_event_loop_group_options::clock_override"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , clock_override) - 24usize] ; } ; impl Default for aws_event_loop_group_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 () } } } unsafe extern "C" { # [doc = " The event loop will schedule the task and run it on the event loop thread as soon as possible.\n Note that cancelled tasks may execute outside the event loop thread.\n This function may be called from outside or inside the event loop thread.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_event_loop_schedule_task_now (event_loop : * mut aws_event_loop , task : * mut aws_task) ; } unsafe extern "C" { # [doc = " Variant of aws_event_loop_schedule_task_now that forces all tasks to go through the cross thread task queue,\n guaranteeing that order-of-submission is order-of-execution.  If you need this guarantee, you must use this\n function; the base function contains short-circuiting logic that breaks ordering invariants.  Beyond that, all\n properties of aws_event_loop_schedule_task_now apply to this function as well.\n\n Serialization guarantee does not apply to task cancellation (which can occur out-of-order or even out-of-thread in\n certain cases)."] pub fn aws_event_loop_schedule_task_now_serialized (event_loop : * mut aws_event_loop , task : * mut aws_task) ; } unsafe extern "C" { # [doc = " The event loop will schedule the task and run it at the specified time.\n Use aws_event_loop_current_clock_time() to query the current time in nanoseconds.\n Note that cancelled tasks may execute outside the event loop thread.\n This function may be called from outside or inside the event loop thread.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_event_loop_schedule_task_future (event_loop : * mut aws_event_loop , task : * mut aws_task , run_at_nanos : u64) ; } unsafe extern "C" { # [doc = " Cancels task.\n This function must be called from the event loop's thread, and is only guaranteed\n to work properly on tasks scheduled from within the event loop's thread.\n The task will be executed with the AWS_TASK_STATUS_CANCELED status inside this call."] pub fn aws_event_loop_cancel_task (event_loop : * mut aws_event_loop , task : * mut aws_task) ; } unsafe extern "C" { # [doc = " Returns true if the event loop's thread is the same thread that called this function, otherwise false."] pub fn aws_event_loop_thread_is_callers_thread (event_loop : * mut aws_event_loop) -> bool ; } unsafe extern "C" { # [doc = " Gets the current timestamp for the event loop's clock, in nanoseconds. This function is thread-safe."] pub fn aws_event_loop_current_clock_time (event_loop : * const aws_event_loop , time_nanos : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Creation function for event loop groups."] pub fn aws_event_loop_group_new (allocator : * mut aws_allocator , options : * const aws_event_loop_group_options) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " Increments the reference count on the event loop group, allowing the caller to take a reference to it.\n\n Returns the same event loop group passed in."] pub fn aws_event_loop_group_acquire (el_group : * mut aws_event_loop_group) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " Decrements an event loop group's ref count.  When the ref count drops to zero, the event loop group will be\n destroyed."] pub fn aws_event_loop_group_release (el_group : * mut aws_event_loop_group) ; } unsafe extern "C" { # [doc = " Increments the reference count on the event loop group from event loop, allowing the caller to take a reference to\n it.\n\n Returns the base event loop group of the event loop, or null if the event loop does not belong to a group."] pub fn aws_event_loop_group_acquire_from_event_loop (event_loop : * mut aws_event_loop) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " Decrements the ref count of the event loop's base event loop group.  When the ref count drops to zero, the event loop\n group will be destroyed."] pub fn aws_event_loop_group_release_from_event_loop (event_loop : * mut aws_event_loop) ; } unsafe extern "C" { # [doc = " Returns the event loop at a particular index.  If the index is out of bounds, null is returned."] pub fn aws_event_loop_group_get_loop_at (el_group : * mut aws_event_loop_group , index : usize) -> * mut aws_event_loop ; } unsafe extern "C" { # [doc = " Gets the number of event loops managed by an event loop group."] pub fn aws_event_loop_group_get_loop_count (el_group : * const aws_event_loop_group) -> usize ; } unsafe extern "C" { # [doc = " Gets the event loop type used by an event loop group."] pub fn aws_event_loop_group_get_type (el_group : * const aws_event_loop_group) -> aws_event_loop_type ; } unsafe extern "C" { # [doc = " Fetches the next loop for use. The purpose is to enable load balancing across loops. You should not depend on how\n this load balancing is done as it is subject to change in the future. Currently it uses the \"best-of-two\" algorithm\n based on the load factor of each loop."] pub fn aws_event_loop_group_get_next_loop (el_group : * mut aws_event_loop_group) -> * mut aws_event_loop ; } unsafe extern "C" { # [doc = " @deprecated - use aws_event_loop_group_new() instead"] pub fn aws_event_loop_group_new_default (alloc : * mut aws_allocator , max_threads : u16 , shutdown_options : * const aws_shutdown_callback_options) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " @deprecated - use aws_event_loop_group_new() instead"] pub fn aws_event_loop_group_new_default_pinned_to_cpu_group (alloc : * mut aws_allocator , max_threads : u16 , cpu_group : u16 , shutdown_options : * const aws_shutdown_callback_options) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " @internal - Don't use outside of testing.\n\n Returns the opaque internal user data of an event loop.  Can be cast into a specific implementation by\n privileged consumers."] pub fn aws_event_loop_get_impl (event_loop : * mut aws_event_loop) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " @internal - Don't use outside of testing.\n\n Initializes the base structure used by all event loop implementations with test-oriented overrides."] pub fn aws_event_loop_new_base (allocator : * mut aws_allocator , clock : aws_io_clock_fn , vtable : * mut aws_event_loop_vtable , impl_ : * mut :: libc :: c_void) -> * mut aws_event_loop ; } unsafe extern "C" { # [doc = " @internal - Don't use outside of testing.\n\n Common cleanup code for all implementations.\n This is only called from the *destroy() function of event loop implementations."] pub fn aws_event_loop_clean_up_base (event_loop : * mut aws_event_loop) ; } unsafe extern "C" { # [doc = " @internal - Don't use outside of testing.\n\n Destroys an event loop implementation.\n If the event loop is still in a running state, this function will block waiting on the event loop to shutdown.\n If the event loop is shared by multiple threads then destroy must be called by exactly one thread. All other threads\n must ensure their API calls to the event loop happen-before the call to destroy.\n\n Internally, this calls aws_event_loop_start_destroy() followed by aws_event_loop_complete_destroy()"] pub fn aws_event_loop_destroy (event_loop : * mut aws_event_loop) ; } unsafe extern "C" { # [doc = " @internal\n\n Signals an event loop to begin its destruction process.  If an event loop's implementation of this API does anything,\n it must be quick and non-blocking.  Most event loop implementations have an empty implementation for this function."] pub fn aws_event_loop_start_destroy (event_loop : * mut aws_event_loop) ; } unsafe extern "C" { # [doc = " @internal\n\n Waits for an event loop to complete its destruction process.  aws_event_loop_start_destroy() must have been called\n previously for this function to not deadlock."] pub fn aws_event_loop_complete_destroy (event_loop : * mut aws_event_loop) ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_stream_seek_basis { AWS_SSB_BEGIN = 0 , AWS_SSB_END = 2 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_stream_status { pub is_end_of_stream : bool , pub is_valid : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_stream_status"] [:: std :: mem :: size_of :: < aws_stream_status > () - 2usize] ; ["Alignment of aws_stream_status"] [:: std :: mem :: align_of :: < aws_stream_status > () - 1usize] ; ["Offset of field: aws_stream_status::is_end_of_stream"] [:: std :: mem :: offset_of ! (aws_stream_status , is_end_of_stream) - 0usize] ; ["Offset of field: aws_stream_status::is_valid"] [:: std :: mem :: offset_of ! (aws_stream_status , is_valid) - 1usize] ; } ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_input_stream_vtable { pub seek : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream , offset : i64 , basis : aws_stream_seek_basis) -> :: libc :: c_int > , # [doc = " Stream as much data as will fit into the destination buffer and update its length.\n The destination buffer's capacity MUST NOT be changed.\n\n Return AWS_OP_SUCCESS if the read is successful.\n If AWS_OP_ERR is returned, the stream is assumed to be invalid and any data written to the buffer is ignored.\n\n If no more data is currently available, or the end of the stream has been reached, simply return AWS_OP_SUCCESS\n without touching the destination buffer."] pub read : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream , dest : * mut aws_byte_buf) -> :: libc :: c_int > , pub get_status : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream , status : * mut aws_stream_status) -> :: libc :: c_int > , pub get_length : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream , out_length : * mut i64) -> :: libc :: c_int > , # [doc = " Optional.\n If not set, the default aws_ref_count_acquire/release will be used.\n Set for high level language binding that has its own refcounting implementation and needs to be kept alive from\n C.\n If set, ref_count member will not be used."] pub acquire : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream) > , pub release : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_input_stream_vtable"] [:: std :: mem :: size_of :: < aws_input_stream_vtable > () - 48usize] ; ["Alignment of aws_input_stream_vtable"] [:: std :: mem :: align_of :: < aws_input_stream_vtable > () - 8usize] ; ["Offset of field: aws_input_stream_vtable::seek"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , seek) - 0usize] ; ["Offset of field: aws_input_stream_vtable::read"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , read) - 8usize] ; ["Offset of field: aws_input_stream_vtable::get_status"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , get_status) - 16usize] ; ["Offset of field: aws_input_stream_vtable::get_length"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , get_length) - 24usize] ; ["Offset of field: aws_input_stream_vtable::acquire"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , acquire) - 32usize] ; ["Offset of field: aws_input_stream_vtable::release"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , release) - 40usize] ; } ; # [doc = " Base class for input streams.\n Note: when you implement one input stream, the ref_count needs to be initialized to clean up the resource when\n reaches to zero."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_input_stream { pub impl_ : * mut :: libc :: c_void , pub vtable : * const aws_input_stream_vtable , pub ref_count : aws_ref_count , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_input_stream"] [:: std :: mem :: size_of :: < aws_input_stream > () - 40usize] ; ["Alignment of aws_input_stream"] [:: std :: mem :: align_of :: < aws_input_stream > () - 8usize] ; ["Offset of field: aws_input_stream::impl_"] [:: std :: mem :: offset_of ! (aws_input_stream , impl_) - 0usize] ; ["Offset of field: aws_input_stream::vtable"] [:: std :: mem :: offset_of ! (aws_input_stream , vtable) - 8usize] ; ["Offset of field: aws_input_stream::ref_count"] [:: std :: mem :: offset_of ! (aws_input_stream , ref_count) - 16usize] ; } ; impl Default for aws_input_stream { 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 () } } } unsafe extern "C" { # [doc = " Increments the reference count on the input stream, allowing the caller to take a reference to it.\n\n Returns the same input stream passed in."] pub fn aws_input_stream_acquire (stream : * mut aws_input_stream) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Decrements a input stream's ref count.  When the ref count drops to zero, the input stream will be destroyed.\n\n Returns NULL always."] pub fn aws_input_stream_release (stream : * mut aws_input_stream) -> * mut aws_input_stream ; } unsafe extern "C" { pub fn aws_input_stream_seek (stream : * mut aws_input_stream , offset : i64 , basis : aws_stream_seek_basis) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_input_stream_read (stream : * mut aws_input_stream , dest : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_input_stream_get_status (stream : * mut aws_input_stream , status : * mut aws_stream_status) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_input_stream_get_length (stream : * mut aws_input_stream , out_length : * mut i64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_input_stream_destroy (stream : * mut aws_input_stream) ; } unsafe extern "C" { pub fn aws_input_stream_new_from_cursor (allocator : * mut aws_allocator , cursor : * const aws_byte_cursor) -> * mut aws_input_stream ; } unsafe extern "C" { pub fn aws_input_stream_new_from_file (allocator : * mut aws_allocator , file_name : * const :: libc :: c_char) -> * mut aws_input_stream ; } unsafe extern "C" { pub fn aws_input_stream_new_from_open_file (allocator : * mut aws_allocator , file : * mut FILE) -> * mut aws_input_stream ; } # [doc = " Data representing a URI. uri_str is always allocated and filled in.\n The other portions are merely storing offsets into uri_str."] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 : u32 , pub path : aws_byte_cursor , pub query_string : aws_byte_cursor , pub path_and_query : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_uri"] [:: std :: mem :: size_of :: < aws_uri > () - 200usize] ; ["Alignment of aws_uri"] [:: std :: mem :: align_of :: < aws_uri > () - 8usize] ; ["Offset of field: aws_uri::self_size"] [:: std :: mem :: offset_of ! (aws_uri , self_size) - 0usize] ; ["Offset of field: aws_uri::allocator"] [:: std :: mem :: offset_of ! (aws_uri , allocator) - 8usize] ; ["Offset of field: aws_uri::uri_str"] [:: std :: mem :: offset_of ! (aws_uri , uri_str) - 16usize] ; ["Offset of field: aws_uri::scheme"] [:: std :: mem :: offset_of ! (aws_uri , scheme) - 48usize] ; ["Offset of field: aws_uri::authority"] [:: std :: mem :: offset_of ! (aws_uri , authority) - 64usize] ; ["Offset of field: aws_uri::userinfo"] [:: std :: mem :: offset_of ! (aws_uri , userinfo) - 80usize] ; ["Offset of field: aws_uri::user"] [:: std :: mem :: offset_of ! (aws_uri , user) - 96usize] ; ["Offset of field: aws_uri::password"] [:: std :: mem :: offset_of ! (aws_uri , password) - 112usize] ; ["Offset of field: aws_uri::host_name"] [:: std :: mem :: offset_of ! (aws_uri , host_name) - 128usize] ; ["Offset of field: aws_uri::port"] [:: std :: mem :: offset_of ! (aws_uri , port) - 144usize] ; ["Offset of field: aws_uri::path"] [:: std :: mem :: offset_of ! (aws_uri , path) - 152usize] ; ["Offset of field: aws_uri::query_string"] [:: std :: mem :: offset_of ! (aws_uri , query_string) - 168usize] ; ["Offset of field: aws_uri::path_and_query"] [:: std :: mem :: offset_of ! (aws_uri , path_and_query) - 184usize] ; } ; 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\n will be stored in key"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_uri_param { pub key : aws_byte_cursor , pub value : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_uri_param"] [:: std :: mem :: size_of :: < aws_uri_param > () - 32usize] ; ["Alignment of aws_uri_param"] [:: std :: mem :: align_of :: < aws_uri_param > () - 8usize] ; ["Offset of field: aws_uri_param::key"] [:: std :: mem :: offset_of ! (aws_uri_param , key) - 0usize] ; ["Offset of field: aws_uri_param::value"] [:: std :: mem :: offset_of ! (aws_uri_param , value) - 16usize] ; } ; 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\n be initialized before passing them to aws_uri_init().\n\n query_string and query_params are exclusive to each other. If you set\n query_string, do not prepend it with '?'"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_uri_builder_options { pub scheme : aws_byte_cursor , pub path : aws_byte_cursor , pub host_name : aws_byte_cursor , pub port : u32 , pub query_params : * mut aws_array_list , pub query_string : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_uri_builder_options"] [:: std :: mem :: size_of :: < aws_uri_builder_options > () - 80usize] ; ["Alignment of aws_uri_builder_options"] [:: std :: mem :: align_of :: < aws_uri_builder_options > () - 8usize] ; ["Offset of field: aws_uri_builder_options::scheme"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , scheme) - 0usize] ; ["Offset of field: aws_uri_builder_options::path"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , path) - 16usize] ; ["Offset of field: aws_uri_builder_options::host_name"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , host_name) - 32usize] ; ["Offset of field: aws_uri_builder_options::port"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , port) - 48usize] ; ["Offset of field: aws_uri_builder_options::query_params"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , query_params) - 56usize] ; ["Offset of field: aws_uri_builder_options::query_string"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , query_string) - 64usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Parses 'uri_str' and initializes uri. Returns AWS_OP_SUCCESS, on success, AWS_OP_ERR on failure.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes uri to values specified in options. Returns AWS_OP_SUCCESS, on success, AWS_OP_ERR on failure.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_uri_clean_up (uri : * mut aws_uri) ; } unsafe extern "C" { # [doc = " Returns the scheme portion of the uri (e.g. http, https, ftp, ftps, etc...). If the scheme was not present\n in the uri, the returned value will be empty. It is the users job to determine the appropriate defaults\n if this field is empty, based on protocol, port, etc..."] pub fn aws_uri_scheme (uri : * const aws_uri) -> * const aws_byte_cursor ; } unsafe extern "C" { # [doc = " Returns the authority portion of the uri (host[:port]). If it was not present, this was a request uri. In that\n case, the value will be empty."] pub fn aws_uri_authority (uri : * const aws_uri) -> * const aws_byte_cursor ; } unsafe extern "C" { # [doc = " Returns the path portion of the uri, including any leading '/'. If not present, this value will be empty."] pub fn aws_uri_path (uri : * const aws_uri) -> * const aws_byte_cursor ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Returns the port portion of the authority if it was present, otherwise, returns 0.\n 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) -> u32 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " For iterating over the params in the query string.\n `param` is an in/out argument used to track progress, it MUST be zeroed out to start.\n If true is returned, `param` contains the value of the next param.\n If false is returned, there are no further params.\n\n Edge cases:\n 1) Entries without '=' sign are treated as having a key and no value.\n    Example: First param in query string \"a&b=c\" has key=\"a\" value=\"\"\n\n 2) Blank entries are skipped.\n    Example: The only param in query string \"&&a=b\" is key=\"a\" value=\"b\""] pub fn aws_query_string_next_param (query_string : aws_byte_cursor , param : * mut aws_uri_param) -> bool ; } unsafe extern "C" { # [doc = " Parses query string and stores the parameters in 'out_params'. Returns AWS_OP_SUCCESS on success and\n AWS_OP_ERR on failure. The user is responsible for initializing out_params with item size of struct aws_query_param.\n The user is also responsible for cleaning up out_params when finished."] pub fn aws_query_string_params (query_string : aws_byte_cursor , out_params : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " For iterating over the params in the uri query string.\n `param` is an in/out argument used to track progress, it MUST be zeroed out to start.\n If true is returned, `param` contains the value of the next param.\n If false is returned, there are no further params.\n\n Edge cases:\n 1) Entries without '=' sign are treated as having a key and no value.\n    Example: First param in query string \"a&b=c\" has key=\"a\" value=\"\"\n\n 2) Blank entries are skipped.\n    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 ; } unsafe extern "C" { # [doc = " Parses query string and stores the parameters in 'out_params'. Returns AWS_OP_SUCCESS on success and\n AWS_OP_ERR on failure. The user is responsible for initializing out_params with item size of struct aws_query_param.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Writes the uri path encoding of a cursor to a buffer.  This is the modified version of rfc3986 used by\n sigv4 signing."] pub fn aws_byte_buf_append_encoding_uri_path (buffer : * mut aws_byte_buf , cursor : * const aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Writes the uri query param encoding (passthrough alnum + '-' '_' '~' '.') of a UTF-8 cursor to a buffer\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Writes the uri decoding of a UTF-8 cursor to a buffer,\n replacing %xx escapes by their single byte equivalent.\n 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) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_errors { AWS_ERROR_S3_MISSING_CONTENT_RANGE_HEADER = 14336 , AWS_ERROR_S3_INVALID_CONTENT_RANGE_HEADER = 14337 , AWS_ERROR_S3_MISSING_CONTENT_LENGTH_HEADER = 14338 , AWS_ERROR_S3_INVALID_CONTENT_LENGTH_HEADER = 14339 , AWS_ERROR_S3_MISSING_ETAG = 14340 , AWS_ERROR_S3_INTERNAL_ERROR = 14341 , AWS_ERROR_S3_SLOW_DOWN = 14342 , AWS_ERROR_S3_INVALID_RESPONSE_STATUS = 14343 , AWS_ERROR_S3_MISSING_UPLOAD_ID = 14344 , AWS_ERROR_S3_PROXY_PARSE_FAILED = 14345 , AWS_ERROR_S3_UNSUPPORTED_PROXY_SCHEME = 14346 , AWS_ERROR_S3_CANCELED = 14347 , AWS_ERROR_S3_INVALID_RANGE_HEADER = 14348 , AWS_ERROR_S3_MULTIRANGE_HEADER_UNSUPPORTED = 14349 , AWS_ERROR_S3_RESPONSE_CHECKSUM_MISMATCH = 14350 , AWS_ERROR_S3_CHECKSUM_CALCULATION_FAILED = 14351 , AWS_ERROR_S3_PAUSED = 14352 , AWS_ERROR_S3_LIST_PARTS_PARSE_FAILED = 14353 , AWS_ERROR_S3_RESUMED_PART_CHECKSUM_MISMATCH = 14354 , AWS_ERROR_S3_RESUME_FAILED = 14355 , AWS_ERROR_S3_OBJECT_MODIFIED = 14356 , AWS_ERROR_S3_NON_RECOVERABLE_ASYNC_ERROR = 14357 , AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE = 14358 , AWS_ERROR_S3_INCORRECT_CONTENT_LENGTH = 14359 , AWS_ERROR_S3_REQUEST_TIME_TOO_SKEWED = 14360 , AWS_ERROR_S3_FILE_MODIFIED = 14361 , AWS_ERROR_S3_EXCEEDS_MEMORY_LIMIT = 14362 , AWS_ERROR_S3_INVALID_MEMORY_LIMIT_CONFIG = 14363 , AWS_ERROR_S3EXPRESS_CREATE_SESSION_FAILED = 14364 , AWS_ERROR_S3_INTERNAL_PART_SIZE_MISMATCH_RETRYING_WITH_RANGE = 14365 , AWS_ERROR_S3_REQUEST_HAS_COMPLETED = 14366 , AWS_ERROR_S3_RECV_FILE_ALREADY_EXISTS = 14367 , AWS_ERROR_S3_RECV_FILE_NOT_FOUND = 14368 , AWS_ERROR_S3_REQUEST_TIMEOUT = 14369 , AWS_ERROR_S3_BUFFER_ALLOCATION_FAILED = 14370 , AWS_ERROR_S3_END_RANGE = 15359 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_subject { AWS_LS_S3_GENERAL = 14336 , AWS_LS_S3_CLIENT = 14337 , AWS_LS_S3_CLIENT_STATS = 14338 , AWS_LS_S3_REQUEST = 14339 , AWS_LS_S3_META_REQUEST = 14340 , AWS_LS_S3_ENDPOINT = 14341 , AWS_LS_S3_LAST = 15359 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_platform_info { pub instance_type : aws_byte_cursor , pub max_throughput_gbps : f64 , pub has_recommended_configuration : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_platform_info"] [:: std :: mem :: size_of :: < aws_s3_platform_info > () - 32usize] ; ["Alignment of aws_s3_platform_info"] [:: std :: mem :: align_of :: < aws_s3_platform_info > () - 8usize] ; ["Offset of field: aws_s3_platform_info::instance_type"] [:: std :: mem :: offset_of ! (aws_s3_platform_info , instance_type) - 0usize] ; ["Offset of field: aws_s3_platform_info::max_throughput_gbps"] [:: std :: mem :: offset_of ! (aws_s3_platform_info , max_throughput_gbps) - 16usize] ; ["Offset of field: aws_s3_platform_info::has_recommended_configuration"] [:: std :: mem :: offset_of ! (aws_s3_platform_info , has_recommended_configuration) - 24usize] ; } ; impl Default for aws_s3_platform_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 () } } } unsafe extern "C" { # [doc = " Initializes internal datastructures used by aws-c-s3.\n Must be called before using any functionality in aws-c-s3."] pub fn aws_s3_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Shuts down the internal datastructures used by aws-c-s3."] pub fn aws_s3_library_clean_up () ; } unsafe extern "C" { pub fn aws_s3_get_current_platform_info () -> * const aws_s3_platform_info ; } unsafe extern "C" { pub fn aws_s3_get_current_platform_ec2_intance_type (cached_only : bool) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_s3_get_platforms_with_recommended_config () -> aws_array_list ; } # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_s3_buffer_ticket { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_new (alloc : * mut aws_allocator) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_set_result_by_move (future : * mut aws_future_s3_buffer_ticket , pointer_address : * mut * mut aws_s3_buffer_ticket) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_get_result_by_move (future : * mut aws_future_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_peek_result (future : * const aws_future_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_acquire (future : * mut aws_future_s3_buffer_ticket) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_release (future : * mut aws_future_s3_buffer_ticket) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_set_error (future : * mut aws_future_s3_buffer_ticket , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_is_done (future : * const aws_future_s3_buffer_ticket) -> bool ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_get_error (future : * const aws_future_s3_buffer_ticket) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_register_callback (future : * mut aws_future_s3_buffer_ticket , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_register_callback_if_not_done (future : * mut aws_future_s3_buffer_ticket , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_register_event_loop_callback (future : * mut aws_future_s3_buffer_ticket , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_register_channel_callback (future : * mut aws_future_s3_buffer_ticket , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_wait (future : * mut aws_future_s3_buffer_ticket , timeout_ns : u64) -> bool ; } # [doc = " Meta information about ticket reservation request."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_buffer_pool_reserve_meta { pub client : * mut aws_s3_client , pub meta_request : * mut aws_s3_meta_request , pub size : usize , pub can_block : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_pool_reserve_meta"] [:: std :: mem :: size_of :: < aws_s3_buffer_pool_reserve_meta > () - 32usize] ; ["Alignment of aws_s3_buffer_pool_reserve_meta"] [:: std :: mem :: align_of :: < aws_s3_buffer_pool_reserve_meta > () - 8usize] ; ["Offset of field: aws_s3_buffer_pool_reserve_meta::client"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_reserve_meta , client) - 0usize] ; ["Offset of field: aws_s3_buffer_pool_reserve_meta::meta_request"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_reserve_meta , meta_request) - 8usize] ; ["Offset of field: aws_s3_buffer_pool_reserve_meta::size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_reserve_meta , size) - 16usize] ; ["Offset of field: aws_s3_buffer_pool_reserve_meta::can_block"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_reserve_meta , can_block) - 24usize] ; } ; impl Default for aws_s3_buffer_pool_reserve_meta { 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)] pub struct aws_s3_buffer_ticket_vtable { # [doc = " Get buffer associated with the ticket.\n Note: can be called multiple times and the same buffer should be returned. In some cases ticket might not be\n claimed at all."] pub claim : :: std :: option :: Option < unsafe extern "C" fn (ticket : * mut aws_s3_buffer_ticket) -> aws_byte_buf > , pub acquire : :: std :: option :: Option < unsafe extern "C" fn (ticket : * mut aws_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket > , pub release : :: std :: option :: Option < unsafe extern "C" fn (ticket : * mut aws_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_ticket_vtable"] [:: std :: mem :: size_of :: < aws_s3_buffer_ticket_vtable > () - 24usize] ; ["Alignment of aws_s3_buffer_ticket_vtable"] [:: std :: mem :: align_of :: < aws_s3_buffer_ticket_vtable > () - 8usize] ; ["Offset of field: aws_s3_buffer_ticket_vtable::claim"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket_vtable , claim) - 0usize] ; ["Offset of field: aws_s3_buffer_ticket_vtable::acquire"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket_vtable , acquire) - 8usize] ; ["Offset of field: aws_s3_buffer_ticket_vtable::release"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket_vtable , release) - 16usize] ; } ; # [doc = " Generic memory pool interface.\n Allows consumers of aws-c-s3 to override how buffer allocation for part buffers is done.\n Refer to docs/memory_aware_request_execution.md for details on how default implementation works.\n WARNING: this is currently experimental feature and does not provide API stability guarantees so should be used with\n caution. At highlevel the flow is as follows:\n - crt scheduler queues up requests to be prepared\n - requests being prepared will try to reserve mem (i.e. obtain a ticket) and wait until they get it before proceeding\n - once mem is reserved requests will proceed with the pipeline\n - request will acquire buffer from the ticket when needed\n - ticket is released when request is done with the buffer\n Note: in some cases pipeline can stall if new buffer cannot be allocated (ex. async writes flow).\n In this case reserve request will indicate that not granting the ticket can block and buffer pool should try to\n allocate ticket right away (or wait and call waker when mem is allocated for the case of async writes).\n Note for custom pool implementations: Scheduler keeps track of all outstanding futures and will error them out when\n request is paused or cancelled. Its still fine for memory pool implementation to deliver ticket (it will just be\n released by future right away with no side effects) or just ignore the future if its already in error state."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_buffer_ticket { pub vtable : * mut aws_s3_buffer_ticket_vtable , pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_ticket"] [:: std :: mem :: size_of :: < aws_s3_buffer_ticket > () - 40usize] ; ["Alignment of aws_s3_buffer_ticket"] [:: std :: mem :: align_of :: < aws_s3_buffer_ticket > () - 8usize] ; ["Offset of field: aws_s3_buffer_ticket::vtable"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket , vtable) - 0usize] ; ["Offset of field: aws_s3_buffer_ticket::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket , ref_count) - 8usize] ; ["Offset of field: aws_s3_buffer_ticket::impl_"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket , impl_) - 32usize] ; } ; impl Default for aws_s3_buffer_ticket { 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 () } } } unsafe extern "C" { pub fn aws_s3_buffer_ticket_claim (ticket : * mut aws_s3_buffer_ticket) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_s3_buffer_ticket_acquire (ticket : * mut aws_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket ; } unsafe extern "C" { pub fn aws_s3_buffer_ticket_release (ticket : * mut aws_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket ; } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_buffer_pool_vtable { pub reserve : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool , meta : aws_s3_buffer_pool_reserve_meta) -> * mut aws_future_s3_buffer_ticket > , # [doc = " Trim the pool. This is mostly a suggestion, which pool can decide to ignore. Triggered by CRT when\n client has been idle for some time."] pub trim : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool) > , # [doc = " Optimize the buffer pool for allocations of a specific size.\n Creates a separate list of blocks dedicated to this size for better memory efficiency."] pub add_special_size : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool , buffer_size : usize) -> :: libc :: c_int > , # [doc = " Release all special-sized blocks from the buffer pool.\n This frees all memory allocated for the special size optimization."] pub release_special_size : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool , buffer_size : usize) > , # [doc = " Align a range size to the buffer pool's allocation strategy.\n Returns the optimal aligned size based on the buffer pool's configuration."] pub derive_aligned_buffer_size : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool , size : u64) -> u64 > , pub acquire : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool) -> * mut aws_s3_buffer_pool > , pub release : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool) -> * mut aws_s3_buffer_pool > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_pool_vtable"] [:: std :: mem :: size_of :: < aws_s3_buffer_pool_vtable > () - 56usize] ; ["Alignment of aws_s3_buffer_pool_vtable"] [:: std :: mem :: align_of :: < aws_s3_buffer_pool_vtable > () - 8usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::reserve"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , reserve) - 0usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::trim"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , trim) - 8usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::add_special_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , add_special_size) - 16usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::release_special_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , release_special_size) - 24usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::derive_aligned_buffer_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , derive_aligned_buffer_size) - 32usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::acquire"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , acquire) - 40usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::release"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , release) - 48usize] ; } ; # [doc = " Polymorphic buffer pool."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_buffer_pool { pub vtable : * mut aws_s3_buffer_pool_vtable , pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_pool"] [:: std :: mem :: size_of :: < aws_s3_buffer_pool > () - 40usize] ; ["Alignment of aws_s3_buffer_pool"] [:: std :: mem :: align_of :: < aws_s3_buffer_pool > () - 8usize] ; ["Offset of field: aws_s3_buffer_pool::vtable"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool , vtable) - 0usize] ; ["Offset of field: aws_s3_buffer_pool::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool , ref_count) - 8usize] ; ["Offset of field: aws_s3_buffer_pool::impl_"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool , impl_) - 32usize] ; } ; impl Default for aws_s3_buffer_pool { 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 () } } } unsafe extern "C" { pub fn aws_s3_buffer_pool_reserve (buffer_pool : * mut aws_s3_buffer_pool , meta : aws_s3_buffer_pool_reserve_meta) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { pub fn aws_s3_buffer_pool_trim (buffer_pool : * mut aws_s3_buffer_pool) ; } unsafe extern "C" { pub fn aws_s3_buffer_pool_acquire (buffer_pool : * mut aws_s3_buffer_pool) -> * mut aws_s3_buffer_pool ; } unsafe extern "C" { pub fn aws_s3_buffer_pool_release (buffer_pool : * mut aws_s3_buffer_pool) -> * mut aws_s3_buffer_pool ; } # [doc = " Buffer pool configuration options."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_buffer_pool_config { pub client : * mut aws_s3_client , pub part_size : usize , pub max_part_size : usize , pub memory_limit : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_pool_config"] [:: std :: mem :: size_of :: < aws_s3_buffer_pool_config > () - 32usize] ; ["Alignment of aws_s3_buffer_pool_config"] [:: std :: mem :: align_of :: < aws_s3_buffer_pool_config > () - 8usize] ; ["Offset of field: aws_s3_buffer_pool_config::client"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_config , client) - 0usize] ; ["Offset of field: aws_s3_buffer_pool_config::part_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_config , part_size) - 8usize] ; ["Offset of field: aws_s3_buffer_pool_config::max_part_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_config , max_part_size) - 16usize] ; ["Offset of field: aws_s3_buffer_pool_config::memory_limit"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_config , memory_limit) - 24usize] ; } ; impl Default for aws_s3_buffer_pool_config { 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 = " Factory to construct the pool for the given config. Passes along buffer related info configured on the client, which\n factory may ignore when considering how to construct pool.\n This implementation should fail if pool cannot be constructed for some reason (ex. if config params cannot be met),\n by logging failure reason, returning null and raising aws_error."] pub type aws_s3_buffer_pool_factory_fn = :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , config : aws_s3_buffer_pool_config , user_data : * mut :: libc :: c_void) -> * mut aws_s3_buffer_pool > ; unsafe extern "C" { # [doc = " Optimize the buffer pool for allocations of a specific size.\n Creates a separate list of blocks dedicated to this size for better memory efficiency.\n Allocations of exactly this size will use these special blocks instead of the regular primary/secondary storage.\n\n @param buffer_pool The buffer pool to optimize\n @param buffer_size The size to optimize for (must be > 0)\n @return AWS_OP_SUCCESS on success, AWS_OP_ERR on failure"] pub fn aws_s3_buffer_pool_add_special_size (buffer_pool : * mut aws_s3_buffer_pool , buffer_size : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Release the special-sized blocks from the buffer pool.\n Should be called when done with the special-sized allocations.\n\n @param buffer_pool The buffer pool\n @param buffer_size The special size to release blocks for"] pub fn aws_s3_buffer_pool_release_special_size (buffer_pool : * mut aws_s3_buffer_pool , buffer_size : usize) ; } unsafe extern "C" { # [doc = " Align a range size to the buffer pool's allocation strategy.\n This function determines the optimal aligned size based on the buffer pool's configuration.\n For sizes within the primary allocation range, it aligns to chunk boundaries.\n For larger sizes that go to secondary storage, it returns the size as-is.\n\n @param buffer_pool The buffer pool to use for alignment (can be NULL, in which case size is returned unchanged)\n @param size The size to align\n @return The aligned size that's optimal for the buffer pool's allocation strategy"] pub fn aws_s3_buffer_pool_derive_aligned_buffer_size (buffer_pool : * mut aws_s3_buffer_pool , size : u64) -> u64 ; } pub type aws_should_sign_header_fn = :: std :: option :: Option < unsafe extern "C" fn (name : * const aws_byte_cursor , userdata : * mut :: libc :: c_void) -> bool > ; # [repr (u32)] # [non_exhaustive] # [doc = " A primitive RTTI indicator for signing configuration structs\n\n There must be one entry per config structure type and it's a fatal error\n to put the wrong value in the \"config_type\" member of your config structure."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_signing_config_type { AWS_SIGNING_CONFIG_AWS = 1 , } # [doc = " All signing configuration structs must match this by having\n the config_type member as the first member."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_signing_config_base { pub config_type : aws_signing_config_type , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_signing_config_base"] [:: std :: mem :: size_of :: < aws_signing_config_base > () - 4usize] ; ["Alignment of aws_signing_config_base"] [:: std :: mem :: align_of :: < aws_signing_config_base > () - 4usize] ; ["Offset of field: aws_signing_config_base::config_type"] [:: std :: mem :: offset_of ! (aws_signing_config_base , config_type) - 0usize] ; } ; impl Default for aws_signing_config_base { 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 (u32)] # [non_exhaustive] # [doc = " What version of the AWS signing process should we use."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_signing_algorithm { AWS_SIGNING_ALGORITHM_V4 = 0 , AWS_SIGNING_ALGORITHM_V4_ASYMMETRIC = 1 , AWS_SIGNING_ALGORITHM_V4_S3EXPRESS = 2 , } # [repr (u32)] # [non_exhaustive] # [doc = " What sort of signature should be computed from the signable?"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_signature_type { # [doc = " A signature for a full http request should be computed, with header updates applied to the signing result."] AWS_ST_HTTP_REQUEST_HEADERS = 0 , # [doc = " A signature for a full http request should be computed, with query param updates applied to the signing result."] AWS_ST_HTTP_REQUEST_QUERY_PARAMS = 1 , # [doc = " Compute a signature for a payload chunk. The signable's input stream should be the chunk data and the\n signable should contain the most recent signature value (either the original http request or the most recent\n chunk) in the \"previous-signature\" property."] AWS_ST_HTTP_REQUEST_CHUNK = 2 , # [doc = " Compute a signature for an event stream event. The signable's input stream should be the encoded event-stream\n message (headers + payload), the signable should contain the most recent signature value (either the original\n http request or the most recent event) in the \"previous-signature\" property.\n\n This option is only supported for Sigv4 for now."] AWS_ST_HTTP_REQUEST_EVENT = 3 , # [doc = " Compute a signature for an http request via it's already-computed canonical request.  Only the authorization\n signature header is added to the signing result."] AWS_ST_CANONICAL_REQUEST_HEADERS = 4 , # [doc = " Compute a signature for an http request via it's already-computed canonical request.  Only the authorization\n signature query param is added to the signing result."] AWS_ST_CANONICAL_REQUEST_QUERY_PARAMS = 5 , # [doc = " Compute a signature for the trailing headers.\n the signable should contain the most recent signature value (either the original http request or the most recent\n chunk) in the \"previous-signature\" property."] AWS_ST_HTTP_REQUEST_TRAILING_HEADERS = 6 , } unsafe extern "C" { # [doc = " The SHA-256 of an empty string:\n 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_empty_sha256 : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'UNSIGNED-PAYLOAD'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_unsigned_payload : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-UNSIGNED-PAYLOAD-TRAILER'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_unsigned_payload_trailer : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-HMAC-SHA256-PAYLOAD'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_aws4_hmac_sha256_payload : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-HMAC-SHA256-PAYLOAD-TRAILER'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_aws4_hmac_sha256_payload_trailer : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-ECDSA-P256-SHA256-PAYLOAD'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_aws4_ecdsa_p256_sha256_payload : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-ECDSA-P256-SHA256-PAYLOAD-TRAILER'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_aws4_ecdsa_p256_sha256_payload_trailer : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-HMAC-SHA256-EVENTS'\n For use with `aws_signing_config_aws.signed_body_value`.\n\n Event signing is only supported for Sigv4 for now."] pub static g_aws_signed_body_value_streaming_aws4_hmac_sha256_events : aws_byte_cursor ; } # [repr (u32)] # [non_exhaustive] # [doc = " Controls if signing adds a header containing the canonical request's body value"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_signed_body_header_type { # [doc = " Do not add a header"] AWS_SBHT_NONE = 0 , # [doc = " Add the \"x-amz-content-sha256\" header with the canonical request's body value"] AWS_SBHT_X_AMZ_CONTENT_SHA256 = 1 , } # [doc = " A configuration structure for use in AWS-related signing.  Currently covers sigv4 only, but is not required to."] # [repr (C)] pub struct aws_signing_config_aws { # [doc = " What kind of config structure is this?"] pub config_type : aws_signing_config_type , # [doc = " What signing algorithm to use."] pub algorithm : aws_signing_algorithm , # [doc = " What sort of signature should be computed?"] pub signature_type : aws_signature_type , pub region : aws_byte_cursor , # [doc = " name of service to sign a request for"] pub service : aws_byte_cursor , # [doc = " Raw date to use during the signing process."] pub date : aws_date_time , # [doc = " Optional function to control which headers are a part of the canonical request.\n Skipping auth-required headers will result in an unusable signature.  Headers injected by the signing process\n are not skippable.\n\n This function does not override the internal check function (x-amzn-trace-id, user-agent), but rather\n supplements it.  In particular, a header will get signed if and only if it returns true to both\n the internal check (skips x-amzn-trace-id, user-agent) and this function (if defined)."] pub should_sign_header : aws_should_sign_header_fn , pub should_sign_header_ud : * mut :: libc :: c_void , pub flags : aws_signing_config_aws__bindgen_ty_1 , # [doc = " Optional string to use as the canonical request's body value.\n If string is empty, a value will be calculated from the payload during signing.\n Typically, this is the SHA-256 of the (request/chunk/event) payload, written as lowercase hex.\n If this has been precalculated, it can be set here. Special values used by certain services can also be set\n (e.g. \"UNSIGNED-PAYLOAD\" \"STREAMING-AWS4-HMAC-SHA256-PAYLOAD\" \"STREAMING-AWS4-HMAC-SHA256-EVENTS\")."] pub signed_body_value : aws_byte_cursor , # [doc = " Controls what body \"hash\" header, if any, should be added to the canonical request and the signed request:\n   AWS_SBHT_NONE - no header should be added\n   AWS_SBHT_X_AMZ_CONTENT_SHA256 - the body \"hash\" should be added in the X-Amz-Content-Sha256 header"] pub signed_body_header : aws_signed_body_header_type , pub credentials : * const aws_credentials , pub credentials_provider : * mut aws_credentials_provider , # [doc = " If non-zero and the signing transform is query param, then signing will add X-Amz-Expires to the query\n string, equal to the value specified here.  If this value is zero or if header signing is being used then\n this parameter has no effect."] pub expiration_in_seconds : u64 , } # [repr (C)] # [repr (align (4))] # [derive (Debug , Default , Copy , Clone)] pub struct aws_signing_config_aws__bindgen_ty_1 { pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub __bindgen_padding_0 : [u8 ; 3usize] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_signing_config_aws__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_signing_config_aws__bindgen_ty_1 > () - 4usize] ; ["Alignment of aws_signing_config_aws__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_signing_config_aws__bindgen_ty_1 > () - 4usize] ; } ; impl aws_signing_config_aws__bindgen_ty_1 { # [inline] pub fn use_double_uri_encode (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_use_double_uri_encode (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn use_double_uri_encode_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_use_double_uri_encode_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn should_normalize_uri_path (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_should_normalize_uri_path (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub unsafe fn should_normalize_uri_path_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 1usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_should_normalize_uri_path_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 1usize , 1u8 , val as u64 ,) } } # [inline] pub fn omit_session_token (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_omit_session_token (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub unsafe fn omit_session_token_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 2usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_omit_session_token_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 2usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (use_double_uri_encode : u32 , should_normalize_uri_path : u32 , omit_session_token : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let use_double_uri_encode : u32 = unsafe { :: std :: mem :: transmute (use_double_uri_encode) } ; use_double_uri_encode as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let should_normalize_uri_path : u32 = unsafe { :: std :: mem :: transmute (should_normalize_uri_path) } ; should_normalize_uri_path as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let omit_session_token : u32 = unsafe { :: std :: mem :: transmute (omit_session_token) } ; omit_session_token as u64 }) ; __bindgen_bitfield_unit } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_signing_config_aws"] [:: std :: mem :: size_of :: < aws_signing_config_aws > () - 256usize] ; ["Alignment of aws_signing_config_aws"] [:: std :: mem :: align_of :: < aws_signing_config_aws > () - 8usize] ; ["Offset of field: aws_signing_config_aws::config_type"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , config_type) - 0usize] ; ["Offset of field: aws_signing_config_aws::algorithm"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , algorithm) - 4usize] ; ["Offset of field: aws_signing_config_aws::signature_type"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , signature_type) - 8usize] ; ["Offset of field: aws_signing_config_aws::region"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , region) - 16usize] ; ["Offset of field: aws_signing_config_aws::service"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , service) - 32usize] ; ["Offset of field: aws_signing_config_aws::date"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , date) - 48usize] ; ["Offset of field: aws_signing_config_aws::should_sign_header"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , should_sign_header) - 184usize] ; ["Offset of field: aws_signing_config_aws::should_sign_header_ud"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , should_sign_header_ud) - 192usize] ; ["Offset of field: aws_signing_config_aws::flags"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , flags) - 200usize] ; ["Offset of field: aws_signing_config_aws::signed_body_value"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , signed_body_value) - 208usize] ; ["Offset of field: aws_signing_config_aws::signed_body_header"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , signed_body_header) - 224usize] ; ["Offset of field: aws_signing_config_aws::credentials"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , credentials) - 232usize] ; ["Offset of field: aws_signing_config_aws::credentials_provider"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , credentials_provider) - 240usize] ; ["Offset of field: aws_signing_config_aws::expiration_in_seconds"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , expiration_in_seconds) - 248usize] ; } ; impl Default for aws_signing_config_aws { 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 () } } } unsafe extern "C" { # [doc = " Returns a c-string that describes the supplied signing algorithm\n\n @param algorithm signing algorithm to get a friendly string name for\n\n @return friendly string name of the supplied algorithm, or \"Unknown\" if the algorithm is not recognized"] pub fn aws_signing_algorithm_to_string (algorithm : aws_signing_algorithm) -> * const :: libc :: c_char ; } unsafe extern "C" { # [doc = " Checks a signing configuration for invalid settings combinations.\n\n @param config signing configuration to validate\n\n @return - AWS_OP_SUCCESS if the configuration is valid, AWS_OP_ERR otherwise"] pub fn aws_validate_aws_signing_config_aws (config : * const aws_signing_config_aws) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3express_credentials_provider { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_properties_s3express { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [doc = " A Meta Request represents a group of generated requests that are being done on behalf of the\n original request. For example, one large GetObject request can be transformed into a series\n of ranged GetObject requests that are executed in parallel to improve throughput.\n\n The aws_s3_meta_request_type is a hint of transformation to be applied."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_type { # [doc = " The Default meta request type sends any request to S3 as-is (with no transformation). For example,\n it can be used to pass a CreateBucket request."] AWS_S3_META_REQUEST_TYPE_DEFAULT = 0 , # [doc = " The GetObject request will be split into a series of ranged GetObject requests that are\n executed in parallel to improve throughput, when possible."] AWS_S3_META_REQUEST_TYPE_GET_OBJECT = 1 , # [doc = " The PutObject request will be split into MultiPart uploads that are executed in parallel\n to improve throughput, when possible.\n Note: put object supports both known and unknown body length. The client\n relies on Content-Length header to determine length of the body.\n Request with unknown content length are always sent using multipart\n upload regardless of final number of parts and do have the following limitations:\n - multipart threshold is ignored and all request are made through mpu,\n   even if they only need one part\n - pause/resume is not supported\n - meta request will throw error if checksum header is provider (due to\n   general limitation of checksum not being usable if meta request is\n   getting split)"] AWS_S3_META_REQUEST_TYPE_PUT_OBJECT = 2 , # [doc = " The CopyObject meta request performs a multi-part copy\n using multiple S3 UploadPartCopy requests in parallel, or bypasses\n a CopyObject request to S3 if the object size is not large enough for\n a multipart upload.\n Note: copy support is still in development and has following limitations:\n 1. host header must use virtual host addressing style (path style is not\n   supported) and both source and dest buckets must have dns compliant name\n 2. only {bucket}/{key} format is supported for source and passing arn as\n   source will not work\n 3. source bucket is assumed to be in the same region as dest\n 4. source bucket and dest bucket must both be either directory buckets or regular buckets.\n\n Provide the `meta_request_options.copy_source_uri` to bypass limitation 1 & 2."] AWS_S3_META_REQUEST_TYPE_COPY_OBJECT = 3 , # [doc = " The CopyObject meta request performs a multi-part copy\n using multiple S3 UploadPartCopy requests in parallel, or bypasses\n a CopyObject request to S3 if the object size is not large enough for\n a multipart upload.\n Note: copy support is still in development and has following limitations:\n 1. host header must use virtual host addressing style (path style is not\n   supported) and both source and dest buckets must have dns compliant name\n 2. only {bucket}/{key} format is supported for source and passing arn as\n   source will not work\n 3. source bucket is assumed to be in the same region as dest\n 4. source bucket and dest bucket must both be either directory buckets or regular buckets.\n\n Provide the `meta_request_options.copy_source_uri` to bypass limitation 1 & 2."] AWS_S3_META_REQUEST_TYPE_MAX = 4 , } impl aws_s3_request_type { pub const AWS_S3_REQUEST_TYPE_DEFAULT : aws_s3_request_type = aws_s3_request_type :: AWS_S3_REQUEST_TYPE_UNKNOWN ; } # [repr (u32)] # [non_exhaustive] # [doc = " The type of a single S3 HTTP request. Used by metrics.\n A meta-request can make multiple S3 HTTP requests under the hood.\n\n For example, AWS_S3_META_REQUEST_TYPE_PUT_OBJECT for a large file will\n do multipart upload, resulting in 3+ HTTP requests:\n AWS_S3_REQUEST_TYPE_CREATE_MULTIPART_UPLOAD, one or more AWS_S3_REQUEST_TYPE_UPLOAD_PART,\n and finally AWS_S3_REQUEST_TYPE_COMPLETE_MULTIPART_UPLOAD.\n\n aws_s3_request_type_operation_name() returns the S3 operation name\n for types that map (e.g. AWS_S3_REQUEST_TYPE_HEAD_OBJECT -> \"HeadObject\"),\n or empty string for types that don't map (e.g. AWS_S3_REQUEST_TYPE_UNKNOWN -> \"\")."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_request_type { AWS_S3_REQUEST_TYPE_UNKNOWN = 0 , AWS_S3_REQUEST_TYPE_HEAD_OBJECT = 1 , AWS_S3_REQUEST_TYPE_GET_OBJECT = 2 , AWS_S3_REQUEST_TYPE_LIST_PARTS = 3 , AWS_S3_REQUEST_TYPE_CREATE_MULTIPART_UPLOAD = 4 , AWS_S3_REQUEST_TYPE_UPLOAD_PART = 5 , AWS_S3_REQUEST_TYPE_ABORT_MULTIPART_UPLOAD = 6 , AWS_S3_REQUEST_TYPE_COMPLETE_MULTIPART_UPLOAD = 7 , AWS_S3_REQUEST_TYPE_UPLOAD_PART_COPY = 8 , AWS_S3_REQUEST_TYPE_COPY_OBJECT = 9 , AWS_S3_REQUEST_TYPE_PUT_OBJECT = 10 , AWS_S3_REQUEST_TYPE_CREATE_SESSION = 11 , AWS_S3_REQUEST_TYPE_MAX = 12 , } # [doc = " Invoked to provide response headers received during execution of the meta request, both for\n success and error HTTP status codes.\n\n Return AWS_OP_SUCCESS to continue processing the request.\n\n Return aws_raise_error(E) to cancel the request.\n The error you raise will be reflected in `aws_s3_meta_request_result.error_code`.\n If you're not sure which error to raise, use AWS_ERROR_S3_CANCELED."] pub type aws_s3_meta_request_headers_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , headers : * const aws_http_headers , response_status : :: libc :: c_int , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked to provide the response body as it is received.\n\n Note: If you set `enable_read_backpressure` true on the S3 client,\n you must maintain the flow-control window.\n The flow-control window shrinks as you receive body data via this callback.\n Whenever the flow-control window reaches 0 you will stop downloading data.\n Use aws_s3_meta_request_increment_read_window() to increment the window and keep data flowing.\n Maintain a larger window to keep up a high download throughput,\n parts cannot download in parallel unless the window is large enough to hold multiple parts.\n Maintain a smaller window to limit the amount of data buffered in memory.\n\n If `manual_window_management` is false, you do not need to maintain the flow-control window.\n No back-pressure is applied and data arrives as fast as possible.\n\n Return AWS_OP_SUCCESS to continue processing the request.\n\n Return aws_raise_error(E) to cancel the request.\n The error you raise will be reflected in `aws_s3_meta_request_result.error_code`.\n If you're not sure which error to raise, use AWS_ERROR_S3_CANCELED."] pub type aws_s3_meta_request_receive_body_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , body : * const aws_byte_cursor , range_start : u64 , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked when the entire meta request execution is complete."] pub type aws_s3_meta_request_finish_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , meta_request_result : * const aws_s3_meta_request_result , user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request_receive_body_extra_info { pub range_start : u64 , pub ticket : * mut aws_s3_buffer_ticket , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_receive_body_extra_info"] [:: std :: mem :: size_of :: < aws_s3_meta_request_receive_body_extra_info > () - 16usize] ; ["Alignment of aws_s3_meta_request_receive_body_extra_info"] [:: std :: mem :: align_of :: < aws_s3_meta_request_receive_body_extra_info > () - 8usize] ; ["Offset of field: aws_s3_meta_request_receive_body_extra_info::range_start"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_receive_body_extra_info , range_start) - 0usize] ; ["Offset of field: aws_s3_meta_request_receive_body_extra_info::ticket"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_receive_body_extra_info , ticket) - 8usize] ; } ; impl Default for aws_s3_meta_request_receive_body_extra_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 () } } } pub type aws_s3_meta_request_receive_body_callback_ex_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , body : * const aws_byte_cursor , info : aws_s3_meta_request_receive_body_extra_info , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Information sent in the meta_request progress callback."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_meta_request_progress { pub bytes_transferred : u64 , pub content_length : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_progress"] [:: std :: mem :: size_of :: < aws_s3_meta_request_progress > () - 16usize] ; ["Alignment of aws_s3_meta_request_progress"] [:: std :: mem :: align_of :: < aws_s3_meta_request_progress > () - 8usize] ; ["Offset of field: aws_s3_meta_request_progress::bytes_transferred"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_progress , bytes_transferred) - 0usize] ; ["Offset of field: aws_s3_meta_request_progress::content_length"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_progress , content_length) - 8usize] ; } ; # [doc = " Invoked to report progress of a meta-request.\n For PutObject, progress refers to bytes uploaded.\n For CopyObject, progress refers to bytes copied.\n For GetObject, progress refers to bytes downloaded.\n For anything else, progress refers to response body bytes received."] pub type aws_s3_meta_request_progress_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , progress : * const aws_s3_meta_request_progress , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked to report the telemetry of the meta request once a single request finishes.\n Note: *metrics is only valid for the duration of the callback. If you need to keep it around, use\n `aws_s3_request_metrics_acquire`"] pub type aws_s3_meta_request_telemetry_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , metrics : * mut aws_s3_request_metrics , user_data : * mut :: libc :: c_void) > ; pub type aws_s3_meta_request_shutdown_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; pub type aws_s3_client_shutdown_complete_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " Optional callback, for you to provide the full object checksum after the object was read.\n Client will NOT check the checksum provided before sending it to the server.\n\n @param meta_request  pointer to the aws_s3_meta_request of the upload.\n @param user_data     pointer to the user_data set.\n\n @return A new string with the full object checksum, as it is sent in a PutObject request (base64-encoded):\n         https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#API_PutObject_RequestSyntax\n         If an error occurs, call aws_raise_error(E) with a proper error code and return NULL."] pub type aws_s3_meta_request_full_object_checksum_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , user_data : * mut :: libc :: c_void) -> * mut aws_string > ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_tls_mode { AWS_MR_TLS_ENABLED = 0 , AWS_MR_TLS_DISABLED = 1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_compute_content_md5 { AWS_MR_CONTENT_MD5_DISABLED = 0 , AWS_MR_CONTENT_MD5_ENABLED = 1 , } impl aws_s3_checksum_algorithm { pub const AWS_SCA_CRC32C : aws_s3_checksum_algorithm = aws_s3_checksum_algorithm :: AWS_SCA_INIT ; } impl aws_s3_checksum_algorithm { pub const AWS_SCA_END : aws_s3_checksum_algorithm = aws_s3_checksum_algorithm :: AWS_SCA_CRC64NVME ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_checksum_algorithm { AWS_SCA_NONE = 0 , AWS_SCA_INIT = 1 , AWS_SCA_CRC32 = 2 , AWS_SCA_SHA1 = 3 , AWS_SCA_SHA256 = 4 , AWS_SCA_CRC64NVME = 5 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_checksum_location { AWS_SCL_NONE = 0 , AWS_SCL_HEADER = 1 , AWS_SCL_TRAILER = 2 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_recv_file_options { # [doc = " Create a new file if it doesn't exist, otherwise replace the existing file."] AWS_S3_RECV_FILE_CREATE_OR_REPLACE = 0 , # [doc = " Always create a new file. If the file already exists, AWS_ERROR_S3_RECV_FILE_ALREADY_EXISTS will be raised."] AWS_S3_RECV_FILE_CREATE_NEW = 1 , # [doc = " Create a new file if it doesn't exist, otherwise append to the existing file."] AWS_S3_RECV_FILE_CREATE_OR_APPEND = 2 , # [doc = " Write to an existing file at the specified position, defined by the `recv_file_position`.\n If the file does not exist, AWS_ERROR_S3_RECV_FILE_NOT_FOUND will be raised.\n If `recv_file_position` is not configured, start overwriting data at the beginning of the\n file (byte 0)."] AWS_S3_RECV_FILE_WRITE_TO_POSITION = 3 , } # [doc = " WARNING: experimental/unstable:\n Controls how client performance file I/O operations. Only applies to the file based workload."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_file_io_options { # [doc = " Skip buffering the part in memory before sending the request.\n\n Default to false on small objects, and true when the object size exceed a certain threshold\n`g_streaming_object_size_threshold`."] pub should_stream : bool , # [doc = " The estimated disk throughput. Only be applied when `streaming_upload` is true.\n in gigabits per second (Gbps).\n\n Notes: There are possibilities that cannot reach the all available disk throughput:\n 1. Disk is busy with other applications\n 2. OS Cache may cap the throughput, use `direct_io` to get around this.\n\n Default to throughput_target_gbps."] pub disk_throughput_gbps : f64 , # [doc = " Enable direct IO to bypass the OS cache. Helpful when the disk I/O outperforms the kernel cache.\n Notes:\n - Only supported on linux for now.\n - Only supports upload for now.\n - Check NOTES for O_DIRECT for additional info https://man7.org/linux/man-pages/man2/openat.2.html\n In summary, O_DIRECT is a potentially powerful tool that should be used with caution."] pub direct_io : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_file_io_options"] [:: std :: mem :: size_of :: < aws_s3_file_io_options > () - 24usize] ; ["Alignment of aws_s3_file_io_options"] [:: std :: mem :: align_of :: < aws_s3_file_io_options > () - 8usize] ; ["Offset of field: aws_s3_file_io_options::should_stream"] [:: std :: mem :: offset_of ! (aws_s3_file_io_options , should_stream) - 0usize] ; ["Offset of field: aws_s3_file_io_options::disk_throughput_gbps"] [:: std :: mem :: offset_of ! (aws_s3_file_io_options , disk_throughput_gbps) - 8usize] ; ["Offset of field: aws_s3_file_io_options::direct_io"] [:: std :: mem :: offset_of ! (aws_s3_file_io_options , direct_io) - 16usize] ; } ; # [doc = " Info about a single part, for you to review before the upload completes."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_part_review { pub size : u64 , pub checksum : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_review"] [:: std :: mem :: size_of :: < aws_s3_upload_part_review > () - 24usize] ; ["Alignment of aws_s3_upload_part_review"] [:: std :: mem :: align_of :: < aws_s3_upload_part_review > () - 8usize] ; ["Offset of field: aws_s3_upload_part_review::size"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_review , size) - 0usize] ; ["Offset of field: aws_s3_upload_part_review::checksum"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_review , checksum) - 8usize] ; } ; impl Default for aws_s3_upload_part_review { 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 = " Info for you to review before an upload completes.\n\n WARNING: This feature is experimental/unstable.\n At this time, review is only available for multipart upload\n (when Content-Length is above the `multipart_upload_threshold`,\n or Content-Length not specified)."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_review { pub checksum_algorithm : aws_s3_checksum_algorithm , pub part_count : usize , pub part_array : * mut aws_s3_upload_part_review , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_review"] [:: std :: mem :: size_of :: < aws_s3_upload_review > () - 24usize] ; ["Alignment of aws_s3_upload_review"] [:: std :: mem :: align_of :: < aws_s3_upload_review > () - 8usize] ; ["Offset of field: aws_s3_upload_review::checksum_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_upload_review , checksum_algorithm) - 0usize] ; ["Offset of field: aws_s3_upload_review::part_count"] [:: std :: mem :: offset_of ! (aws_s3_upload_review , part_count) - 8usize] ; ["Offset of field: aws_s3_upload_review::part_array"] [:: std :: mem :: offset_of ! (aws_s3_upload_review , part_array) - 16usize] ; } ; impl Default for aws_s3_upload_review { 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 = " Optional callback, for you to review an upload before it completes.\n For example, you can review each part's checksum and fail the upload if\n you do not agree with them.\n\n @param meta_request pointer to the aws_s3_meta_request of the upload.\n @param info Detailed info about the upload.\n\n Return AWS_OP_SUCCESS to continue processing the request.\n\n Return aws_raise_error(E) to cancel the request.\n The error you raise will be reflected in `aws_s3_meta_request_result.error_code`.\n If you're not sure which error to raise, use AWS_ERROR_S3_CANCELED.\n\n WARNING: This feature is experimental/unstable.\n At this time, the callback is only invoked for multipart upload\n (when Content-Length is above the `multipart_upload_threshold`,\n or Content-Length not specified)."] pub type aws_s3_meta_request_upload_review_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , review : * const aws_s3_upload_review , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " The factory function for S3 client to create a S3 Express credentials provider.\n The S3 client will be the only owner of the S3 Express credentials provider.\n\n During S3 client destruction, S3 client will start the destruction of the provider, and wait the\n on_provider_shutdown_callback to be invoked before the S3 client finish destruction.\n\n Note to implement the factory properly:\n - Make sure `on_provider_shutdown_callback` will be invoked after the provider finish shutdown, otherwise,\n leak will happen.\n - The provider must not acquire a reference to the client; otherwise, a circular reference will cause a deadlock.\n - The `client` provided CANNOT be used within the factory function call or the destructor.\n\n @param allocator    memory allocator to create the provider.\n @param client    The S3 client uses and owns the provider.\n @param on_provider_shutdown_callback    The callback to be invoked when the provider finishes shutdown.\n @param shutdown_user_data    The user data to invoke shutdown callback with\n @param user_data    The user data with the factory\n\n @return The aws_s3express_credentials_provider."] pub type aws_s3express_provider_factory_fn = :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , client : * mut aws_s3_client , on_provider_shutdown_callback : aws_simple_completion_callback , shutdown_user_data : * mut :: libc :: c_void , factory_user_data : * mut :: libc :: c_void) -> * mut aws_s3express_credentials_provider > ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_tcp_keep_alive_options { pub keep_alive_interval_sec : u16 , pub keep_alive_timeout_sec : u16 , pub keep_alive_max_failed_probes : u16 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_tcp_keep_alive_options"] [:: std :: mem :: size_of :: < aws_s3_tcp_keep_alive_options > () - 6usize] ; ["Alignment of aws_s3_tcp_keep_alive_options"] [:: std :: mem :: align_of :: < aws_s3_tcp_keep_alive_options > () - 2usize] ; ["Offset of field: aws_s3_tcp_keep_alive_options::keep_alive_interval_sec"] [:: std :: mem :: offset_of ! (aws_s3_tcp_keep_alive_options , keep_alive_interval_sec) - 0usize] ; ["Offset of field: aws_s3_tcp_keep_alive_options::keep_alive_timeout_sec"] [:: std :: mem :: offset_of ! (aws_s3_tcp_keep_alive_options , keep_alive_timeout_sec) - 2usize] ; ["Offset of field: aws_s3_tcp_keep_alive_options::keep_alive_max_failed_probes"] [:: std :: mem :: offset_of ! (aws_s3_tcp_keep_alive_options , keep_alive_max_failed_probes) - 4usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_client_config { pub max_active_connections_override : u32 , pub region : aws_byte_cursor , pub client_bootstrap : * mut aws_client_bootstrap , pub tls_mode : aws_s3_meta_request_tls_mode , pub tls_connection_options : * const aws_tls_connection_options , # [doc = " Optional.\n If set, this controls how the client interact with file I/O.\n Read `aws_s3_file_io_options` for details.\n  Notes: Only applies to meta requests with `send_filepath` set.\n  TODO: adapt it to `recv_filepath`.\n\n eg:\n - When the file is too large to fit in the buffer, set `should_stream` to avoid buffering the whole parts in\n  memory.\n - When the disk I/O is faster than OS cache, set `direct_io` to bypass the OS cache."] pub fio_opts : * mut aws_s3_file_io_options , # [doc = " Required.\n Configure the signing for the requests made from the client.\n - Credentials or credentials provider is required. Other configs are all optional, and will be default to what\n      needs to sign the request for S3, only overrides when Non-zero/Not-empty is set.\n - To skip signing, you can config it with anonymous credentials.\n - S3 Client will derive the right config for signing process based on this.\n\n Notes:\n - For AWS_SIGNING_ALGORITHM_V4_S3EXPRESS, S3 client will use the credentials in the config to derive the\n S3 Express credentials that are used in the signing process.\n - For other auth algorithm, client may make modifications to signing config before passing it on to signer.\n\n TODO: deprecate this structure from auth, introduce a new S3 specific one."] pub signing_config : * const aws_signing_config_aws , # [doc = " Optional.\n Size of parts the object will be downloaded or uploaded in, in bytes.\n This only affects AWS_S3_META_REQUEST_TYPE_GET_OBJECT and AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n\n If not set, a dynamic default part size will be used based on the throughput target, memory_limit_in_bytes.\n\n The client will adjust the part size for AWS_S3_META_REQUEST_TYPE_PUT_OBJECT if needed for service limits (max\n number of parts per upload is 10,000, minimum upload part size is 5 MiB).\n\n You can also set this per meta-request, via `aws_s3_meta_request_options.part_size`."] pub part_size : u64 , pub max_part_size : u64 , # [doc = " Optional.\n The size threshold in bytes for when to use multipart uploads.\n Uploads larger than this will use the multipart upload strategy.\n Uploads smaller or equal to this will use a single HTTP request.\n This only affects AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n If set, this should be at least `part_size`.\n If not set, maximal of `part_size` and 5 MiB will be used.\n\n You can also set this per meta-request, via `aws_s3_meta_request_options.multipart_upload_threshold`."] pub multipart_upload_threshold : u64 , pub throughput_target_gbps : f64 , pub memory_limit_in_bytes : u64 , pub retry_strategy : * mut aws_retry_strategy , # [doc = " TODO: move MD5 config to checksum config.\n For multi-part upload, content-md5 will be calculated if the AWS_MR_CONTENT_MD5_ENABLED is specified\n     or initial request has content-md5 header.\n For single-part upload, keep the content-md5 in the initial request unchanged."] pub compute_content_md5 : aws_s3_meta_request_compute_content_md5 , pub shutdown_callback : aws_s3_client_shutdown_complete_callback_fn , pub shutdown_callback_user_data : * mut :: libc :: c_void , # [doc = " Optional.\n Proxy configuration for http connection.\n If the connection_type is AWS_HPCT_HTTP_LEGACY, it will be converted to AWS_HPCT_HTTP_TUNNEL if tls_mode is\n ENABLED. Otherwise, it will be converted to AWS_HPCT_HTTP_FORWARD."] pub proxy_options : * const aws_http_proxy_options , # [doc = " Optional.\n Configuration for fetching proxy configuration from environment.\n By Default proxy_ev_settings.aws_http_proxy_env_var_type is set to AWS_HPEV_ENABLE which means read proxy\n configuration from environment.\n Only works when proxy_options is not set. If both are set, configuration from proxy_options is used."] pub proxy_ev_settings : * const proxy_env_var_settings , # [doc = " Optional.\n If set to 0, default value is used."] pub connect_timeout_ms : u32 , # [doc = " Optional.\n Set keepalive to periodically transmit messages for detecting a disconnected peer."] pub tcp_keep_alive_options : * const aws_s3_tcp_keep_alive_options , # [doc = " Optional.\n Configuration options for connection monitoring.\n If the transfer speed falls below the specified minimum_throughput_bytes_per_second, the operation is aborted.\n If set to NULL, default values are used."] pub monitoring_options : * const aws_http_connection_monitoring_options , # [doc = " Enable backpressure and prevent response data from downloading faster than you can handle it.\n\n If false (default), no backpressure is applied and data will download as fast as possible.\n\n If true, each meta request has a flow-control window that shrinks as\n response body data is downloaded (headers do not affect the window).\n `initial_read_window` determines the starting size of each meta request's window.\n\n - You will stop receiving response body data whenever the flow-control window reaches 0\n - If the window size remaining is smaller than the part download, client will buffer the part until\n   the window opens up to delivery the full part.\n - You must call aws_s3_meta_request_increment_read_window() to keep data flowing.\n\n WARNING: This feature is experimental.\n Currently, backpressure is only applied to GetObject requests which are split into multiple parts,\n - If you set body_callback, no more data will be delivered once the window reaches 0.\n - If you set body_callback_ex, you may still receive some data after the window reaches 0. TODO: fix it."] pub enable_read_backpressure : bool , # [doc = " The starting size of each meta request's flow-control window, in bytes.\n Ignored unless `enable_read_backpressure` is true."] pub initial_read_window : usize , # [doc = " To enable S3 Express support or not."] pub enable_s3express : bool , # [doc = " Optional.\n Only used when `enable_s3express` is set.\n\n If set, client will invoke the factory to get the provider to use, when needed.\n\n If not set, client will create a default S3 Express provider under the hood.\n\n NOTE: THE FOLLOWING BEHAVIOR IS EXPERIMENTAL AND UNSTABLE\n Default S3 Express provider will pass the headers allowed in `g_s3_create_session_allowed_headers` to the\n CreateSession call."] pub s3express_provider_override_factory : aws_s3express_provider_factory_fn , pub factory_user_data : * mut :: libc :: c_void , # [doc = " THIS IS AN EXPERIMENTAL AND UNSTABLE API\n (Optional)\n An array of network interface names. The client will distribute the\n connections across network interface names provided in this array. If any interface name is invalid, goes down,\n or has any issues like network access, you will see connection failures.\n\n This option is only supported on Linux, MacOS, and platforms that have either SO_BINDTODEVICE or IP_BOUND_IF. It\n is not supported on Windows. `AWS_ERROR_PLATFORM_NOT_SUPPORTED` will be raised on unsupported platforms. On\n Linux, SO_BINDTODEVICE is used and requires kernel version >= 5.7 or root privileges."] pub network_interface_names_array : * const aws_byte_cursor , pub num_network_interface_names : usize , # [doc = " Experimental (touch at your own risk).\n (Optional)\n Factory function to create buffer pool.\n if not set creates default implementation of the buffer pool."] pub buffer_pool_factory_fn : aws_s3_buffer_pool_factory_fn , pub buffer_pool_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client_config"] [:: std :: mem :: size_of :: < aws_s3_client_config > () - 248usize] ; ["Alignment of aws_s3_client_config"] [:: std :: mem :: align_of :: < aws_s3_client_config > () - 8usize] ; ["Offset of field: aws_s3_client_config::max_active_connections_override"] [:: std :: mem :: offset_of ! (aws_s3_client_config , max_active_connections_override) - 0usize] ; ["Offset of field: aws_s3_client_config::region"] [:: std :: mem :: offset_of ! (aws_s3_client_config , region) - 8usize] ; ["Offset of field: aws_s3_client_config::client_bootstrap"] [:: std :: mem :: offset_of ! (aws_s3_client_config , client_bootstrap) - 24usize] ; ["Offset of field: aws_s3_client_config::tls_mode"] [:: std :: mem :: offset_of ! (aws_s3_client_config , tls_mode) - 32usize] ; ["Offset of field: aws_s3_client_config::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_s3_client_config , tls_connection_options) - 40usize] ; ["Offset of field: aws_s3_client_config::fio_opts"] [:: std :: mem :: offset_of ! (aws_s3_client_config , fio_opts) - 48usize] ; ["Offset of field: aws_s3_client_config::signing_config"] [:: std :: mem :: offset_of ! (aws_s3_client_config , signing_config) - 56usize] ; ["Offset of field: aws_s3_client_config::part_size"] [:: std :: mem :: offset_of ! (aws_s3_client_config , part_size) - 64usize] ; ["Offset of field: aws_s3_client_config::max_part_size"] [:: std :: mem :: offset_of ! (aws_s3_client_config , max_part_size) - 72usize] ; ["Offset of field: aws_s3_client_config::multipart_upload_threshold"] [:: std :: mem :: offset_of ! (aws_s3_client_config , multipart_upload_threshold) - 80usize] ; ["Offset of field: aws_s3_client_config::throughput_target_gbps"] [:: std :: mem :: offset_of ! (aws_s3_client_config , throughput_target_gbps) - 88usize] ; ["Offset of field: aws_s3_client_config::memory_limit_in_bytes"] [:: std :: mem :: offset_of ! (aws_s3_client_config , memory_limit_in_bytes) - 96usize] ; ["Offset of field: aws_s3_client_config::retry_strategy"] [:: std :: mem :: offset_of ! (aws_s3_client_config , retry_strategy) - 104usize] ; ["Offset of field: aws_s3_client_config::compute_content_md5"] [:: std :: mem :: offset_of ! (aws_s3_client_config , compute_content_md5) - 112usize] ; ["Offset of field: aws_s3_client_config::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_client_config , shutdown_callback) - 120usize] ; ["Offset of field: aws_s3_client_config::shutdown_callback_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client_config , shutdown_callback_user_data) - 128usize] ; ["Offset of field: aws_s3_client_config::proxy_options"] [:: std :: mem :: offset_of ! (aws_s3_client_config , proxy_options) - 136usize] ; ["Offset of field: aws_s3_client_config::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_s3_client_config , proxy_ev_settings) - 144usize] ; ["Offset of field: aws_s3_client_config::connect_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_client_config , connect_timeout_ms) - 152usize] ; ["Offset of field: aws_s3_client_config::tcp_keep_alive_options"] [:: std :: mem :: offset_of ! (aws_s3_client_config , tcp_keep_alive_options) - 160usize] ; ["Offset of field: aws_s3_client_config::monitoring_options"] [:: std :: mem :: offset_of ! (aws_s3_client_config , monitoring_options) - 168usize] ; ["Offset of field: aws_s3_client_config::enable_read_backpressure"] [:: std :: mem :: offset_of ! (aws_s3_client_config , enable_read_backpressure) - 176usize] ; ["Offset of field: aws_s3_client_config::initial_read_window"] [:: std :: mem :: offset_of ! (aws_s3_client_config , initial_read_window) - 184usize] ; ["Offset of field: aws_s3_client_config::enable_s3express"] [:: std :: mem :: offset_of ! (aws_s3_client_config , enable_s3express) - 192usize] ; ["Offset of field: aws_s3_client_config::s3express_provider_override_factory"] [:: std :: mem :: offset_of ! (aws_s3_client_config , s3express_provider_override_factory) - 200usize] ; ["Offset of field: aws_s3_client_config::factory_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client_config , factory_user_data) - 208usize] ; ["Offset of field: aws_s3_client_config::network_interface_names_array"] [:: std :: mem :: offset_of ! (aws_s3_client_config , network_interface_names_array) - 216usize] ; ["Offset of field: aws_s3_client_config::num_network_interface_names"] [:: std :: mem :: offset_of ! (aws_s3_client_config , num_network_interface_names) - 224usize] ; ["Offset of field: aws_s3_client_config::buffer_pool_factory_fn"] [:: std :: mem :: offset_of ! (aws_s3_client_config , buffer_pool_factory_fn) - 232usize] ; ["Offset of field: aws_s3_client_config::buffer_pool_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client_config , buffer_pool_user_data) - 240usize] ; } ; impl Default for aws_s3_client_config { 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)] pub struct aws_s3_checksum_config { # [doc = " PUT Object specific *******************************/\n/**\n The location of client added checksum header.\n\n If AWS_SCL_NONE. No request payload checksum will be added.\n\n If AWS_SCL_HEADER, the client will calculate the checksum and add it to the headers.\n\n If AWS_SCL_TRAILER, the payload will be aws_chunked encoded, The client will calculate the checksum and add it to\n the trailer. Note the payload of the original request cannot be aws-chunked encoded already, this will cause an\n error."] pub location : aws_s3_checksum_location , # [doc = " The checksum algorithm used.\n Must be set if location is not AWS_SCL_NONE."] pub checksum_algorithm : aws_s3_checksum_algorithm , # [doc = " Optional.\n Provide the full object checksum. This callback is invoked once, after the entire body has been read.\n sent.\n\n NOTE:\n  - Do not set this callback if the HTTP message already has a checksum header (e.g. x-amz-checksum-crc32). Doing\n      so will raise AWS_ERROR_INVALID_ARGUMENT.\n  - checksum_algorithm must be set to the algorithm you will use.\n\n WARNING: This feature is experimental/unstable.\n At this time, full object checksum callback is only available for multipart upload\n (when Content-Length is above the `multipart_upload_threshold`,\n or Content-Length not specified). Otherwise, it will be ignored."] pub full_object_checksum_callback : aws_s3_meta_request_full_object_checksum_fn , pub user_data : * mut :: libc :: c_void , # [doc = " GET Object specific *******************************/\n/**\n Enable checksum mode header will be attached to GET requests, this will tell s3 to send back checksums headers if\n they exist. Calculate the corresponding checksum on the response bodies. The meta request will finish with a did\n validate field and set the error code to AWS_ERROR_S3_RESPONSE_CHECKSUM_MISMATCH if the calculated\n checksum, and checksum found in the response header do not match."] pub validate_response_checksum : bool , # [doc = " Optional array of `enum aws_s3_checksum_algorithm`.\n\n Ignored when validate_response_checksum is not set.\n If not set all the algorithms will be selected as default behavior.\n Owned by the caller.\n\n The list of algorithms for user to pick up when validate the checksum. Client will pick up the algorithm from the\n list with the priority based on performance, and the algorithm sent by server. The priority based on performance\n is [CRC64NVME, CRC32C, CRC32, SHA1, SHA256].\n\n If the response checksum was validated by client, the result will indicate which algorithm was picked."] pub validate_checksum_algorithms : * const aws_array_list , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_checksum_config"] [:: std :: mem :: size_of :: < aws_s3_checksum_config > () - 40usize] ; ["Alignment of aws_s3_checksum_config"] [:: std :: mem :: align_of :: < aws_s3_checksum_config > () - 8usize] ; ["Offset of field: aws_s3_checksum_config::location"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , location) - 0usize] ; ["Offset of field: aws_s3_checksum_config::checksum_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , checksum_algorithm) - 4usize] ; ["Offset of field: aws_s3_checksum_config::full_object_checksum_callback"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , full_object_checksum_callback) - 8usize] ; ["Offset of field: aws_s3_checksum_config::user_data"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , user_data) - 16usize] ; ["Offset of field: aws_s3_checksum_config::validate_response_checksum"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , validate_response_checksum) - 24usize] ; ["Offset of field: aws_s3_checksum_config::validate_checksum_algorithms"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , validate_checksum_algorithms) - 32usize] ; } ; impl Default for aws_s3_checksum_config { 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 a new meta request, ie, file transfer that will be handled by the high performance client.\n\n There are several ways to pass the request's body data:\n 1) If the data is already in memory, set the body-stream on `message`.\n 2) If the data is on disk, set `send_filepath` for best performance.\n 3) If the data is available, but copying each chunk is asynchronous, set `send_async_stream`.\n 4) If you're not sure when each chunk of data will be available, use `send_using_async_writes`."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request_options { pub type_ : aws_s3_meta_request_type , # [doc = " The S3 operation name (e.g. \"CreateBucket\").\n This MUST be set if type is AWS_S3_META_REQUEST_TYPE_DEFAULT;\n it is automatically populated for other meta-request types.\n The canonical operation names are listed here:\n https://docs.aws.amazon.com/AmazonS3/latest/API/API_Operations_Amazon_Simple_Storage_Service.html\n\n This name is used to fill out details in metrics and error reports.\n It also drives some operation-specific behavior.\n If you pass the wrong name, you risk getting the wrong behavior.\n\n For example, every operation except \"GetObject\" has its response checked\n for error, even if the HTTP status-code was 200 OK\n (see https://repost.aws/knowledge-center/s3-resolve-200-internalerror).\n If you used AWS_S3_META_REQUEST_TYPE_DEFAULT to do GetObject, but mis-named\n it \"Download\", and the object looked like XML with an error code,\n then the meta-request would fail. You may log the full response body,\n and leak sensitive data."] pub operation_name : aws_byte_cursor , # [doc = " Configure the signing for each request created for this meta request. If NULL, options in the client will be\n  used.\n - The credentials will be obtained based on the precedence of:\n      1. `credentials` from `signing_config` in `aws_s3_meta_request_options`\n      2. `credentials_provider` from `signing_config` in `aws_s3_meta_request_options`\n      3. `credentials` from `signing_config` cached in the client\n      4. `credentials_provider` cached in the client\n - To skip signing, you can config it with anonymous credentials.\n - S3 Client will derive the right config for signing process based on this.\n\n Notes:\n - For AWS_SIGNING_ALGORITHM_V4_S3EXPRESS, S3 client will use the credentials in the config to derive the\n S3 Express credentials that are used in the signing process.\n - For other auth algorithm, client may make modifications to signing config before passing it on to signer."] pub signing_config : * const aws_signing_config_aws , pub message : * mut aws_http_message , # [doc = " Optional.\n If set, the received data will be written into this file.\n the `body_callback` will NOT be invoked.\n This gives a better performance when receiving data to write to a file.\n See `aws_s3_recv_file_options` for the configuration on the receive file."] pub recv_filepath : aws_byte_cursor , # [doc = " Optional.\n Default to AWS_S3_RECV_FILE_CREATE_OR_REPLACE.\n This only works with recv_filepath set.\n See `aws_s3_recv_file_options`."] pub recv_file_option : aws_s3_recv_file_options , # [doc = " Optional.\n The specified position to start writing at for the recv file when `recv_file_option` is set to\n AWS_S3_RECV_FILE_WRITE_TO_POSITION, ignored otherwise."] pub recv_file_position : u64 , # [doc = " Set it to be true to delete the receive file on failure, otherwise, the file will be left as-is.\n This only works with recv_filepath set."] pub recv_file_delete_on_failure : bool , # [doc = " Optional.\n If set, this file is sent as the request body.\n This gives the best performance when sending data from a file.\n Do not set if the body is being passed by other means (see note above)."] pub send_filepath : aws_byte_cursor , # [doc = " Optional.\n Overrides the client config if set.\n If set, this controls how the meta request interact with file I/O.\n Read `aws_s3_file_io_options` for details.\n  Notes: Only applies when `send_filepath` is set.\n  TODO: adapt it to `recv_filepath`.\n\n Note: if both client and meta request don't set this, for objects larger than 2TiB, this will be set to a default\n options with `should_stream` to be True and others follow the default to avoid memory issues.\n\n eg:\n - When the file is too large to fit in the buffer, set `should_stream` to avoid buffering the whole parts in\n  memory.\n - When the disk I/O is faster than OS cache, set `direct_io` to bypass the OS cache."] pub fio_opts : * mut aws_s3_file_io_options , # [doc = " Optional - EXPERIMENTAL/UNSTABLE\n If set, the request body comes from this async stream.\n Use this when outgoing data will be produced in asynchronous chunks.\n The S3 client will read from the stream whenever it's ready to upload another chunk.\n\n WARNING: The S3 client can deadlock if many async streams are \"stalled\",\n never completing their async read. If you're not sure when (if ever)\n data will be ready, use `send_using_async_writes` instead.\n\n Do not set if the body is being passed by other means (see note above)."] pub send_async_stream : * mut aws_async_input_stream , # [doc = " Optional - EXPERIMENTAL/UNSTABLE\n Set this to send request body data using the async aws_s3_meta_request_poll_write()\n or aws_s3_meta_request_write() functions.\n Use this when outgoing data will be produced in asynchronous chunks,\n and you're not sure when (if ever) each chunk will be ready.\n\n This only works with AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n\n Do not set if the body is being passed by other means (see note above)."] pub send_using_async_writes : bool , # [doc = " Optional.\n if set, the flexible checksum will be performed by client based on the config.\n\n Notes: checksum can also be added through the http message provided.\n      The checksum in http header will override corresponding the checksum config."] pub checksum_config : * const aws_s3_checksum_config , # [doc = " Optional.\n Size of parts the object will be downloaded or uploaded in, in bytes.\n This only affects AWS_S3_META_REQUEST_TYPE_GET_OBJECT and AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n\n If not set, the value from `aws_s3_client_config.part_size` is used, which defaults to a dynamic value based on\n the throughput target, memory_limit_in_bytes and the requested object size.\n\n The client will adjust the part size for AWS_S3_META_REQUEST_TYPE_PUT_OBJECT if needed for service limits (max\n number of parts per upload is 10,000, minimum upload part size is 5 MiB)."] pub part_size : u64 , # [doc = " Optional - EXPERIMENTAL/UNSTABLE\n Set this to prefer for the dynamic default part_size over the part size set for both client and meta request for\n the best performance under the memory constrain, especially for getting large objects."] pub force_dynamic_part_size : bool , # [doc = " Optional.\n The size threshold in bytes for when to use multipart uploads.\n Uploads larger than this will use the multipart upload strategy.\n Uploads smaller or equal to this will use a single HTTP request.\n This only affects AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n If set, this should be at least `part_size`.\n If not set, `part_size` adjusted by client will be used as the threshold.\n If both `part_size` and `multipart_upload_threshold` are not set,\n the values from `aws_s3_client_config` are used."] pub multipart_upload_threshold : u64 , pub user_data : * mut :: libc :: c_void , # [doc = " Optional.\n Invoked to provide response headers received during execution of the meta request.\n Note: this callback will not be fired for cases when resuming an\n operation that was already completed (ex. pausing put object after it\n uploaded all data and then resuming it)\n See `aws_s3_meta_request_headers_callback_fn`."] pub headers_callback : aws_s3_meta_request_headers_callback_fn , # [doc = " Invoked to provide the response body as it is received.\n See `aws_s3_meta_request_receive_body_callback_fn`."] pub body_callback : aws_s3_meta_request_receive_body_callback_fn , # [doc = " Invoked to provide the response body as it is received.\n Provides extra information as compared to regular callback.\n Note: setting both body_callback and body_callback_ex is not\n considered valid and meta request creation will fail.\n See `aws_s3_meta_request_receive_body_callback_ex_fn`."] pub body_callback_ex : aws_s3_meta_request_receive_body_callback_ex_fn , # [doc = " Invoked when the entire meta request execution is complete.\n See `aws_s3_meta_request_finish_fn`."] pub finish_callback : aws_s3_meta_request_finish_fn , pub shutdown_callback : aws_s3_meta_request_shutdown_fn , # [doc = " Invoked to report progress of the meta request execution.\n See `aws_s3_meta_request_progress_fn`."] pub progress_callback : aws_s3_meta_request_progress_fn , # [doc = " Optional.\n To get telemetry metrics when a single request finishes.\n If set the request will keep track of the metrics from `aws_s3_request_metrics`, and fire the callback when the\n request finishes receiving response.\n See `aws_s3_meta_request_telemetry_fn`"] pub telemetry_callback : aws_s3_meta_request_telemetry_fn , # [doc = " Optional.\n Callback for reviewing an upload before it completes.\n WARNING: experimental/unstable\n See `aws_s3_meta_request_upload_review_fn`"] pub upload_review_callback : aws_s3_meta_request_upload_review_fn , # [doc = " Optional.\n Endpoint override for request. Can be used to override scheme and port of\n the endpoint.\n There is some overlap between Host header and Endpoint and corner cases\n are handled as follows:\n - Only Host header is set - Host is used to construct endpoint. https is\n   default with corresponding port\n - Only endpoint is set - Host header is created from endpoint. Port and\n   Scheme from endpoint is used.\n - Both Host and Endpoint is set - Host header must match Authority of\n   Endpoint uri. Port and Scheme from endpoint is used."] pub endpoint : * const aws_uri , # [doc = " Optional.\n For meta requests that support pause/resume (e.g. PutObject), serialized resume token returned by\n aws_s3_meta_request_pause() can be provided here.\n Note: If PutObject request specifies a checksum algorithm, client will calculate checksums while skipping parts\n from the buffer and compare them them to previously uploaded part checksums."] pub resume_token : * mut aws_s3_meta_request_resume_token , pub object_size_hint : * const u64 , pub copy_source_uri : aws_byte_cursor , pub max_active_connections_override : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_options"] [:: std :: mem :: size_of :: < aws_s3_meta_request_options > () - 272usize] ; ["Alignment of aws_s3_meta_request_options"] [:: std :: mem :: align_of :: < aws_s3_meta_request_options > () - 8usize] ; ["Offset of field: aws_s3_meta_request_options::type_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , type_) - 0usize] ; ["Offset of field: aws_s3_meta_request_options::operation_name"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , operation_name) - 8usize] ; ["Offset of field: aws_s3_meta_request_options::signing_config"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , signing_config) - 24usize] ; ["Offset of field: aws_s3_meta_request_options::message"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , message) - 32usize] ; ["Offset of field: aws_s3_meta_request_options::recv_filepath"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , recv_filepath) - 40usize] ; ["Offset of field: aws_s3_meta_request_options::recv_file_option"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , recv_file_option) - 56usize] ; ["Offset of field: aws_s3_meta_request_options::recv_file_position"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , recv_file_position) - 64usize] ; ["Offset of field: aws_s3_meta_request_options::recv_file_delete_on_failure"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , recv_file_delete_on_failure) - 72usize] ; ["Offset of field: aws_s3_meta_request_options::send_filepath"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , send_filepath) - 80usize] ; ["Offset of field: aws_s3_meta_request_options::fio_opts"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , fio_opts) - 96usize] ; ["Offset of field: aws_s3_meta_request_options::send_async_stream"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , send_async_stream) - 104usize] ; ["Offset of field: aws_s3_meta_request_options::send_using_async_writes"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , send_using_async_writes) - 112usize] ; ["Offset of field: aws_s3_meta_request_options::checksum_config"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , checksum_config) - 120usize] ; ["Offset of field: aws_s3_meta_request_options::part_size"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , part_size) - 128usize] ; ["Offset of field: aws_s3_meta_request_options::force_dynamic_part_size"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , force_dynamic_part_size) - 136usize] ; ["Offset of field: aws_s3_meta_request_options::multipart_upload_threshold"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , multipart_upload_threshold) - 144usize] ; ["Offset of field: aws_s3_meta_request_options::user_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , user_data) - 152usize] ; ["Offset of field: aws_s3_meta_request_options::headers_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , headers_callback) - 160usize] ; ["Offset of field: aws_s3_meta_request_options::body_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , body_callback) - 168usize] ; ["Offset of field: aws_s3_meta_request_options::body_callback_ex"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , body_callback_ex) - 176usize] ; ["Offset of field: aws_s3_meta_request_options::finish_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , finish_callback) - 184usize] ; ["Offset of field: aws_s3_meta_request_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , shutdown_callback) - 192usize] ; ["Offset of field: aws_s3_meta_request_options::progress_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , progress_callback) - 200usize] ; ["Offset of field: aws_s3_meta_request_options::telemetry_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , telemetry_callback) - 208usize] ; ["Offset of field: aws_s3_meta_request_options::upload_review_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , upload_review_callback) - 216usize] ; ["Offset of field: aws_s3_meta_request_options::endpoint"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , endpoint) - 224usize] ; ["Offset of field: aws_s3_meta_request_options::resume_token"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , resume_token) - 232usize] ; ["Offset of field: aws_s3_meta_request_options::object_size_hint"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , object_size_hint) - 240usize] ; ["Offset of field: aws_s3_meta_request_options::copy_source_uri"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , copy_source_uri) - 248usize] ; ["Offset of field: aws_s3_meta_request_options::max_active_connections_override"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , max_active_connections_override) - 264usize] ; } ; impl Default for aws_s3_meta_request_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)] pub struct aws_s3_meta_request_result { pub error_response_headers : * mut aws_http_headers , pub error_response_body : * mut aws_byte_buf , pub error_response_operation_name : * mut aws_string , pub response_status : :: libc :: c_int , pub did_validate : bool , pub validation_algorithm : aws_s3_checksum_algorithm , pub error_code : :: libc :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_result"] [:: std :: mem :: size_of :: < aws_s3_meta_request_result > () - 40usize] ; ["Alignment of aws_s3_meta_request_result"] [:: std :: mem :: align_of :: < aws_s3_meta_request_result > () - 8usize] ; ["Offset of field: aws_s3_meta_request_result::error_response_headers"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , error_response_headers) - 0usize] ; ["Offset of field: aws_s3_meta_request_result::error_response_body"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , error_response_body) - 8usize] ; ["Offset of field: aws_s3_meta_request_result::error_response_operation_name"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , error_response_operation_name) - 16usize] ; ["Offset of field: aws_s3_meta_request_result::response_status"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , response_status) - 24usize] ; ["Offset of field: aws_s3_meta_request_result::did_validate"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , did_validate) - 28usize] ; ["Offset of field: aws_s3_meta_request_result::validation_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , validation_algorithm) - 32usize] ; ["Offset of field: aws_s3_meta_request_result::error_code"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , error_code) - 36usize] ; } ; impl Default for aws_s3_meta_request_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 () } } } unsafe extern "C" { pub fn aws_s3_client_new (allocator : * mut aws_allocator , client_config : * const aws_s3_client_config) -> * mut aws_s3_client ; } unsafe extern "C" { # [doc = " Add a reference, keeping this object alive.\n The reference must be released when you are done with it, or it's memory will never be cleaned up.\n You must not pass in NULL.\n Always returns the same pointer that was passed in."] pub fn aws_s3_client_acquire (client : * mut aws_s3_client) -> * mut aws_s3_client ; } unsafe extern "C" { # [doc = " Release a reference.\n When the reference count drops to 0, this object will be cleaned up.\n It's OK to pass in NULL (nothing happens).\n Always returns NULL."] pub fn aws_s3_client_release (client : * mut aws_s3_client) -> * mut aws_s3_client ; } unsafe extern "C" { pub fn aws_s3_client_make_meta_request (client : * mut aws_s3_client , options : * const aws_s3_meta_request_options) -> * mut aws_s3_meta_request ; } # [doc = " The result of an `aws_s3_meta_request_poll_write()` call.\n Think of this like Rust's `Poll<Result<size_t, int>>`, or C++'s `optional<expected<size_t, int>>`."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_meta_request_poll_write_result { pub is_pending : bool , pub error_code : :: libc :: c_int , pub bytes_processed : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_poll_write_result"] [:: std :: mem :: size_of :: < aws_s3_meta_request_poll_write_result > () - 16usize] ; ["Alignment of aws_s3_meta_request_poll_write_result"] [:: std :: mem :: align_of :: < aws_s3_meta_request_poll_write_result > () - 8usize] ; ["Offset of field: aws_s3_meta_request_poll_write_result::is_pending"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_poll_write_result , is_pending) - 0usize] ; ["Offset of field: aws_s3_meta_request_poll_write_result::error_code"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_poll_write_result , error_code) - 4usize] ; ["Offset of field: aws_s3_meta_request_poll_write_result::bytes_processed"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_poll_write_result , bytes_processed) - 8usize] ; } ; unsafe extern "C" { # [doc = " Attempt to write data.\n\n You must set `aws_s3_meta_request_options.send_using_async_writes` to use this function.\n\n This is a non-blocking poll-style async function, similar to Rust's:\n https://docs.rs/futures/latest/futures/io/trait.AsyncWrite.html#tymethod.poll_write\n If you prefer completion-style async functions, and your data can outlive\n the callstack, use aws_s3_meta_request_write() instead.\n\n Check the returned `result` struct to see what happened:\n 1)   If `result.is_pending == true` then no work was done.\n      The waker callback will be invoked when you can call poll_write() again.\n      Do not call poll_write() again before the waker is invoked.\n\n 2)   Else if `result.error_code != 0` then poll_write() did not succeed\n      and you should not call it again. The meta request is guaranteed to finish soon\n      (you don't need to worry about canceling the meta request yourself after a failed write).\n      A common error code is AWS_ERROR_S3_REQUEST_HAS_COMPLETED, indicating\n      the meta request completed for reasons unrelated to the poll_write() call\n      (e.g. CreateMultipartUpload received a 403 Forbidden response).\n      AWS_ERROR_INVALID_STATE usually indicates that you're calling poll_write()\n      incorrectly (e.g. not waiting for waker callback from previous poll_write() call).\n\n 3)   Else `result.bytes_processed` tells you how much data was processed.\n      `bytes_processed` may be less than the `data.len` you passed in.\n      Continue calling poll_write() with the remaining data until everything is processed.\n      `result.bytes_processed` won't be 0 unless you passed in `data.len` of 0.\n\n @param meta_request  Meta request\n\n @param data          The data to send. The data can be any size.\n                      `result.bytes_processed` indicates how many bytes were\n                      processed by this call.\n\n @param eof           Pass true to signal EOF (end of file).\n                      If poll_write() doesn't process all your data\n                      (`result.is_pending` or `result.byte_processed < data.len`)\n                      then EOF was ignored, and you need to pass it again\n                      to subsequent poll_write() calls.\n\n @param waker         Waker callback.\n                      If `result.is_pending == true`, then the waker will be called\n                      exactly once when it's a good time to call poll_write() again.\n                      If `result.is_pending == false`, the waker will never be called.\n\n @param user_data     Pointer to be passed to the waker callback.\n\n WARNING: This feature is experimental."] pub fn aws_s3_meta_request_poll_write (meta_request : * mut aws_s3_meta_request , data : aws_byte_cursor , eof : bool , waker : aws_simple_completion_callback , user_data : * mut :: libc :: c_void) -> aws_s3_meta_request_poll_write_result ; } unsafe extern "C" { # [doc = " Write the next chunk of data.\n\n You must set `aws_s3_meta_request_options.send_using_async_writes` to use this function.\n\n This function is asynchronous, and returns a future (see <aws/io/future.h>).\n You may not call write() again until the future completes.\n\n If the future completes with an error code, then write() did not succeed\n and you should not call it again. If the future contains any error code,\n the meta request is guaranteed to finish soon (you don't need to worry about\n canceling the meta request yourself after a failed write).\n A common error code is AWS_ERROR_S3_REQUEST_HAS_COMPLETED, indicating\n the meta request completed for reasons unrelated to the write() call\n (e.g. CreateMultipartUpload received a 403 Forbidden response).\n AWS_ERROR_INVALID_STATE usually indicates that you're calling write()\n incorrectly (e.g. not waiting for previous write to complete).\n\n You MUST keep the data in memory until the future completes.\n If you cannot do this, use aws_s3_meta_request_poll_write() instead.\n\n You can wait any length of time between calls to write().\n If there's not enough data to upload a part, the data will be copied\n to a buffer and the future will immediately complete.\n\n @param meta_request  Meta request\n\n @param data          The data to send. The data can be any size.\n\n @param eof           Pass true to signal EOF (end of file).\n                      Do not call write() again after passing true.\n\n This function never returns NULL.\n\n WARNING: This feature is experimental."] pub fn aws_s3_meta_request_write (meta_request : * mut aws_s3_meta_request , data : aws_byte_cursor , eof : bool) -> * mut aws_future_void ; } unsafe extern "C" { # [doc = " Increment the flow-control window, so that response data continues downloading.\n\n If the client was created with `enable_read_backpressure` set true,\n each meta request has a flow-control window that shrinks as response\n body data is downloaded (headers do not affect the size of the window).\n The client's `initial_read_window` determines the starting size of each meta request's window.\n If a meta request's flow-control window reaches 0, no further data will be downloaded.\n If the `initial_read_window` is 0, the request will not start until the window is incremented.\n Maintain a larger window to keep up a high download throughput,\n parts cannot download in parallel unless the window is large enough to hold multiple parts.\n Maintain a smaller window to limit the amount of data buffered in memory.\n\n If `enable_read_backpressure` is false this call will have no effect,\n no backpressure is being applied and data is being downloaded as fast as possible.\n\n WARNING: This feature is experimental.\n Currently, backpressure is applied to GetObject requests,\n - If you set body_callback, no more data will be delivered once the window reaches 0.\n - If you set body_callback_ex, you may still receive some data after the window reaches 0. TODO: fix it."] pub fn aws_s3_meta_request_increment_read_window (meta_request : * mut aws_s3_meta_request , bytes : u64) ; } unsafe extern "C" { pub fn aws_s3_meta_request_cancel (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { # [doc = " Note: pause is currently only supported on upload requests.\n In order to pause an ongoing upload, call aws_s3_meta_request_pause() that\n will return resume token. Token can be used to query the state of operation\n at the pausing time.\n To resume an upload that was paused, supply resume token in the meta\n request options structure member aws_s3_meta_request_options.resume_token.\n The upload can be resumed either from the same client or a different one.\n Corner cases for resume upload are as follows:\n - upload is not MPU - fail with AWS_ERROR_UNSUPPORTED_OPERATION\n - pausing before MPU is created - NULL resume token returned. NULL resume\n   token is equivalent to restarting upload\n - pausing in the middle of part transfer - return resume token. scheduling of\n   new part uploads stops.\n - pausing after completeMPU started - return resume token. if s3 cannot find\n   find associated MPU id when resuming with that token and num of parts\n   uploaded equals to total num parts, then operation is a no op. Otherwise\n   operation fails.\n Note: for no op case the call will succeed and finish/shutdown request callbacks will\n   fire, but on headers callback will not fire.\n Note: similar to cancel pause does not cancel requests already in flight and\n and parts might complete after pause is requested.\n @param meta_request pointer to the aws_s3_meta_request of the upload to be paused\n @param resume_token resume token\n @return either AWS_OP_ERR or AWS_OP_SUCCESS"] pub fn aws_s3_meta_request_pause (meta_request : * mut aws_s3_meta_request , out_resume_token : * mut * mut aws_s3_meta_request_resume_token) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_resume_token_options { pub upload_id : aws_byte_cursor , pub part_size : u64 , pub total_num_parts : usize , # [doc = " Optional.\n\n Note: during resume num_parts_uploaded is used for sanity checking against\n uploads on s3 side.\n In cases where upload id does not exist (already resumed using this token\n or pause called after upload completes, etc...) and num_parts_uploaded\n equals to total num parts, resume will become a noop."] pub num_parts_completed : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_resume_token_options"] [:: std :: mem :: size_of :: < aws_s3_upload_resume_token_options > () - 40usize] ; ["Alignment of aws_s3_upload_resume_token_options"] [:: std :: mem :: align_of :: < aws_s3_upload_resume_token_options > () - 8usize] ; ["Offset of field: aws_s3_upload_resume_token_options::upload_id"] [:: std :: mem :: offset_of ! (aws_s3_upload_resume_token_options , upload_id) - 0usize] ; ["Offset of field: aws_s3_upload_resume_token_options::part_size"] [:: std :: mem :: offset_of ! (aws_s3_upload_resume_token_options , part_size) - 16usize] ; ["Offset of field: aws_s3_upload_resume_token_options::total_num_parts"] [:: std :: mem :: offset_of ! (aws_s3_upload_resume_token_options , total_num_parts) - 24usize] ; ["Offset of field: aws_s3_upload_resume_token_options::num_parts_completed"] [:: std :: mem :: offset_of ! (aws_s3_upload_resume_token_options , num_parts_completed) - 32usize] ; } ; impl Default for aws_s3_upload_resume_token_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 () } } } unsafe extern "C" { # [doc = " Create upload resume token from persisted data.\n Note: Data required for resume token varies per operation."] pub fn aws_s3_meta_request_resume_token_new_upload (allocator : * mut aws_allocator , options : * const aws_s3_upload_resume_token_options) -> * mut aws_s3_meta_request_resume_token ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_acquire (resume_token : * mut aws_s3_meta_request_resume_token) -> * mut aws_s3_meta_request_resume_token ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_release (resume_token : * mut aws_s3_meta_request_resume_token) -> * mut aws_s3_meta_request_resume_token ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_type (resume_token : * mut aws_s3_meta_request_resume_token) -> aws_s3_meta_request_type ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_part_size (resume_token : * mut aws_s3_meta_request_resume_token) -> u64 ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_total_num_parts (resume_token : * mut aws_s3_meta_request_resume_token) -> usize ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_num_parts_completed (resume_token : * mut aws_s3_meta_request_resume_token) -> usize ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_upload_id (resume_token : * mut aws_s3_meta_request_resume_token) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Add a reference, keeping this object alive.\n The reference must be released when you are done with it, or it's memory will never be cleaned up.\n You must not pass in NULL.\n Always returns the same pointer that was passed in."] pub fn aws_s3_meta_request_acquire (meta_request : * mut aws_s3_meta_request) -> * mut aws_s3_meta_request ; } unsafe extern "C" { # [doc = " Release a reference.\n When the reference count drops to 0, this object will be cleaned up.\n It's OK to pass in NULL (nothing happens).\n Always returns NULL."] pub fn aws_s3_meta_request_release (meta_request : * mut aws_s3_meta_request) -> * mut aws_s3_meta_request ; } unsafe extern "C" { # [doc = " Initialize the configuration for a default S3 signing."] pub fn aws_s3_init_default_signing_config (signing_config : * mut aws_signing_config_aws , region : aws_byte_cursor , credentials_provider : * mut aws_credentials_provider) ; } unsafe extern "C" { # [doc = " Return operation name for aws_s3_request_type,\n or empty string if the type doesn't map to an actual operation.\n For example:\n AWS_S3_REQUEST_TYPE_HEAD_OBJECT -> \"HeadObject\"\n AWS_S3_REQUEST_TYPE_UNKNOWN -> \"\"\n AWS_S3_REQUEST_TYPE_MAX -> \"\""] pub fn aws_s3_request_type_operation_name (type_ : aws_s3_request_type) -> * const :: libc :: c_char ; } unsafe extern "C" { # [doc = " Add a reference, keeping this object alive.\n The reference must be released when you are done with it, or it's memory will never be cleaned up.\n Always returns the same pointer that was passed in."] pub fn aws_s3_request_metrics_acquire (metrics : * mut aws_s3_request_metrics) -> * mut aws_s3_request_metrics ; } unsafe extern "C" { # [doc = " Release a reference.\n When the reference count drops to 0, this object will be cleaned up.\n It's OK to pass in NULL (nothing happens).\n Always returns NULL."] pub fn aws_s3_request_metrics_release (metrics : * mut aws_s3_request_metrics) -> * mut aws_s3_request_metrics ; } unsafe extern "C" { # [doc = "  Getters for s3 request metrics ************************************************/\n/**\n Get the request ID from aws_s3_request_metrics.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_request_id will be set to a string. Be warned this string's lifetime is tied to the metrics\n object."] pub fn aws_s3_request_metrics_get_request_id (metrics : * const aws_s3_request_metrics , out_request_id : * mut * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the extended request ID from aws_s3_request_metrics.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_extended_request_id will be set to a string. Be warned this string's lifetime is tied to the\n metrics object."] pub fn aws_s3_request_metrics_get_extended_request_id (metrics : * const aws_s3_request_metrics , out_extended_request_id : * mut * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_start_time : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_end_time : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_total_duration_ns (metrics : * const aws_s3_request_metrics , out_total_duration : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_send_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_send_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_send_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_send_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_sending_duration_ns (metrics : * const aws_s3_request_metrics , out_sending_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_receive_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_receive_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_receive_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_receive_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_sign_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_signing_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_sign_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_signing_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_signing_duration_ns (metrics : * const aws_s3_request_metrics , out_signing_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_mem_acquire_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_mem_acquire_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_mem_acquire_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_mem_acquire_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_mem_acquire_duration_ns (metrics : * const aws_s3_request_metrics , out_mem_acquire_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_delivery_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_delivery_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_delivery_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_delivery_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_delivery_duration_ns (metrics : * const aws_s3_request_metrics , out_delivery_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_receiving_duration_ns (metrics : * const aws_s3_request_metrics , out_receiving_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_response_status_code (metrics : * const aws_s3_request_metrics , out_response_status : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_response_headers (metrics : * const aws_s3_request_metrics , out_response_headers : * mut * mut aws_http_headers) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the path and query of the request.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_request_path_query will be set to a string. Be warned this string's lifetime is tied to the metrics\n object."] pub fn aws_s3_request_metrics_get_request_path_query (metrics : * const aws_s3_request_metrics , out_request_path_query : * mut * const aws_string) ; } unsafe extern "C" { # [doc = " Get the host_address of the request.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_host_address will be set to a string. Be warned this string's lifetime is tied to the metrics\n object."] pub fn aws_s3_request_metrics_get_host_address (metrics : * const aws_s3_request_metrics , out_host_address : * mut * const aws_string) ; } unsafe extern "C" { # [doc = " Get the IP address of the request connected to.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_ip_address will be set to a string. Be warned this string's lifetime is tied to the metrics object."] pub fn aws_s3_request_metrics_get_ip_address (metrics : * const aws_s3_request_metrics , out_ip_address : * mut * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_connection_id (metrics : * const aws_s3_request_metrics , out_connection_ptr : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_request_ptr (metrics : * const aws_s3_request_metrics , out_request_ptr : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_thread_id (metrics : * const aws_s3_request_metrics , out_thread_id : * mut aws_thread_id_t) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_request_stream_id (metrics : * const aws_s3_request_metrics , out_stream_id : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the S3 operation name of the request (e.g. \"HeadObject\").\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_operation_name will be set to a string.\n Be warned this string's lifetime is tied to the metrics object."] pub fn aws_s3_request_metrics_get_operation_name (metrics : * const aws_s3_request_metrics , out_operation_name : * mut * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_request_type (metrics : * const aws_s3_request_metrics , out_request_type : * mut aws_s3_request_type) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_error_code (metrics : * const aws_s3_request_metrics) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_retry_attempt (metrics : * const aws_s3_request_metrics) -> u32 ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_memory_allocated_from_pool (metrics : * const aws_s3_request_metrics) -> bool ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_part_range_start (metrics : * const aws_s3_request_metrics , out_part_range_start : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_part_range_end (metrics : * const aws_s3_request_metrics , out_part_range_end : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_part_number (metrics : * const aws_s3_request_metrics , out_part_number : * mut u32) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_s3_request_first_attempt_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_s3_request_first_attempt_start_time : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_s3_request_last_attempt_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_s3_request_last_attempt_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_s3_request_total_duration_ns (metrics : * const aws_s3_request_metrics , out_request_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_conn_acquire_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_conn_acquire_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_conn_acquire_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_conn_acquire_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_conn_acquire_duration_ns (metrics : * const aws_s3_request_metrics , out_conn_acquire_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_retry_delay_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_retry_delay_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_retry_delay_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_retry_delay_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_retry_delay_duration_ns (metrics : * const aws_s3_request_metrics , out_retry_delay_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_service_call_duration_ns (metrics : * const aws_s3_request_metrics , out_service_call_duration : * mut u64) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_request_context { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_rule_engine { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " Creates a new S3 endpoint resolver.\n Warning: Before using this header, you have to enable it by\n setting cmake config AWS_ENABLE_S3_ENDPOINT_RESOLVER=ON"] pub fn aws_s3_endpoint_resolver_new (allocator : * mut aws_allocator) -> * mut aws_endpoints_rule_engine ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_ruleset { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_partitions_config { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_parameter { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_resolved_endpoint { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_endpoints_parameter_type { AWS_ENDPOINTS_PARAMETER_STRING = 0 , AWS_ENDPOINTS_PARAMETER_BOOLEAN = 1 , AWS_ENDPOINTS_PARAMETER_STRING_ARRAY = 2 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_endpoints_resolved_endpoint_type { AWS_ENDPOINTS_RESOLVED_ENDPOINT = 0 , AWS_ENDPOINTS_RESOLVED_ERROR = 1 , } unsafe extern "C" { pub fn aws_endpoints_get_supported_ruleset_version () -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Warning: The following helpers are intended for use by SDKs that validate correctness of the ruleset at compile time.\n The engine sanity checks the provided ruleset, but does not do extensive checking.\n Some malformed rulesets might fail in unexpected ways."] pub fn aws_endpoints_parameter_get_type (parameter : * const aws_endpoints_parameter) -> aws_endpoints_parameter_type ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_built_in (parameter : * const aws_endpoints_parameter) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_default_string (parameter : * const aws_endpoints_parameter , out_cursor : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_default_boolean (parameter : * const aws_endpoints_parameter , out_bool : * mut * const bool) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_is_required (parameter : * const aws_endpoints_parameter) -> bool ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_documentation (parameter : * const aws_endpoints_parameter) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_parameters_get_is_deprecated (parameter : * const aws_endpoints_parameter) -> bool ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_deprecated_message (parameter : * const aws_endpoints_parameter) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_deprecated_since (parameter : * const aws_endpoints_parameter) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_new_from_string (allocator : * mut aws_allocator , ruleset_json : aws_byte_cursor) -> * mut aws_endpoints_ruleset ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_acquire (ruleset : * mut aws_endpoints_ruleset) -> * mut aws_endpoints_ruleset ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_release (ruleset : * mut aws_endpoints_ruleset) -> * mut aws_endpoints_ruleset ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_get_parameters (ruleset : * mut aws_endpoints_ruleset) -> * const aws_hash_table ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_get_version (ruleset : * const aws_endpoints_ruleset) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_get_service_id (ruleset : * const aws_endpoints_ruleset) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Create new rule engine for a given ruleset.\n In cases of failure NULL is returned and last error is set."] pub fn aws_endpoints_rule_engine_new (allocator : * mut aws_allocator , ruleset : * mut aws_endpoints_ruleset , partitions_config : * mut aws_partitions_config) -> * mut aws_endpoints_rule_engine ; } unsafe extern "C" { pub fn aws_endpoints_rule_engine_acquire (rule_engine : * mut aws_endpoints_rule_engine) -> * mut aws_endpoints_rule_engine ; } unsafe extern "C" { pub fn aws_endpoints_rule_engine_release (rule_engine : * mut aws_endpoints_rule_engine) -> * mut aws_endpoints_rule_engine ; } unsafe extern "C" { pub fn aws_endpoints_request_context_new (allocator : * mut aws_allocator) -> * mut aws_endpoints_request_context ; } unsafe extern "C" { pub fn aws_endpoints_request_context_acquire (request_context : * mut aws_endpoints_request_context) -> * mut aws_endpoints_request_context ; } unsafe extern "C" { pub fn aws_endpoints_request_context_release (request_context : * mut aws_endpoints_request_context) -> * mut aws_endpoints_request_context ; } unsafe extern "C" { pub fn aws_endpoints_request_context_add_string (allocator : * mut aws_allocator , context : * mut aws_endpoints_request_context , name : aws_byte_cursor , value : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_request_context_add_boolean (allocator : * mut aws_allocator , context : * mut aws_endpoints_request_context , name : aws_byte_cursor , value : bool) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_request_context_add_string_array (allocator : * mut aws_allocator , context : * mut aws_endpoints_request_context , name : aws_byte_cursor , value_array : * const aws_byte_cursor , len : usize) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_rule_engine_resolve (engine : * mut aws_endpoints_rule_engine , context : * const aws_endpoints_request_context , out_resolved_endpoint : * mut * mut aws_endpoints_resolved_endpoint) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_acquire (resolved_endpoint : * mut aws_endpoints_resolved_endpoint) -> * mut aws_endpoints_resolved_endpoint ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_release (resolved_endpoint : * mut aws_endpoints_resolved_endpoint) -> * mut aws_endpoints_resolved_endpoint ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_type (resolved_endpoint : * const aws_endpoints_resolved_endpoint) -> aws_endpoints_resolved_endpoint_type ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_url (resolved_endpoint : * const aws_endpoints_resolved_endpoint , out_url : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_properties (resolved_endpoint : * const aws_endpoints_resolved_endpoint , out_properties : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_headers (resolved_endpoint : * const aws_endpoints_resolved_endpoint , out_headers : * mut * const aws_hash_table) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_error (resolved_endpoint : * const aws_endpoints_resolved_endpoint , out_error : * mut aws_byte_cursor) -> :: libc :: c_int ; } pub const AWS_COMMON_HASH_TABLE_ITER_CONTINUE : _bindgen_ty_23 = _bindgen_ty_23 :: AWS_COMMON_HASH_TABLE_ITER_CONTINUE ; pub const AWS_COMMON_HASH_TABLE_ITER_DELETE : _bindgen_ty_23 = _bindgen_ty_23 :: AWS_COMMON_HASH_TABLE_ITER_DELETE ; pub const AWS_COMMON_HASH_TABLE_ITER_ERROR : _bindgen_ty_23 = _bindgen_ty_23 :: AWS_COMMON_HASH_TABLE_ITER_ERROR ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_23 { AWS_COMMON_HASH_TABLE_ITER_CONTINUE = 1 , AWS_COMMON_HASH_TABLE_ITER_DELETE = 2 , AWS_COMMON_HASH_TABLE_ITER_ERROR = 4 , } # [doc = " Hash table data structure. This module provides an automatically resizing\n hash table implementation for general purpose use. The hash table stores a\n mapping between void * keys and values; it is expected that in most cases,\n these will point to a structure elsewhere in the heap, instead of inlining a\n key or value into the hash table element itself.\n\n Currently, this hash table implements a variant of robin hood hashing, but\n we do not guarantee that this won't change in the future.\n\n Associated with each hash function are four callbacks:\n\n   hash_fn - A hash function from the keys to a uint64_t. It is critical that\n      the hash function for a key does not change while the key is in the hash\n      table; violating this results in undefined behavior. Collisions are\n      tolerated, though naturally with reduced performance.\n\n   equals_fn - An equality comparison function. This function must be\n      reflexive and consistent with hash_fn.\n\n   destroy_key_fn, destroy_value_fn - Optional callbacks invoked when the\n      table is cleared or cleaned up and at the caller's option when an element\n      is removed from the table. Either or both may be set to NULL, which\n      has the same effect as a no-op destroy function.\n\n This datastructure can be safely moved between threads, subject to the\n requirements of the underlying allocator. It is also safe to invoke\n non-mutating operations on the hash table from multiple threads. A suitable\n memory barrier must be used when transitioning from single-threaded mutating\n usage to multithreaded usage."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct hash_table_state { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_hash_table { pub p_impl : * mut hash_table_state , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash_table"] [:: std :: mem :: size_of :: < aws_hash_table > () - 8usize] ; ["Alignment of aws_hash_table"] [:: std :: mem :: align_of :: < aws_hash_table > () - 8usize] ; ["Offset of field: aws_hash_table::p_impl"] [:: std :: mem :: offset_of ! (aws_hash_table , p_impl) - 0usize] ; } ; 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\n table may provide pointers to elements stored within the hash table;\n generally, calling code may alter value, but must not alter key (or any\n information used to compute key's hash code).\n\n Pointers to elements within the hash are invalidated whenever an operation\n which may change the number of elements in the hash is invoked (i.e. put,\n delete, clear, and clean_up), regardless of whether the number of elements\n actually changes."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_hash_element { pub key : * const :: libc :: c_void , pub value : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash_element"] [:: std :: mem :: size_of :: < aws_hash_element > () - 16usize] ; ["Alignment of aws_hash_element"] [:: std :: mem :: align_of :: < aws_hash_element > () - 8usize] ; ["Offset of field: aws_hash_element::key"] [:: std :: mem :: offset_of ! (aws_hash_element , key) - 0usize] ; ["Offset of field: aws_hash_element::value"] [:: std :: mem :: offset_of ! (aws_hash_element , value) - 8usize] ; } ; 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 () } } } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_hash_iter_status { AWS_HASH_ITER_STATUS_DONE = 0 , AWS_HASH_ITER_STATUS_DELETE_CALLED = 1 , AWS_HASH_ITER_STATUS_READY_FOR_USE = 2 , } # [repr (C)] # [derive (Debug , Copy , Clone)] 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 : :: libc :: c_int , pub unused_1 : * mut :: libc :: c_void , pub unused_2 : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash_iter"] [:: std :: mem :: size_of :: < aws_hash_iter > () - 64usize] ; ["Alignment of aws_hash_iter"] [:: std :: mem :: align_of :: < aws_hash_iter > () - 8usize] ; ["Offset of field: aws_hash_iter::map"] [:: std :: mem :: offset_of ! (aws_hash_iter , map) - 0usize] ; ["Offset of field: aws_hash_iter::element"] [:: std :: mem :: offset_of ! (aws_hash_iter , element) - 8usize] ; ["Offset of field: aws_hash_iter::slot"] [:: std :: mem :: offset_of ! (aws_hash_iter , slot) - 24usize] ; ["Offset of field: aws_hash_iter::limit"] [:: std :: mem :: offset_of ! (aws_hash_iter , limit) - 32usize] ; ["Offset of field: aws_hash_iter::status"] [:: std :: mem :: offset_of ! (aws_hash_iter , status) - 40usize] ; ["Offset of field: aws_hash_iter::unused_0"] [:: std :: mem :: offset_of ! (aws_hash_iter , unused_0) - 44usize] ; ["Offset of field: aws_hash_iter::unused_1"] [:: std :: mem :: offset_of ! (aws_hash_iter , unused_1) - 48usize] ; ["Offset of field: aws_hash_iter::unused_2"] [:: std :: mem :: offset_of ! (aws_hash_iter , unused_2) - 56usize] ; } ; 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 :: libc :: c_void) -> u64 > ; # [doc = " Prototype for a hash table equality check function pointer.\n\n This type is usually used for a function that compares two hash table\n keys, but note that the same type is used for a function that compares\n two hash table values in aws_hash_table_eq.\n\n Equality functions used in a hash table must be be reflexive (a == a),\n symmetric (a == b => b == a), transitive (a == b, b == c => a == c)\n and consistent (result does not change with time)."] pub type aws_hash_callback_eq_fn = :: std :: option :: Option < unsafe extern "C" fn (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool > ; # [doc = " Prototype for a hash table key or value destructor function pointer.\n\n This function is used to destroy elements in the hash table when the\n table is cleared or cleaned up.\n\n Note that functions which remove individual elements from the hash\n table provide options of whether or not to invoke the destructors\n 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 :: libc :: c_void) > ; unsafe extern "C" { # [doc = " Initializes a hash map with initial capacity for 'size' elements\n without resizing. Uses hash_fn to compute the hash of each element.\n equals_fn to compute equality of two keys.  Whenever an element is\n removed without being returned, destroy_key_fn is run on the pointer\n to the key and destroy_value_fn is run on the pointer to the value.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Deletes every element from map and frees all associated memory.\n destroy_fn will be called for each element.  aws_hash_table_init\n must be called before reusing the hash table.\n\n This method is idempotent."] pub fn aws_hash_table_clean_up (map : * mut aws_hash_table) ; } unsafe extern "C" { # [doc = " Safely swaps two hash tables. Note that we swap the entirety of the hash\n table, including which allocator is associated.\n\n Neither hash table is required to be initialized; if one or both is\n uninitialized, then the uninitialized state is also swapped."] pub fn aws_hash_table_swap (a : * mut aws_hash_table , b : * mut aws_hash_table) ; } unsafe extern "C" { # [doc = " Moves the hash table in 'from' to 'to'. After this move, 'from' will\n be identical to the state of the original 'to' hash table, and 'to'\n will be in the same state as if it had been passed to aws_hash_table_clean_up\n (that is, it will have no memory allocated, and it will be safe to\n either discard it or call aws_hash_table_clean_up again).\n\n Note that 'to' will not be cleaned up. You should make sure that 'to'\n is either uninitialized or cleaned up before moving a hashtable into\n it."] pub fn aws_hash_table_move (to : * mut aws_hash_table , from : * mut aws_hash_table) ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Returns an iterator to be used for iterating through a hash table.\n Iterator will already point to the first element of the table it finds,\n which can be accessed as iter.element.\n\n This function cannot fail, but if there are no elements in the table,\n 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 ; } unsafe extern "C" { # [doc = " Returns true if iterator is done iterating through table, false otherwise.\n 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 ; } unsafe extern "C" { # [doc = " Updates iterator so that it points to next element of hash table.\n\n This and the two previous functions are designed to be used together with\n the following idiom:\n\n for (struct aws_hash_iter iter = aws_hash_iter_begin(&map);\n      !aws_hash_iter_done(&iter); aws_hash_iter_next(&iter)) {\n     const key_type key = *(const key_type *)iter.element.key;\n     value_type value = *(value_type *)iter.element.value;\n     // etc.\n }\n\n Note that calling this on an iter which is \"done\" is idempotent:\n i.e. it will return another iter which is \"done\"."] pub fn aws_hash_iter_next (iter : * mut aws_hash_iter) ; } unsafe extern "C" { # [doc = " Deletes the element currently pointed-to by the hash iterator.\n After calling this method, the element member of the iterator\n should not be accessed until the next call to aws_hash_iter_next.\n\n @param destroy_contents If true, the destructors for the key and value\n  will be called."] pub fn aws_hash_iter_delete (iter : * mut aws_hash_iter , destroy_contents : bool) ; } unsafe extern "C" { # [doc = " Attempts to locate an element at key.  If the element is found, a\n pointer to the value is placed in *p_elem; if it is not found,\n *pElem is set to NULL. Either way, AWS_OP_SUCCESS is returned.\n\n This method does not change the state of the hash table. Therefore, it\n is safe to call _find from multiple threads on the same hash table,\n provided no mutating operations happen in parallel.\n\n Calling code may update the value in the hash table by modifying **pElem\n after a successful find. However, this pointer is not guaranteed to\n remain usable after a subsequent call to _put, _delete, _clear, or\n _clean_up."] pub fn aws_hash_table_find (map : * const aws_hash_table , key : * const :: libc :: c_void , p_elem : * mut * mut aws_hash_element) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Attempts to locate an element at key. If no such element was found,\n creates a new element, with value initialized to NULL. In either case, a\n pointer to the element is placed in *p_elem.\n\n If was_created is non-NULL, *was_created is set to 0 if an existing\n element was found, or 1 is a new element was created.\n\n Returns AWS_OP_SUCCESS if an item was found or created.\n Raises AWS_ERROR_OOM if hash table expansion was required and memory\n allocation failed."] pub fn aws_hash_table_create (map : * mut aws_hash_table , key : * const :: libc :: c_void , p_elem : * mut * mut aws_hash_element , was_created : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Inserts a new element at key, with the given value. If another element\n exists at that key, the old element will be overwritten; both old key and\n value objects will be destroyed.\n\n If was_created is non-NULL, *was_created is set to 0 if an existing\n element was found, or 1 is a new element was created.\n\n Returns AWS_OP_SUCCESS if an item was found or created.\n Raises AWS_ERROR_OOM if hash table expansion was required and memory\n allocation failed."] pub fn aws_hash_table_put (map : * mut aws_hash_table , key : * const :: libc :: c_void , value : * mut :: libc :: c_void , was_created : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes element at key. Always returns AWS_OP_SUCCESS.\n\n If pValue is non-NULL, the existing value (if any) is moved into\n (*value) before removing from the table, and destroy_fn is _not_\n invoked. If pValue is NULL, then (if the element existed) destroy_fn\n will be invoked on the element being removed.\n\n If was_present is non-NULL, it is set to 0 if the element was\n 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 :: libc :: c_void , p_value : * mut aws_hash_element , was_present : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes element already known (typically by find()).\n\n p_value should point to a valid element returned by create() or find().\n\n NOTE: DO NOT call this method from inside of a aws_hash_table_foreach callback, return\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Iterates through every element in the map and invokes the callback on\n that item. Iteration is performed in an arbitrary, implementation-defined\n order, and is not guaranteed to be consistent across invocations.\n\n The callback may change the value associated with the key by overwriting\n the value pointed-to by value. In this case, the on_element_removed\n callback will not be invoked, unless the callback invokes\n AWS_COMMON_HASH_TABLE_ITER_DELETE (in which case the on_element_removed\n is given the updated value).\n\n The callback must return a bitmask of zero or more of the following values\n ORed together:\n\n # AWS_COMMON_HASH_TABLE_ITER_CONTINUE - Continues iteration to the next\n     element (if not set, iteration stops)\n # AWS_COMMON_HASH_TABLE_ITER_DELETE   - Deletes the current value and\n     continues iteration.  destroy_fn will NOT be invoked.\n # AWS_COMMON_HASH_TABLE_ITER_ERROR   - Stop iteration with error.\n     No action will be taken for the current value and the value before this.\n     No rolling back. The deleted value before will NOT be back.\n     aws_hash_table_foreach returns AWS_OP_ERR after stropping the iteration.\n\n Invoking any method which may change the contents of the hashtable\n during iteration results in undefined behavior. However, you may safely\n invoke non-mutating operations during an iteration.\n\n This operation is mutating only if AWS_COMMON_HASH_TABLE_ITER_DELETE\n is returned at some point during iteration. Otherwise, it is non-mutating\n 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 :: libc :: c_void , p_element : * mut aws_hash_element) -> :: libc :: c_int > , context : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Compares two hash tables for equality. Both hash tables must have equivalent\n key comparators; values will be compared using the comparator passed into this\n function. The key hash function does not need to be equivalent between the\n 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 ; } unsafe extern "C" { # [doc = " Removes every element from the hash map. destroy_fn will be called for\n each element."] pub fn aws_hash_table_clear (map : * mut aws_hash_table) ; } unsafe extern "C" { # [doc = " Convenience hash function for NULL-terminated C-strings"] pub fn aws_hash_c_string (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Convenience hash function for struct aws_strings.\n Hash is same as used on the string bytes by aws_hash_c_string."] pub fn aws_hash_string (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Convenience hash function for struct aws_byte_cursor.\n Hash is same as used on the string bytes by aws_hash_c_string."] pub fn aws_hash_byte_cursor_ptr (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Convenience hash function which hashes the pointer value directly,\n without dereferencing.  This can be used in cases where pointer identity\n is desired, or where a uintptr_t is encoded into a const void *."] pub fn aws_hash_ptr (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { pub fn aws_hash_combine (item1 : u64 , item2 : u64) -> u64 ; } unsafe extern "C" { # [doc = " Convenience eq callback for NULL-terminated C-strings"] pub fn aws_hash_callback_c_str_eq (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " Convenience eq callback for AWS strings"] pub fn aws_hash_callback_string_eq (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " Convenience destroy callback for AWS strings"] pub fn aws_hash_callback_string_destroy (a : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Equality function which compares pointer equality."] pub fn aws_ptr_eq (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Helper function to hash keys that are uint64_t values.\n\n The function is not a strong hash function in any sense; it merely reflects\n the uint64 value back.  Do not use this function as a hash if you need\n the properties of a strong hash function."] pub fn aws_hash_uint64_t_by_identity (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Helper function to compare hash keys that are uint64_t values."] pub fn aws_hash_compare_uint64_t_eq (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool ; } # [repr (C)] pub struct aws_mutex { pub mutex_handle : pthread_mutex_t , pub initialized : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_mutex"] [:: std :: mem :: size_of :: < aws_mutex > () - 48usize] ; ["Alignment of aws_mutex"] [:: std :: mem :: align_of :: < aws_mutex > () - 8usize] ; ["Offset of field: aws_mutex::mutex_handle"] [:: std :: mem :: offset_of ! (aws_mutex , mutex_handle) - 0usize] ; ["Offset of field: aws_mutex::initialized"] [:: std :: mem :: offset_of ! (aws_mutex , initialized) - 40usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Initializes a new platform instance of mutex."] pub fn aws_mutex_init (mutex : * mut aws_mutex) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Cleans up internal resources."] pub fn aws_mutex_clean_up (mutex : * mut aws_mutex) ; } unsafe extern "C" { # [doc = " Blocks until it acquires the lock. While on some platforms such as Windows,\n this may behave as a reentrant mutex, you should not treat it like one. On\n platforms it is possible for it to be non-reentrant, it will be."] pub fn aws_mutex_lock (mutex : * mut aws_mutex) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Attempts to acquire the lock but returns immediately if it can not.\n While on some platforms such as Windows, this may behave as a reentrant mutex,\n you should not treat it like one. On platforms it is possible for it to be non-reentrant, it will be.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Releases the lock."] pub fn aws_mutex_unlock (mutex : * mut aws_mutex) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_connection_finish_code { AWS_S3_CONNECTION_FINISH_CODE_SUCCESS = 0 , AWS_S3_CONNECTION_FINISH_CODE_FAILED = 1 , AWS_S3_CONNECTION_FINISH_CODE_RETRY = 2 , } pub type aws_s3_endpoint_shutdown_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_endpoint_options { pub host_name : * mut aws_string , pub shutdown_callback : aws_s3_endpoint_shutdown_fn , pub client_bootstrap : * mut aws_client_bootstrap , pub tls_connection_options : * const aws_tls_connection_options , pub dns_host_address_ttl_seconds : usize , pub client : * mut aws_s3_client , pub max_connections : u32 , pub port : u32 , # [doc = " Optional.\n Proxy configuration for http connection."] pub proxy_config : * mut aws_http_proxy_config , # [doc = " Optional.\n Configuration for fetching proxy configuration from environment.\n By Default proxy_ev_settings.aws_http_proxy_env_var_type is set to AWS_HPEV_ENABLE which means read proxy\n configuration from environment.\n Only works when proxy_config is not set. If both are set, configuration from proxy_config is used."] pub proxy_ev_settings : * mut proxy_env_var_settings , # [doc = " Optional.\n If set to 0, default value is used."] pub connect_timeout_ms : u32 , # [doc = " Optional.\n Set keepalive to periodically transmit messages for detecting a disconnected peer."] pub tcp_keep_alive_options : * mut aws_s3_tcp_keep_alive_options , # [doc = " Optional.\n Configuration options for connection monitoring.\n If the transfer speed falls below the specified minimum_throughput_bytes_per_second, the operation is aborted."] pub monitoring_options : * mut aws_http_connection_monitoring_options , pub network_interface_names_array : * const aws_byte_cursor , pub num_network_interface_names : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_endpoint_options"] [:: std :: mem :: size_of :: < aws_s3_endpoint_options > () - 112usize] ; ["Alignment of aws_s3_endpoint_options"] [:: std :: mem :: align_of :: < aws_s3_endpoint_options > () - 8usize] ; ["Offset of field: aws_s3_endpoint_options::host_name"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , host_name) - 0usize] ; ["Offset of field: aws_s3_endpoint_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , shutdown_callback) - 8usize] ; ["Offset of field: aws_s3_endpoint_options::client_bootstrap"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , client_bootstrap) - 16usize] ; ["Offset of field: aws_s3_endpoint_options::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , tls_connection_options) - 24usize] ; ["Offset of field: aws_s3_endpoint_options::dns_host_address_ttl_seconds"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , dns_host_address_ttl_seconds) - 32usize] ; ["Offset of field: aws_s3_endpoint_options::client"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , client) - 40usize] ; ["Offset of field: aws_s3_endpoint_options::max_connections"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , max_connections) - 48usize] ; ["Offset of field: aws_s3_endpoint_options::port"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , port) - 52usize] ; ["Offset of field: aws_s3_endpoint_options::proxy_config"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , proxy_config) - 56usize] ; ["Offset of field: aws_s3_endpoint_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , proxy_ev_settings) - 64usize] ; ["Offset of field: aws_s3_endpoint_options::connect_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , connect_timeout_ms) - 72usize] ; ["Offset of field: aws_s3_endpoint_options::tcp_keep_alive_options"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , tcp_keep_alive_options) - 80usize] ; ["Offset of field: aws_s3_endpoint_options::monitoring_options"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , monitoring_options) - 88usize] ; ["Offset of field: aws_s3_endpoint_options::network_interface_names_array"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , network_interface_names_array) - 96usize] ; ["Offset of field: aws_s3_endpoint_options::num_network_interface_names"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , num_network_interface_names) - 104usize] ; } ; impl Default for aws_s3_endpoint_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 , Default , Copy , Clone)] pub struct aws_s3_endpoint_system_vtable { pub acquire : :: std :: option :: Option < unsafe extern "C" fn (endpoint : * mut aws_s3_endpoint , already_holding_lock : bool) > , pub release : :: std :: option :: Option < unsafe extern "C" fn (endpoint : * mut aws_s3_endpoint) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_endpoint_system_vtable"] [:: std :: mem :: size_of :: < aws_s3_endpoint_system_vtable > () - 16usize] ; ["Alignment of aws_s3_endpoint_system_vtable"] [:: std :: mem :: align_of :: < aws_s3_endpoint_system_vtable > () - 8usize] ; ["Offset of field: aws_s3_endpoint_system_vtable::acquire"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_system_vtable , acquire) - 0usize] ; ["Offset of field: aws_s3_endpoint_system_vtable::release"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_system_vtable , release) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_endpoint { pub client_synced_data : aws_s3_endpoint__bindgen_ty_1 , pub allocator : * mut aws_allocator , pub host_name : * mut aws_string , pub http_connection_manager : * mut aws_http_connection_manager , pub client : * mut aws_s3_client , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_endpoint__bindgen_ty_1 { pub ref_count : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_endpoint__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_endpoint__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_s3_endpoint__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_endpoint__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_endpoint__bindgen_ty_1::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_endpoint__bindgen_ty_1 , ref_count) - 0usize] ; } ; # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_endpoint"] [:: std :: mem :: size_of :: < aws_s3_endpoint > () - 40usize] ; ["Alignment of aws_s3_endpoint"] [:: std :: mem :: align_of :: < aws_s3_endpoint > () - 8usize] ; ["Offset of field: aws_s3_endpoint::client_synced_data"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , client_synced_data) - 0usize] ; ["Offset of field: aws_s3_endpoint::allocator"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , allocator) - 8usize] ; ["Offset of field: aws_s3_endpoint::host_name"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , host_name) - 16usize] ; ["Offset of field: aws_s3_endpoint::http_connection_manager"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , http_connection_manager) - 24usize] ; ["Offset of field: aws_s3_endpoint::client"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , client) - 32usize] ; } ; impl Default for aws_s3_endpoint { 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)] pub struct aws_s3_connection { pub endpoint : * mut aws_s3_endpoint , pub http_connection : * mut aws_http_connection , pub request : * mut aws_s3_request , pub retry_token : * mut aws_retry_token , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_connection"] [:: std :: mem :: size_of :: < aws_s3_connection > () - 32usize] ; ["Alignment of aws_s3_connection"] [:: std :: mem :: align_of :: < aws_s3_connection > () - 8usize] ; ["Offset of field: aws_s3_connection::endpoint"] [:: std :: mem :: offset_of ! (aws_s3_connection , endpoint) - 0usize] ; ["Offset of field: aws_s3_connection::http_connection"] [:: std :: mem :: offset_of ! (aws_s3_connection , http_connection) - 8usize] ; ["Offset of field: aws_s3_connection::request"] [:: std :: mem :: offset_of ! (aws_s3_connection , request) - 16usize] ; ["Offset of field: aws_s3_connection::retry_token"] [:: std :: mem :: offset_of ! (aws_s3_connection , retry_token) - 24usize] ; } ; impl Default for aws_s3_connection { 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)] pub struct aws_s3_client_vtable { pub meta_request_factory : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client , options : * const aws_s3_meta_request_options) -> * mut aws_s3_meta_request > , pub create_connection_for_request : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client , request : * mut aws_s3_request) > , pub acquire_http_connection : :: std :: option :: Option < unsafe extern "C" fn (conn_manager : * mut aws_http_connection_manager , on_connection_acquired_callback : aws_http_connection_manager_on_connection_setup_fn , user_data : * mut :: libc :: c_void) > , pub get_host_address_count : :: std :: option :: Option < unsafe extern "C" fn (host_resolver : * mut aws_host_resolver , host_name : * const aws_string , flags : u32) -> usize > , pub schedule_process_work_synced : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client) > , pub process_work : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client) > , pub endpoint_shutdown_callback : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client) > , pub finish_destroy : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client) > , pub parallel_input_stream_new_from_file : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , file_name : aws_byte_cursor , reading_elg : * mut aws_event_loop_group , direct_io_read : bool) -> * mut aws_parallel_input_stream > , pub http_connection_make_request : :: std :: option :: Option < unsafe extern "C" fn (client_connection : * mut aws_http_connection , options : * const aws_http_make_request_options) -> * mut aws_http_stream > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client_vtable"] [:: std :: mem :: size_of :: < aws_s3_client_vtable > () - 80usize] ; ["Alignment of aws_s3_client_vtable"] [:: std :: mem :: align_of :: < aws_s3_client_vtable > () - 8usize] ; ["Offset of field: aws_s3_client_vtable::meta_request_factory"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , meta_request_factory) - 0usize] ; ["Offset of field: aws_s3_client_vtable::create_connection_for_request"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , create_connection_for_request) - 8usize] ; ["Offset of field: aws_s3_client_vtable::acquire_http_connection"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , acquire_http_connection) - 16usize] ; ["Offset of field: aws_s3_client_vtable::get_host_address_count"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , get_host_address_count) - 24usize] ; ["Offset of field: aws_s3_client_vtable::schedule_process_work_synced"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , schedule_process_work_synced) - 32usize] ; ["Offset of field: aws_s3_client_vtable::process_work"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , process_work) - 40usize] ; ["Offset of field: aws_s3_client_vtable::endpoint_shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , endpoint_shutdown_callback) - 48usize] ; ["Offset of field: aws_s3_client_vtable::finish_destroy"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , finish_destroy) - 56usize] ; ["Offset of field: aws_s3_client_vtable::parallel_input_stream_new_from_file"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , parallel_input_stream_new_from_file) - 64usize] ; ["Offset of field: aws_s3_client_vtable::http_connection_make_request"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , http_connection_make_request) - 72usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_part_timeout_stats { pub stop_timeout : bool , pub num_successful_upload_requests : u64 , pub initial_request_time : aws_s3_upload_part_timeout_stats__bindgen_ty_1 , pub timeout_rate_tracking : aws_s3_upload_part_timeout_stats__bindgen_ty_2 , pub response_to_first_byte_time : aws_s3_upload_part_timeout_stats__bindgen_ty_3 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_part_timeout_stats__bindgen_ty_1 { pub sum_ns : u64 , pub num_samples : u64 , pub collecting_p90 : bool , pub p90_samples : aws_priority_queue , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_timeout_stats__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_1 > () - 112usize] ; ["Alignment of aws_s3_upload_part_timeout_stats__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_1::sum_ns"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_1 , sum_ns) - 0usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_1::num_samples"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_1 , num_samples) - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_1::collecting_p90"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_1 , collecting_p90) - 16usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_1::p90_samples"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_1 , p90_samples) - 24usize] ; } ; impl Default for aws_s3_upload_part_timeout_stats__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 () } } } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_upload_part_timeout_stats__bindgen_ty_2 { pub num_completed : u64 , pub num_failed : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_timeout_stats__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_2 > () - 16usize] ; ["Alignment of aws_s3_upload_part_timeout_stats__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_2::num_completed"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_2 , num_completed) - 0usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_2::num_failed"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_2 , num_failed) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_upload_part_timeout_stats__bindgen_ty_3 { pub sum_ns : u64 , pub num_samples : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_timeout_stats__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_3 > () - 16usize] ; ["Alignment of aws_s3_upload_part_timeout_stats__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_3::sum_ns"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_3 , sum_ns) - 0usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_3::num_samples"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_3 , num_samples) - 8usize] ; } ; # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_timeout_stats"] [:: std :: mem :: size_of :: < aws_s3_upload_part_timeout_stats > () - 160usize] ; ["Alignment of aws_s3_upload_part_timeout_stats"] [:: std :: mem :: align_of :: < aws_s3_upload_part_timeout_stats > () - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::stop_timeout"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , stop_timeout) - 0usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::num_successful_upload_requests"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , num_successful_upload_requests) - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::initial_request_time"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , initial_request_time) - 16usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::timeout_rate_tracking"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , timeout_rate_tracking) - 128usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::response_to_first_byte_time"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , response_to_first_byte_time) - 144usize] ; } ; impl Default for aws_s3_upload_part_timeout_stats { 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)] pub struct aws_s3_client { pub allocator : * mut aws_allocator , pub buffer_pool : * mut aws_s3_buffer_pool , pub vtable : * mut aws_s3_client_vtable , pub ref_count : aws_ref_count , pub client_bootstrap : * mut aws_client_bootstrap , pub process_work_event_loop : * mut aws_event_loop , pub body_streaming_elg : * mut aws_event_loop_group , pub region : * mut aws_string , pub part_size : usize , pub part_size_set : bool , pub max_part_size : u64 , pub optimal_range_size : u64 , pub fio_options_set : bool , pub fio_opts : aws_s3_file_io_options , pub multipart_upload_threshold : u64 , pub tls_connection_options : * mut aws_tls_connection_options , pub cached_signing_config : * mut aws_cached_signing_config_aws , pub s3express_provider_factory : aws_s3express_provider_factory_fn , pub factory_user_data : * mut :: libc :: c_void , pub s3express_provider : * mut aws_s3express_credentials_provider , pub throughput_target_gbps : f64 , pub ideal_connection_count : u32 , # [doc = " For multi-part upload, content-md5 will be calculated if the AWS_MR_CONTENT_MD5_ENABLED is specified\n     or initial request has content-md5 header.\n For single-part upload, if the content-md5 header is specified, it will remain unchanged. If the header is not\n     specified, and this is set to AWS_MR_CONTENT_MD5_ENABLED, it will be calculated."] pub compute_content_md5 : aws_s3_meta_request_compute_content_md5 , pub max_active_connections_override : u32 , pub max_allowed_connections : aws_atomic_var , pub retry_strategy : * mut aws_retry_strategy , # [doc = " Optional.\n Proxy configuration for http connection."] pub proxy_config : * mut aws_http_proxy_config , # [doc = " Optional.\n Configuration for fetching proxy configuration from environment.\n By Default proxy_ev_settings.aws_http_proxy_env_var_type is set to AWS_HPEV_ENABLE which means read proxy\n configuration from environment.\n Only works when proxy_config is not set. If both are set, configuration from proxy_config is used."] pub proxy_ev_settings : * mut proxy_env_var_settings , # [doc = " Optional.\n If set to 0, default value is used."] pub connect_timeout_ms : u32 , # [doc = " Optional.\n Set keepalive to periodically transmit messages for detecting a disconnected peer."] pub tcp_keep_alive_options : * mut aws_s3_tcp_keep_alive_options , # [doc = " Configuration options for connection monitoring.\n If the transfer speed falls below the specified minimum_throughput_bytes_per_second, the operation is aborted.\n If user passes in NULL, default values are used."] pub monitoring_options : aws_http_connection_monitoring_options , pub proxy_ev_tls_options : * mut aws_tls_connection_options , pub shutdown_callback : aws_s3_client_shutdown_complete_callback_fn , pub shutdown_callback_user_data : * mut :: libc :: c_void , pub enable_read_backpressure : bool , pub initial_read_window : usize , # [doc = " Timeout in ms for upload request for request after sending to the response first byte received."] pub upload_timeout_ms : aws_atomic_var , pub network_interface_names : aws_array_list , pub network_interface_names_cursor_array : * mut aws_byte_cursor , pub num_network_interface_names : usize , pub stats : aws_s3_client__bindgen_ty_1 , pub synced_data : aws_s3_client__bindgen_ty_2 , pub threaded_data : aws_s3_client__bindgen_ty_3 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_client__bindgen_ty_1 { pub num_requests_in_flight : aws_atomic_var , pub num_requests_network_io : [aws_atomic_var ; 4usize] , pub num_requests_stream_queued_waiting : aws_atomic_var , pub num_requests_streaming_response : aws_atomic_var , pub num_requests_streaming_request_body : aws_atomic_var , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_client__bindgen_ty_1 > () - 64usize] ; ["Alignment of aws_s3_client__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_client__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_in_flight"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_in_flight) - 0usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_network_io"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_network_io) - 8usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_stream_queued_waiting"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_stream_queued_waiting) - 40usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_streaming_response"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_streaming_response) - 48usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_streaming_request_body"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_streaming_request_body) - 56usize] ; } ; impl Default for aws_s3_client__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 () } } } # [repr (C)] pub struct aws_s3_client__bindgen_ty_2 { pub lock : aws_mutex , pub endpoints : aws_hash_table , pub num_failed_prepare_requests : u32 , pub pending_meta_request_work : aws_linked_list , pub prepared_requests : aws_linked_list , pub process_work_task : aws_task , pub trim_buffer_pool_task : aws_task , pub endpoints_cleanup_task : aws_task , pub num_endpoints_allocated : u32 , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub upload_part_stats : aws_s3_upload_part_timeout_stats , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_client__bindgen_ty_2 > () - 488usize] ; ["Alignment of aws_s3_client__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_client__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::lock"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , lock) - 0usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::endpoints"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , endpoints) - 48usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::num_failed_prepare_requests"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , num_failed_prepare_requests) - 56usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::pending_meta_request_work"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , pending_meta_request_work) - 64usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::prepared_requests"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , prepared_requests) - 96usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::process_work_task"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , process_work_task) - 128usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::trim_buffer_pool_task"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , trim_buffer_pool_task) - 192usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::endpoints_cleanup_task"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , endpoints_cleanup_task) - 256usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::num_endpoints_allocated"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , num_endpoints_allocated) - 320usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::upload_part_stats"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , upload_part_stats) - 328usize] ; } ; impl Default for aws_s3_client__bindgen_ty_2 { 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 () } } } impl aws_s3_client__bindgen_ty_2 { # [inline] pub fn active (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_active (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn active_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_active_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn start_destroy_executing (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_start_destroy_executing (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub unsafe fn start_destroy_executing_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 1usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_start_destroy_executing_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 1usize , 1u8 , val as u64 ,) } } # [inline] pub fn process_work_task_scheduled (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_process_work_task_scheduled (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub unsafe fn process_work_task_scheduled_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 2usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_process_work_task_scheduled_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 2usize , 1u8 , val as u64 ,) } } # [inline] pub fn process_work_task_in_progress (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_process_work_task_in_progress (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (3usize , 1u8 , val as u64) } } # [inline] pub unsafe fn process_work_task_in_progress_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 3usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_process_work_task_in_progress_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 3usize , 1u8 , val as u64 ,) } } # [inline] pub fn body_streaming_elg_allocated (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (4usize , 1u8) as u32) } } # [inline] pub fn set_body_streaming_elg_allocated (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (4usize , 1u8 , val as u64) } } # [inline] pub unsafe fn body_streaming_elg_allocated_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 4usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_body_streaming_elg_allocated_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 4usize , 1u8 , val as u64 ,) } } # [inline] pub fn s3express_provider_active (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (5usize , 1u8) as u32) } } # [inline] pub fn set_s3express_provider_active (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (5usize , 1u8 , val as u64) } } # [inline] pub unsafe fn s3express_provider_active_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 5usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_s3express_provider_active_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 5usize , 1u8 , val as u64 ,) } } # [inline] pub fn finish_destroy (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 1u8) as u32) } } # [inline] pub fn set_finish_destroy (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (6usize , 1u8 , val as u64) } } # [inline] pub unsafe fn finish_destroy_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 6usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_finish_destroy_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 6usize , 1u8 , val as u64 ,) } } # [inline] pub fn endpoints_cleanup_task_scheduled (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (7usize , 1u8) as u32) } } # [inline] pub fn set_endpoints_cleanup_task_scheduled (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (7usize , 1u8 , val as u64) } } # [inline] pub unsafe fn endpoints_cleanup_task_scheduled_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 7usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_endpoints_cleanup_task_scheduled_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 7usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (active : u32 , start_destroy_executing : u32 , process_work_task_scheduled : u32 , process_work_task_in_progress : u32 , body_streaming_elg_allocated : u32 , s3express_provider_active : u32 , finish_destroy : u32 , endpoints_cleanup_task_scheduled : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let active : u32 = unsafe { :: std :: mem :: transmute (active) } ; active as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let start_destroy_executing : u32 = unsafe { :: std :: mem :: transmute (start_destroy_executing) } ; start_destroy_executing as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let process_work_task_scheduled : u32 = unsafe { :: std :: mem :: transmute (process_work_task_scheduled) } ; process_work_task_scheduled as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let process_work_task_in_progress : u32 = unsafe { :: std :: mem :: transmute (process_work_task_in_progress) } ; process_work_task_in_progress as u64 }) ; __bindgen_bitfield_unit . set (4usize , 1u8 , { let body_streaming_elg_allocated : u32 = unsafe { :: std :: mem :: transmute (body_streaming_elg_allocated) } ; body_streaming_elg_allocated as u64 }) ; __bindgen_bitfield_unit . set (5usize , 1u8 , { let s3express_provider_active : u32 = unsafe { :: std :: mem :: transmute (s3express_provider_active) } ; s3express_provider_active as u64 }) ; __bindgen_bitfield_unit . set (6usize , 1u8 , { let finish_destroy : u32 = unsafe { :: std :: mem :: transmute (finish_destroy) } ; finish_destroy as u64 }) ; __bindgen_bitfield_unit . set (7usize , 1u8 , { let endpoints_cleanup_task_scheduled : u32 = unsafe { :: std :: mem :: transmute (endpoints_cleanup_task_scheduled) } ; endpoints_cleanup_task_scheduled as u64 }) ; __bindgen_bitfield_unit } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_client__bindgen_ty_3 { pub request_queue : aws_linked_list , pub meta_requests : aws_linked_list , pub request_queue_size : u32 , pub num_requests_being_prepared : u32 , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub __bindgen_padding_0 : [u8 ; 7usize] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_client__bindgen_ty_3 > () - 80usize] ; ["Alignment of aws_s3_client__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_client__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_client__bindgen_ty_3::request_queue"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_3 , request_queue) - 0usize] ; ["Offset of field: aws_s3_client__bindgen_ty_3::meta_requests"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_3 , meta_requests) - 32usize] ; ["Offset of field: aws_s3_client__bindgen_ty_3::request_queue_size"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_3 , request_queue_size) - 64usize] ; ["Offset of field: aws_s3_client__bindgen_ty_3::num_requests_being_prepared"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_3 , num_requests_being_prepared) - 68usize] ; } ; impl Default for aws_s3_client__bindgen_ty_3 { 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 () } } } impl aws_s3_client__bindgen_ty_3 { # [inline] pub fn trim_buffer_pool_task_scheduled (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_trim_buffer_pool_task_scheduled (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn trim_buffer_pool_task_scheduled_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_trim_buffer_pool_task_scheduled_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (trim_buffer_pool_task_scheduled : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let trim_buffer_pool_task_scheduled : u32 = unsafe { :: std :: mem :: transmute (trim_buffer_pool_task_scheduled) } ; trim_buffer_pool_task_scheduled as u64 }) ; __bindgen_bitfield_unit } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client"] [:: std :: mem :: size_of :: < aws_s3_client > () - 1032usize] ; ["Alignment of aws_s3_client"] [:: std :: mem :: align_of :: < aws_s3_client > () - 8usize] ; ["Offset of field: aws_s3_client::allocator"] [:: std :: mem :: offset_of ! (aws_s3_client , allocator) - 0usize] ; ["Offset of field: aws_s3_client::buffer_pool"] [:: std :: mem :: offset_of ! (aws_s3_client , buffer_pool) - 8usize] ; ["Offset of field: aws_s3_client::vtable"] [:: std :: mem :: offset_of ! (aws_s3_client , vtable) - 16usize] ; ["Offset of field: aws_s3_client::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_client , ref_count) - 24usize] ; ["Offset of field: aws_s3_client::client_bootstrap"] [:: std :: mem :: offset_of ! (aws_s3_client , client_bootstrap) - 48usize] ; ["Offset of field: aws_s3_client::process_work_event_loop"] [:: std :: mem :: offset_of ! (aws_s3_client , process_work_event_loop) - 56usize] ; ["Offset of field: aws_s3_client::body_streaming_elg"] [:: std :: mem :: offset_of ! (aws_s3_client , body_streaming_elg) - 64usize] ; ["Offset of field: aws_s3_client::region"] [:: std :: mem :: offset_of ! (aws_s3_client , region) - 72usize] ; ["Offset of field: aws_s3_client::part_size"] [:: std :: mem :: offset_of ! (aws_s3_client , part_size) - 80usize] ; ["Offset of field: aws_s3_client::part_size_set"] [:: std :: mem :: offset_of ! (aws_s3_client , part_size_set) - 88usize] ; ["Offset of field: aws_s3_client::max_part_size"] [:: std :: mem :: offset_of ! (aws_s3_client , max_part_size) - 96usize] ; ["Offset of field: aws_s3_client::optimal_range_size"] [:: std :: mem :: offset_of ! (aws_s3_client , optimal_range_size) - 104usize] ; ["Offset of field: aws_s3_client::fio_options_set"] [:: std :: mem :: offset_of ! (aws_s3_client , fio_options_set) - 112usize] ; ["Offset of field: aws_s3_client::fio_opts"] [:: std :: mem :: offset_of ! (aws_s3_client , fio_opts) - 120usize] ; ["Offset of field: aws_s3_client::multipart_upload_threshold"] [:: std :: mem :: offset_of ! (aws_s3_client , multipart_upload_threshold) - 144usize] ; ["Offset of field: aws_s3_client::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_s3_client , tls_connection_options) - 152usize] ; ["Offset of field: aws_s3_client::cached_signing_config"] [:: std :: mem :: offset_of ! (aws_s3_client , cached_signing_config) - 160usize] ; ["Offset of field: aws_s3_client::s3express_provider_factory"] [:: std :: mem :: offset_of ! (aws_s3_client , s3express_provider_factory) - 168usize] ; ["Offset of field: aws_s3_client::factory_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client , factory_user_data) - 176usize] ; ["Offset of field: aws_s3_client::s3express_provider"] [:: std :: mem :: offset_of ! (aws_s3_client , s3express_provider) - 184usize] ; ["Offset of field: aws_s3_client::throughput_target_gbps"] [:: std :: mem :: offset_of ! (aws_s3_client , throughput_target_gbps) - 192usize] ; ["Offset of field: aws_s3_client::ideal_connection_count"] [:: std :: mem :: offset_of ! (aws_s3_client , ideal_connection_count) - 200usize] ; ["Offset of field: aws_s3_client::compute_content_md5"] [:: std :: mem :: offset_of ! (aws_s3_client , compute_content_md5) - 204usize] ; ["Offset of field: aws_s3_client::max_active_connections_override"] [:: std :: mem :: offset_of ! (aws_s3_client , max_active_connections_override) - 208usize] ; ["Offset of field: aws_s3_client::max_allowed_connections"] [:: std :: mem :: offset_of ! (aws_s3_client , max_allowed_connections) - 216usize] ; ["Offset of field: aws_s3_client::retry_strategy"] [:: std :: mem :: offset_of ! (aws_s3_client , retry_strategy) - 224usize] ; ["Offset of field: aws_s3_client::proxy_config"] [:: std :: mem :: offset_of ! (aws_s3_client , proxy_config) - 232usize] ; ["Offset of field: aws_s3_client::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_s3_client , proxy_ev_settings) - 240usize] ; ["Offset of field: aws_s3_client::connect_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_client , connect_timeout_ms) - 248usize] ; ["Offset of field: aws_s3_client::tcp_keep_alive_options"] [:: std :: mem :: offset_of ! (aws_s3_client , tcp_keep_alive_options) - 256usize] ; ["Offset of field: aws_s3_client::monitoring_options"] [:: std :: mem :: offset_of ! (aws_s3_client , monitoring_options) - 264usize] ; ["Offset of field: aws_s3_client::proxy_ev_tls_options"] [:: std :: mem :: offset_of ! (aws_s3_client , proxy_ev_tls_options) - 296usize] ; ["Offset of field: aws_s3_client::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_client , shutdown_callback) - 304usize] ; ["Offset of field: aws_s3_client::shutdown_callback_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client , shutdown_callback_user_data) - 312usize] ; ["Offset of field: aws_s3_client::enable_read_backpressure"] [:: std :: mem :: offset_of ! (aws_s3_client , enable_read_backpressure) - 320usize] ; ["Offset of field: aws_s3_client::initial_read_window"] [:: std :: mem :: offset_of ! (aws_s3_client , initial_read_window) - 328usize] ; ["Offset of field: aws_s3_client::upload_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_client , upload_timeout_ms) - 336usize] ; ["Offset of field: aws_s3_client::network_interface_names"] [:: std :: mem :: offset_of ! (aws_s3_client , network_interface_names) - 344usize] ; ["Offset of field: aws_s3_client::network_interface_names_cursor_array"] [:: std :: mem :: offset_of ! (aws_s3_client , network_interface_names_cursor_array) - 384usize] ; ["Offset of field: aws_s3_client::num_network_interface_names"] [:: std :: mem :: offset_of ! (aws_s3_client , num_network_interface_names) - 392usize] ; ["Offset of field: aws_s3_client::stats"] [:: std :: mem :: offset_of ! (aws_s3_client , stats) - 400usize] ; ["Offset of field: aws_s3_client::synced_data"] [:: std :: mem :: offset_of ! (aws_s3_client , synced_data) - 464usize] ; ["Offset of field: aws_s3_client::threaded_data"] [:: std :: mem :: offset_of ! (aws_s3_client , threaded_data) - 952usize] ; } ; impl Default for aws_s3_client { 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)] pub struct aws_s3_meta_request_resume_token { pub allocator : * mut aws_allocator , pub ref_count : aws_ref_count , pub type_ : aws_s3_meta_request_type , pub multipart_upload_id : * mut aws_string , pub part_size : usize , pub total_num_parts : usize , pub num_parts_completed : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_resume_token"] [:: std :: mem :: size_of :: < aws_s3_meta_request_resume_token > () - 72usize] ; ["Alignment of aws_s3_meta_request_resume_token"] [:: std :: mem :: align_of :: < aws_s3_meta_request_resume_token > () - 8usize] ; ["Offset of field: aws_s3_meta_request_resume_token::allocator"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , allocator) - 0usize] ; ["Offset of field: aws_s3_meta_request_resume_token::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , ref_count) - 8usize] ; ["Offset of field: aws_s3_meta_request_resume_token::type_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , type_) - 32usize] ; ["Offset of field: aws_s3_meta_request_resume_token::multipart_upload_id"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , multipart_upload_id) - 40usize] ; ["Offset of field: aws_s3_meta_request_resume_token::part_size"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , part_size) - 48usize] ; ["Offset of field: aws_s3_meta_request_resume_token::total_num_parts"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , total_num_parts) - 56usize] ; ["Offset of field: aws_s3_meta_request_resume_token::num_parts_completed"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , num_parts_completed) - 64usize] ; } ; impl Default for aws_s3_meta_request_resume_token { 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 () } } } unsafe extern "C" { pub fn aws_s3_client_notify_connection_finished (client : * mut aws_s3_client , connection : * mut aws_s3_connection , error_code : :: libc :: c_int , finish_code : aws_s3_connection_finish_code) ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_new (allocator : * mut aws_allocator) -> * mut aws_s3_meta_request_resume_token ; } unsafe extern "C" { pub fn aws_s3_set_dns_ttl (ttl : usize) ; } unsafe extern "C" { pub fn aws_s3_client_get_max_requests_prepare (client : * mut aws_s3_client) -> u32 ; } unsafe extern "C" { pub fn aws_s3_client_get_max_active_connections (client : * mut aws_s3_client , meta_request : * mut aws_s3_meta_request) -> u32 ; } unsafe extern "C" { pub fn aws_s3_client_get_max_requests_in_flight (client : * mut aws_s3_client) -> u32 ; } unsafe extern "C" { pub fn aws_s3_client_queue_requests_threaded (client : * mut aws_s3_client , request_list : * mut aws_linked_list , queue_front : bool) -> u32 ; } unsafe extern "C" { pub fn aws_s3_client_dequeue_request_threaded (client : * mut aws_s3_client) -> * mut aws_s3_request ; } unsafe extern "C" { pub fn aws_s3_client_schedule_process_work (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_client_update_meta_requests_threaded (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_client_update_connections_threaded (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_endpoint_new (allocator : * mut aws_allocator , options : * const aws_s3_endpoint_options) -> * mut aws_s3_endpoint ; } unsafe extern "C" { pub fn aws_s3_client_lock_synced_data (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_client_unlock_synced_data (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_endpoint_set_system_vtable (vtable : * const aws_s3_endpoint_system_vtable) ; } unsafe extern "C" { pub fn aws_s3_endpoint_acquire (endpoint : * mut aws_s3_endpoint , already_holding_lock : bool) -> * mut aws_s3_endpoint ; } unsafe extern "C" { pub fn aws_s3_endpoint_release (endpoint : * mut aws_s3_endpoint) ; } unsafe extern "C" { pub fn aws_s3_endpoint_destroy (endpoint : * mut aws_s3_endpoint) ; } unsafe extern "C" { pub static g_min_num_connections : u32 ; } unsafe extern "C" { pub static g_expect_timeout_offset_ms : usize ; } unsafe extern "C" { pub fn aws_s3_client_update_upload_part_timeout (client : * mut aws_s3_client , finished_upload_part_request : * mut aws_s3_request , finished_error_code : :: libc :: c_int) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_default_buffer_ticket { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_default_buffer_pool_usage_stats { pub mem_limit : usize , pub primary_cutoff : usize , pub primary_allocated : usize , pub primary_num_blocks : usize , pub primary_used : usize , pub primary_reserved : usize , pub secondary_used : usize , pub secondary_reserved : usize , pub special_blocks_allocated : usize , pub special_blocks_num : usize , pub special_blocks_reserved : usize , pub special_blocks_used : usize , pub forced_used : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_default_buffer_pool_usage_stats"] [:: std :: mem :: size_of :: < aws_s3_default_buffer_pool_usage_stats > () - 104usize] ; ["Alignment of aws_s3_default_buffer_pool_usage_stats"] [:: std :: mem :: align_of :: < aws_s3_default_buffer_pool_usage_stats > () - 8usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::mem_limit"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , mem_limit) - 0usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_cutoff"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_cutoff) - 8usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_allocated"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_allocated) - 16usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_num_blocks"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_num_blocks) - 24usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_used) - 32usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_reserved) - 40usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::secondary_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , secondary_used) - 48usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::secondary_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , secondary_reserved) - 56usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::special_blocks_allocated"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , special_blocks_allocated) - 64usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::special_blocks_num"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , special_blocks_num) - 72usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::special_blocks_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , special_blocks_reserved) - 80usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::special_blocks_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , special_blocks_used) - 88usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::forced_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , forced_used) - 96usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct s3_special_block_list { pub allocator : * mut aws_allocator , pub buffer_size : usize , pub blocks : aws_array_list , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of s3_special_block_list"] [:: std :: mem :: size_of :: < s3_special_block_list > () - 56usize] ; ["Alignment of s3_special_block_list"] [:: std :: mem :: align_of :: < s3_special_block_list > () - 8usize] ; ["Offset of field: s3_special_block_list::allocator"] [:: std :: mem :: offset_of ! (s3_special_block_list , allocator) - 0usize] ; ["Offset of field: s3_special_block_list::buffer_size"] [:: std :: mem :: offset_of ! (s3_special_block_list , buffer_size) - 8usize] ; ["Offset of field: s3_special_block_list::blocks"] [:: std :: mem :: offset_of ! (s3_special_block_list , blocks) - 16usize] ; } ; impl Default for s3_special_block_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 () } } } # [repr (C)] pub struct aws_s3_default_buffer_pool { pub base_allocator : * mut aws_allocator , pub mutex : aws_mutex , pub block_size : usize , pub chunk_size : usize , pub primary_size_cutoff : usize , pub mem_limit : usize , pub primary_allocated : usize , pub primary_reserved : usize , pub primary_used : usize , pub special_blocks_allocated : usize , pub special_blocks_reserved : usize , pub special_blocks_used : usize , pub secondary_reserved : usize , pub secondary_used : usize , pub forced_used : usize , pub blocks : aws_array_list , pub pending_reserves : aws_linked_list , pub special_blocks : aws_hash_table , pub force_keeping_special_blocks : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_default_buffer_pool"] [:: std :: mem :: size_of :: < aws_s3_default_buffer_pool > () - 248usize] ; ["Alignment of aws_s3_default_buffer_pool"] [:: std :: mem :: align_of :: < aws_s3_default_buffer_pool > () - 8usize] ; ["Offset of field: aws_s3_default_buffer_pool::base_allocator"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , base_allocator) - 0usize] ; ["Offset of field: aws_s3_default_buffer_pool::mutex"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , mutex) - 8usize] ; ["Offset of field: aws_s3_default_buffer_pool::block_size"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , block_size) - 56usize] ; ["Offset of field: aws_s3_default_buffer_pool::chunk_size"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , chunk_size) - 64usize] ; ["Offset of field: aws_s3_default_buffer_pool::primary_size_cutoff"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , primary_size_cutoff) - 72usize] ; ["Offset of field: aws_s3_default_buffer_pool::mem_limit"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , mem_limit) - 80usize] ; ["Offset of field: aws_s3_default_buffer_pool::primary_allocated"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , primary_allocated) - 88usize] ; ["Offset of field: aws_s3_default_buffer_pool::primary_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , primary_reserved) - 96usize] ; ["Offset of field: aws_s3_default_buffer_pool::primary_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , primary_used) - 104usize] ; ["Offset of field: aws_s3_default_buffer_pool::special_blocks_allocated"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , special_blocks_allocated) - 112usize] ; ["Offset of field: aws_s3_default_buffer_pool::special_blocks_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , special_blocks_reserved) - 120usize] ; ["Offset of field: aws_s3_default_buffer_pool::special_blocks_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , special_blocks_used) - 128usize] ; ["Offset of field: aws_s3_default_buffer_pool::secondary_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , secondary_reserved) - 136usize] ; ["Offset of field: aws_s3_default_buffer_pool::secondary_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , secondary_used) - 144usize] ; ["Offset of field: aws_s3_default_buffer_pool::forced_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , forced_used) - 152usize] ; ["Offset of field: aws_s3_default_buffer_pool::blocks"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , blocks) - 160usize] ; ["Offset of field: aws_s3_default_buffer_pool::pending_reserves"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , pending_reserves) - 200usize] ; ["Offset of field: aws_s3_default_buffer_pool::special_blocks"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , special_blocks) - 232usize] ; ["Offset of field: aws_s3_default_buffer_pool::force_keeping_special_blocks"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , force_keeping_special_blocks) - 240usize] ; } ; impl Default for aws_s3_default_buffer_pool { 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)] pub struct s3_pending_reserve { pub node : aws_linked_list_node , pub ticket_future : * mut aws_future_s3_buffer_ticket , pub ticket : * mut aws_s3_default_buffer_ticket , pub meta : aws_s3_buffer_pool_reserve_meta , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of s3_pending_reserve"] [:: std :: mem :: size_of :: < s3_pending_reserve > () - 64usize] ; ["Alignment of s3_pending_reserve"] [:: std :: mem :: align_of :: < s3_pending_reserve > () - 8usize] ; ["Offset of field: s3_pending_reserve::node"] [:: std :: mem :: offset_of ! (s3_pending_reserve , node) - 0usize] ; ["Offset of field: s3_pending_reserve::ticket_future"] [:: std :: mem :: offset_of ! (s3_pending_reserve , ticket_future) - 16usize] ; ["Offset of field: s3_pending_reserve::ticket"] [:: std :: mem :: offset_of ! (s3_pending_reserve , ticket) - 24usize] ; ["Offset of field: s3_pending_reserve::meta"] [:: std :: mem :: offset_of ! (s3_pending_reserve , meta) - 32usize] ; } ; impl Default for s3_pending_reserve { 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)] pub struct s3_buffer_pool_block { pub block_size : usize , pub block_ptr : * mut u8 , pub alloc_bit_mask : u16 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of s3_buffer_pool_block"] [:: std :: mem :: size_of :: < s3_buffer_pool_block > () - 24usize] ; ["Alignment of s3_buffer_pool_block"] [:: std :: mem :: align_of :: < s3_buffer_pool_block > () - 8usize] ; ["Offset of field: s3_buffer_pool_block::block_size"] [:: std :: mem :: offset_of ! (s3_buffer_pool_block , block_size) - 0usize] ; ["Offset of field: s3_buffer_pool_block::block_ptr"] [:: std :: mem :: offset_of ! (s3_buffer_pool_block , block_ptr) - 8usize] ; ["Offset of field: s3_buffer_pool_block::alloc_bit_mask"] [:: std :: mem :: offset_of ! (s3_buffer_pool_block , alloc_bit_mask) - 16usize] ; } ; impl Default for s3_buffer_pool_block { 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 () } } } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_new (allocator : * mut aws_allocator , config : aws_s3_buffer_pool_config) -> * mut aws_s3_buffer_pool ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_destroy (buffer_pool : * mut aws_s3_buffer_pool) ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_reserve (buffer_pool : * mut aws_s3_buffer_pool , meta : aws_s3_buffer_pool_reserve_meta) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_acquire_buffer (buffer_pool : * mut aws_s3_buffer_pool , ticket : * mut aws_s3_default_buffer_ticket) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_get_usage (buffer_pool : * mut aws_s3_buffer_pool) -> aws_s3_default_buffer_pool_usage_stats ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_trim (buffer_pool : * mut aws_s3_buffer_pool) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_signable { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_signing_result { _unused : [u8 ; 0] , } # [doc = " Gets called by the signing function when the signing is complete.\n\n Note that result will be destroyed after this function returns, so either copy it,\n or do all necessary adjustments inside the callback.\n\n When performing event or chunk signing, you will need to copy out the signature value in order\n to correctly configure the signable that wraps the event or chunk you want signed next.  The signature is\n found in the \"signature\" property on the signing result.  This value must be added as the\n \"previous-signature\" property on the next signable."] pub type aws_signing_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (result : * mut aws_signing_result , error_code : :: libc :: c_int , userdata : * mut :: libc :: c_void) > ; unsafe extern "C" { # [doc = " (Asynchronous) entry point to sign something (a request, a chunk, an event) with an AWS signing process.\n Depending on the configuration, the signing process may or may not complete synchronously.\n\n @param allocator memory allocator to use throughout the signing process\n @param signable the thing to be signed.  See signable.h for common constructors for signables that\n wrap different types.\n @param base_config pointer to a signing configuration, currently this must be of type aws_signing_config_aws\n @param on_complete completion callback to be invoked when signing has finished\n @param user_data opaque user data that will be passed to the completion callback\n\n @return AWS_OP_SUCCESS if the signing attempt was *initiated* successfully, AWS_OP_ERR otherwise"] pub fn aws_sign_request_aws (allocator : * mut aws_allocator , signable : * const aws_signable , base_config : * const aws_signing_config_base , on_complete : aws_signing_complete_fn , userdata : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Test-only API used for cross-library signing verification tests\n\n Verifies:\n  (1) The canonical request generated during sigv4a signing of the request matches what is passed in\n  (2) The signature passed in is a valid ECDSA signature of the hashed string-to-sign derived from the\n  canonical request\n\n  @param allocator memory allocator to use throughout the signing verification process\n  @param signable the thing to be signed.  See signable.h for common constructors for signables that\n wrap different types.\n  @param base_config pointer to a signing configuration, currently this must be of type aws_signing_config_aws\n  @param expected_canonical_request_cursor expected result when building the canonical request\n  @param signature_cursor the actual signature computed from a previous signing of the signable\n  @param ecc_key_pub_x the x coordinate of the public part of the ecc key to verify the signature\n  @param ecc_key_pub_y the y coordinate of the public part of the ecc key to verify the signature\n\n  @return AWS_OP_SUCCESS if the signing attempt was *initiated* successfully, AWS_OP_ERR otherwise"] pub fn aws_verify_sigv4a_signing (allocator : * mut aws_allocator , signable : * const aws_signable , base_config : * const aws_signing_config_base , expected_canonical_request_cursor : aws_byte_cursor , signature_cursor : aws_byte_cursor , ecc_key_pub_x : aws_byte_cursor , ecc_key_pub_y : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Another helper function to check a computed sigv4a signature."] pub fn aws_validate_v4a_authorization_value (allocator : * mut aws_allocator , ecc_key : * mut aws_ecc_key_pair , string_to_sign_cursor : aws_byte_cursor , signature_value_cursor : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes any padding added to the end of a sigv4a signature.  Signature must be hex-encoded.\n @param signature signature to remove padding from\n @return cursor that ranges over only the valid hex encoding of the sigv4a signature"] pub fn aws_trim_padded_sigv4a_signature (signature : aws_byte_cursor) -> aws_byte_cursor ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_request_checksum_context { _unused : [u8 ; 0] , } unsafe extern "C" { pub static s_checksum_algo_priority_list : [aws_s3_checksum_algorithm ; 5usize] ; } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_checksum_vtable { pub destroy : :: std :: option :: Option < unsafe extern "C" fn (checksum : * mut aws_s3_checksum) > , pub update : :: std :: option :: Option < unsafe extern "C" fn (checksum : * mut aws_s3_checksum , buf : * const aws_byte_cursor) -> :: libc :: c_int > , pub finalize : :: std :: option :: Option < unsafe extern "C" fn (checksum : * mut aws_s3_checksum , out : * mut aws_byte_buf) -> :: libc :: c_int > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_checksum_vtable"] [:: std :: mem :: size_of :: < aws_checksum_vtable > () - 24usize] ; ["Alignment of aws_checksum_vtable"] [:: std :: mem :: align_of :: < aws_checksum_vtable > () - 8usize] ; ["Offset of field: aws_checksum_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_checksum_vtable , destroy) - 0usize] ; ["Offset of field: aws_checksum_vtable::update"] [:: std :: mem :: offset_of ! (aws_checksum_vtable , update) - 8usize] ; ["Offset of field: aws_checksum_vtable::finalize"] [:: std :: mem :: offset_of ! (aws_checksum_vtable , finalize) - 16usize] ; } ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_s3_checksum { pub allocator : * mut aws_allocator , pub vtable : * mut aws_checksum_vtable , pub digest_size : usize , pub algorithm : aws_s3_checksum_algorithm , pub good : bool , pub impl_ : aws_s3_checksum__bindgen_ty_1 , } # [repr (C)] # [derive (Copy , Clone)] pub union aws_s3_checksum__bindgen_ty_1 { pub hash : * mut aws_hash , pub crc_val_32bit : u32 , pub crc_val_64bit : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_checksum__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_checksum__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_s3_checksum__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_checksum__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_checksum__bindgen_ty_1::hash"] [:: std :: mem :: offset_of ! (aws_s3_checksum__bindgen_ty_1 , hash) - 0usize] ; ["Offset of field: aws_s3_checksum__bindgen_ty_1::crc_val_32bit"] [:: std :: mem :: offset_of ! (aws_s3_checksum__bindgen_ty_1 , crc_val_32bit) - 0usize] ; ["Offset of field: aws_s3_checksum__bindgen_ty_1::crc_val_64bit"] [:: std :: mem :: offset_of ! (aws_s3_checksum__bindgen_ty_1 , crc_val_64bit) - 0usize] ; } ; impl Default for aws_s3_checksum__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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_checksum"] [:: std :: mem :: size_of :: < aws_s3_checksum > () - 40usize] ; ["Alignment of aws_s3_checksum"] [:: std :: mem :: align_of :: < aws_s3_checksum > () - 8usize] ; ["Offset of field: aws_s3_checksum::allocator"] [:: std :: mem :: offset_of ! (aws_s3_checksum , allocator) - 0usize] ; ["Offset of field: aws_s3_checksum::vtable"] [:: std :: mem :: offset_of ! (aws_s3_checksum , vtable) - 8usize] ; ["Offset of field: aws_s3_checksum::digest_size"] [:: std :: mem :: offset_of ! (aws_s3_checksum , digest_size) - 16usize] ; ["Offset of field: aws_s3_checksum::algorithm"] [:: std :: mem :: offset_of ! (aws_s3_checksum , algorithm) - 24usize] ; ["Offset of field: aws_s3_checksum::good"] [:: std :: mem :: offset_of ! (aws_s3_checksum , good) - 28usize] ; ["Offset of field: aws_s3_checksum::impl_"] [:: std :: mem :: offset_of ! (aws_s3_checksum , impl_) - 32usize] ; } ; impl Default for aws_s3_checksum { 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)] pub struct aws_s3_meta_request_checksum_config_storage { pub allocator : * mut aws_allocator , pub full_object_checksum : aws_byte_buf , pub has_full_object_checksum : bool , pub full_object_checksum_callback : aws_s3_meta_request_full_object_checksum_fn , pub user_data : * mut :: libc :: c_void , pub location : aws_s3_checksum_location , pub checksum_algorithm : aws_s3_checksum_algorithm , pub validate_response_checksum : bool , pub response_checksum_algorithms : aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 { pub crc64nvme : bool , pub crc32c : bool , pub crc32 : bool , pub sha1 : bool , pub sha256 : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_checksum_config_storage__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 > () - 5usize] ; ["Alignment of aws_s3_meta_request_checksum_config_storage__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 > () - 1usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::crc64nvme"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , crc64nvme) - 0usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::crc32c"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , crc32c) - 1usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::crc32"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , crc32) - 2usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::sha1"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , sha1) - 3usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::sha256"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , sha256) - 4usize] ; } ; # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_checksum_config_storage"] [:: std :: mem :: size_of :: < aws_s3_meta_request_checksum_config_storage > () - 80usize] ; ["Alignment of aws_s3_meta_request_checksum_config_storage"] [:: std :: mem :: align_of :: < aws_s3_meta_request_checksum_config_storage > () - 8usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::allocator"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , allocator) - 0usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::full_object_checksum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , full_object_checksum) - 8usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::has_full_object_checksum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , has_full_object_checksum) - 40usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::full_object_checksum_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , full_object_checksum_callback) - 48usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::user_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , user_data) - 56usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::location"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , location) - 64usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::checksum_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , checksum_algorithm) - 68usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::validate_response_checksum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , validate_response_checksum) - 72usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::response_checksum_algorithms"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , response_checksum_algorithms) - 73usize] ; } ; impl Default for aws_s3_meta_request_checksum_config_storage { 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 () } } } unsafe extern "C" { # [doc = " Helper stream that takes in a stream and the checksum context to help finalize the checksum from the underlying\n stream.\n The context will be only finalized when the checksum stream has read to the end of stream.\n\n Note: seek this stream will immediately fail, as it would prevent an accurate calculation of the\n checksum.\n\n @param allocator\n @param existing_stream The real content to read from. Destroying the checksum stream destroys the existing stream.\n                        outputs the checksum of existing stream to checksum_output upon destruction. Will be kept\n                        alive by the checksum stream\n @param context         Checksum context to keep and get checksum requirements from."] pub fn aws_checksum_stream_new_with_context (allocator : * mut aws_allocator , existing_stream : * mut aws_input_stream , context : * mut aws_s3_upload_request_checksum_context) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Helper stream that takes in a stream to keep track of the checksum of the underlying stream during read.\n Invoke `aws_checksum_stream_finalize_checksum` to get the checksum of the data has been read so far.\n\n Note: seek this stream will immediately fail, as it would prevent an accurate calculation of the\n checksum.\n\n @param allocator\n @param existing_stream The real content to read from. Destroying the checksum stream destroys the existing stream.\n                        outputs the checksum of existing stream to checksum_output upon destruction. Will be kept\n                        alive by the checksum stream\n @param algorithm       Checksum algorithm to use."] pub fn aws_checksum_stream_new (allocator : * mut aws_allocator , existing_stream : * mut aws_input_stream , algorithm : aws_s3_checksum_algorithm) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Finalize the checksum has read so far to the output checksum buf with base64 encoding.\n Not thread safe."] pub fn aws_checksum_stream_finalize_checksum (checksum_stream : * mut aws_input_stream , checksum_buf : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " TODO: properly support chunked encoding.\n Creates a chunked encoding stream that wraps an existing stream and adds checksum trailers.\n\n This function creates a stream that:\n 1. Encodes the input stream wraps the existing_stream with aws-chunked encoded.\n 2. Calculates a checksum of the stream content (if not already calculated)\n 3. Appends the checksum as a trailer at the end of the aws-chunked stream\n\n Note: This stream does not support seeking operations, as seeking would prevent\n accurate checksum calculation and corrupt the chunked encoding format.\n\n @param allocator         Memory allocator to use for stream creation and internal buffers\n @param existing_stream   The input stream to be chunked and checksummed. This stream\n                          will be acquired by the chunk stream and released when the\n                          chunk stream is destroyed. Must not be NULL.\n @param checksum_context  Context containing checksum configuration and state. Must not be NULL.\n                          The context contains:\n                          - algorithm: The checksum algorithm to use (CRC32, CRC32C, etc.)\n                          - base64_checksum: Buffer for the calculated checksum result\n                          - checksum_calculated: Whether checksum is pre-calculated or needs calculation\n                          - encoded_checksum_size: Expected size of the base64-encoded checksum\n\n                          If checksum_calculated is false, the stream will wrap existing_stream\n                          with a checksum stream to calculate the checksum during reading.\n                          If checksum_calculated is true, the existing checksum value will be used.\n\n @return A new input stream that provides chunked encoding with checksum trailers,\n         or NULL if creation fails. The returned stream must be released with\n         aws_input_stream_release() when no longer needed.\n\n @note The total length of the returned stream includes:\n       - Chunk size header (hex representation + \\r\\n)\n       - Original stream content\n       - Final chunk marker (0\\r\\n or \\r\\n0\\r\\n)\n       - Checksum trailer (header name + : + base64 checksum + \\r\\n\\r\\n)"] pub fn aws_chunk_stream_new (allocator : * mut aws_allocator , existing_stream : * mut aws_input_stream , context : * mut aws_s3_upload_request_checksum_context) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Get the size of the checksum output corresponding to the aws_s3_checksum_algorithm enum value."] pub fn aws_get_digest_size_from_checksum_algorithm (algorithm : aws_s3_checksum_algorithm) -> usize ; } unsafe extern "C" { # [doc = " Get header name to use for algorithm (e.g. \"x-amz-checksum-crc32\")"] pub fn aws_get_http_header_name_from_checksum_algorithm (algorithm : aws_s3_checksum_algorithm) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get algorithm's name (e.g. \"CRC32\"), to be used as the value of headers like `x-amz-checksum-algorithm`"] pub fn aws_get_checksum_algorithm_name (algorithm : aws_s3_checksum_algorithm) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the name of checksum algorithm to be used as the details of the parts were uploaded. Referring to\n https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompletedPart.html#AmazonS3-Type-CompletedPart"] pub fn aws_get_completed_part_name_from_checksum_algorithm (algorithm : aws_s3_checksum_algorithm) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " create a new aws_checksum corresponding to the aws_s3_checksum_algorithm enum value."] pub fn aws_checksum_new (allocator : * mut aws_allocator , algorithm : aws_s3_checksum_algorithm) -> * mut aws_s3_checksum ; } unsafe extern "C" { # [doc = " Compute an aws_checksum corresponding to the provided enum, passing a function pointer around instead of using a\n conditional would be faster, but would be a negligible improvement compared to the cost of processing data twice\n which would be the only time this function would be used, and would be harder to follow."] pub fn aws_checksum_compute (allocator : * mut aws_allocator , algorithm : aws_s3_checksum_algorithm , input : * const aws_byte_cursor , output : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Cleans up and deallocates checksum."] pub fn aws_checksum_destroy (checksum : * mut aws_s3_checksum) ; } unsafe extern "C" { # [doc = " Updates the running checksum with to_checksum. this can be called multiple times."] pub fn aws_checksum_update (checksum : * mut aws_s3_checksum , to_checksum : * const aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Completes the checksum computation and writes the final digest to output.\n Allocation of output is the caller's responsibility."] pub fn aws_checksum_finalize (checksum : * mut aws_s3_checksum , output : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_meta_request_checksum_config_storage_init (allocator : * mut aws_allocator , internal_config : * mut aws_s3_meta_request_checksum_config_storage , config : * const aws_s3_checksum_config , message : * const aws_http_message , log_id : * const :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_meta_request_checksum_config_storage_cleanup (internal_config : * mut aws_s3_meta_request_checksum_config_storage) ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_request_flags { AWS_S3_REQUEST_FLAG_RECORD_RESPONSE_HEADERS = 1 , AWS_S3_REQUEST_FLAG_ALWAYS_SEND = 2 , AWS_S3_REQUEST_FLAG_ALLOCATE_BUFFER_FROM_POOL = 4 , } # [doc = " Information sent in the telemetry_callback after each aws_s3_request finished/retried from meta request."] # [repr (C)] pub struct aws_s3_request_metrics { pub allocator : * mut aws_allocator , pub time_metrics : aws_s3_request_metrics__bindgen_ty_1 , pub req_resp_info_metrics : aws_s3_request_metrics__bindgen_ty_2 , pub crt_info_metrics : aws_s3_request_metrics__bindgen_ty_3 , pub part_info_metrics : aws_s3_request_metrics__bindgen_ty_4 , pub ref_count : aws_ref_count , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_request_metrics__bindgen_ty_1 { pub s3_request_first_attempt_start_timestamp_ns : i64 , pub s3_request_last_attempt_end_timestamp_ns : i64 , pub s3_request_total_duration_ns : i64 , pub start_timestamp_ns : i64 , pub end_timestamp_ns : i64 , pub total_duration_ns : i64 , pub send_start_timestamp_ns : i64 , pub send_end_timestamp_ns : i64 , pub sending_duration_ns : i64 , pub receive_start_timestamp_ns : i64 , pub receive_end_timestamp_ns : i64 , pub receiving_duration_ns : i64 , pub sign_start_timestamp_ns : i64 , pub sign_end_timestamp_ns : i64 , pub signing_duration_ns : i64 , pub mem_acquire_start_timestamp_ns : i64 , pub mem_acquire_end_timestamp_ns : i64 , pub mem_acquire_duration_ns : i64 , pub deliver_start_timestamp_ns : i64 , pub deliver_end_timestamp_ns : i64 , pub deliver_duration_ns : i64 , pub conn_acquire_start_timestamp_ns : i64 , pub conn_acquire_end_timestamp_ns : i64 , pub conn_acquire_duration_ns : i64 , pub retry_delay_start_timestamp_ns : i64 , pub retry_delay_end_timestamp_ns : i64 , pub retry_delay_duration_ns : i64 , pub service_call_duration_ns : i64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_request_metrics__bindgen_ty_1 > () - 224usize] ; ["Alignment of aws_s3_request_metrics__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_request_metrics__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::s3_request_first_attempt_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , s3_request_first_attempt_start_timestamp_ns) - 0usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::s3_request_last_attempt_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , s3_request_last_attempt_end_timestamp_ns) - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::s3_request_total_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , s3_request_total_duration_ns) - 16usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , start_timestamp_ns) - 24usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , end_timestamp_ns) - 32usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::total_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , total_duration_ns) - 40usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::send_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , send_start_timestamp_ns) - 48usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::send_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , send_end_timestamp_ns) - 56usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::sending_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , sending_duration_ns) - 64usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::receive_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , receive_start_timestamp_ns) - 72usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::receive_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , receive_end_timestamp_ns) - 80usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::receiving_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , receiving_duration_ns) - 88usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::sign_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , sign_start_timestamp_ns) - 96usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::sign_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , sign_end_timestamp_ns) - 104usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::signing_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , signing_duration_ns) - 112usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::mem_acquire_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , mem_acquire_start_timestamp_ns) - 120usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::mem_acquire_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , mem_acquire_end_timestamp_ns) - 128usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::mem_acquire_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , mem_acquire_duration_ns) - 136usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::deliver_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , deliver_start_timestamp_ns) - 144usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::deliver_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , deliver_end_timestamp_ns) - 152usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::deliver_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , deliver_duration_ns) - 160usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::conn_acquire_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , conn_acquire_start_timestamp_ns) - 168usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::conn_acquire_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , conn_acquire_end_timestamp_ns) - 176usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::conn_acquire_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , conn_acquire_duration_ns) - 184usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::retry_delay_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , retry_delay_start_timestamp_ns) - 192usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::retry_delay_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , retry_delay_end_timestamp_ns) - 200usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::retry_delay_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , retry_delay_duration_ns) - 208usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::service_call_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , service_call_duration_ns) - 216usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_request_metrics__bindgen_ty_2 { pub response_status : :: libc :: c_int , pub response_headers : * mut aws_http_headers , pub request_path_query : * mut aws_string , pub host_address : * mut aws_string , pub request_id : * mut aws_string , pub extended_request_id : * mut aws_string , pub operation_name : * mut aws_string , pub request_type : aws_s3_request_type , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_request_metrics__bindgen_ty_2 > () - 64usize] ; ["Alignment of aws_s3_request_metrics__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_request_metrics__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::response_status"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , response_status) - 0usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::response_headers"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , response_headers) - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::request_path_query"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , request_path_query) - 16usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::host_address"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , host_address) - 24usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::request_id"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , request_id) - 32usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::extended_request_id"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , extended_request_id) - 40usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::operation_name"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , operation_name) - 48usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::request_type"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , request_type) - 56usize] ; } ; impl Default for aws_s3_request_metrics__bindgen_ty_2 { 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)] pub struct aws_s3_request_metrics__bindgen_ty_3 { pub ip_address : * mut aws_string , pub connection_ptr : * mut :: libc :: c_void , pub request_ptr : * mut :: libc :: c_void , pub thread_id : aws_thread_id_t , pub stream_id : u32 , pub error_code : :: libc :: c_int , pub retry_attempt : u32 , pub memory_allocated_from_pool : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_request_metrics__bindgen_ty_3 > () - 48usize] ; ["Alignment of aws_s3_request_metrics__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_request_metrics__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::ip_address"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , ip_address) - 0usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::connection_ptr"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , connection_ptr) - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::request_ptr"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , request_ptr) - 16usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::thread_id"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , thread_id) - 24usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::stream_id"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , stream_id) - 32usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::error_code"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , error_code) - 36usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::retry_attempt"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , retry_attempt) - 40usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::memory_allocated_from_pool"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , memory_allocated_from_pool) - 44usize] ; } ; impl Default for aws_s3_request_metrics__bindgen_ty_3 { 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)] pub struct aws_s3_request_metrics__bindgen_ty_4 { pub part_range_start : u64 , pub part_range_end : u64 , pub part_number : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics__bindgen_ty_4"] [:: std :: mem :: size_of :: < aws_s3_request_metrics__bindgen_ty_4 > () - 24usize] ; ["Alignment of aws_s3_request_metrics__bindgen_ty_4"] [:: std :: mem :: align_of :: < aws_s3_request_metrics__bindgen_ty_4 > () - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_4::part_range_start"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_4 , part_range_start) - 0usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_4::part_range_end"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_4 , part_range_end) - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_4::part_number"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_4 , part_number) - 16usize] ; } ; # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics"] [:: std :: mem :: size_of :: < aws_s3_request_metrics > () - 392usize] ; ["Alignment of aws_s3_request_metrics"] [:: std :: mem :: align_of :: < aws_s3_request_metrics > () - 8usize] ; ["Offset of field: aws_s3_request_metrics::allocator"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , allocator) - 0usize] ; ["Offset of field: aws_s3_request_metrics::time_metrics"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , time_metrics) - 8usize] ; ["Offset of field: aws_s3_request_metrics::req_resp_info_metrics"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , req_resp_info_metrics) - 232usize] ; ["Offset of field: aws_s3_request_metrics::crt_info_metrics"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , crt_info_metrics) - 296usize] ; ["Offset of field: aws_s3_request_metrics::part_info_metrics"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , part_info_metrics) - 344usize] ; ["Offset of field: aws_s3_request_metrics::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , ref_count) - 368usize] ; } ; impl Default for aws_s3_request_metrics { 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)] pub struct aws_s3_request { pub node : aws_linked_list_node , pub retry_start_timestamp_ns : i64 , pub retry_end_timestamp_ns : i64 , pub cancellable_http_streams_list_node : aws_linked_list_node , pub pending_buffer_future_list_node : aws_linked_list_node , pub synced_data : aws_s3_request__bindgen_ty_1 , pub ref_count : aws_ref_count , pub allocator : * mut aws_allocator , pub meta_request : * mut aws_s3_meta_request , pub buffer_size : usize , pub request_body : aws_byte_buf , pub fio_streaming : bool , pub request_body_stream : * mut aws_input_stream , pub content_length : u64 , # [doc = " Ticket to acquire the buffer."] pub ticket : * mut aws_s3_buffer_ticket , pub part_range_start : u64 , pub part_range_end : u64 , pub part_number : u32 , pub upload_timeout_ms : usize , pub num_times_prepared : u32 , pub request_level_response_header_checksum : aws_byte_buf , pub request_level_running_response_sum : * mut aws_s3_checksum , pub validation_algorithm : aws_s3_checksum_algorithm , pub did_validate : bool , pub checksum_match : bool , pub request_tag : :: libc :: c_int , pub request_type : aws_s3_request_type , pub operation_name : * mut aws_string , pub send_data : aws_s3_request__bindgen_ty_2 , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub __bindgen_padding_0 : [u8 ; 7usize] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_request__bindgen_ty_1 { pub cancellable_http_stream : * mut aws_http_stream , pub buffer_future : * mut aws_future_s3_buffer_ticket , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_request__bindgen_ty_1 > () - 16usize] ; ["Alignment of aws_s3_request__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_request__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_request__bindgen_ty_1::cancellable_http_stream"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_1 , cancellable_http_stream) - 0usize] ; ["Offset of field: aws_s3_request__bindgen_ty_1::buffer_future"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_1 , buffer_future) - 8usize] ; } ; impl Default for aws_s3_request__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 () } } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_request__bindgen_ty_2 { pub message : * mut aws_http_message , pub signable : * mut aws_signable , pub response_headers : * mut aws_http_headers , pub response_body : aws_byte_buf , pub response_status : :: libc :: c_int , pub request_id : * mut aws_string , pub amz_id_2 : * mut aws_string , pub metrics : * mut aws_s3_request_metrics , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub __bindgen_padding_0 : [u8 ; 7usize] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_request__bindgen_ty_2 > () - 96usize] ; ["Alignment of aws_s3_request__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_request__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::message"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , message) - 0usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::signable"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , signable) - 8usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::response_headers"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , response_headers) - 16usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::response_body"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , response_body) - 24usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::response_status"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , response_status) - 56usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::request_id"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , request_id) - 64usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::amz_id_2"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , amz_id_2) - 72usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::metrics"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , metrics) - 80usize] ; } ; impl Default for aws_s3_request__bindgen_ty_2 { 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 () } } } impl aws_s3_request__bindgen_ty_2 { # [inline] pub fn require_streaming_unsigned_payload_header (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_require_streaming_unsigned_payload_header (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn require_streaming_unsigned_payload_header_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_require_streaming_unsigned_payload_header_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (require_streaming_unsigned_payload_header : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let require_streaming_unsigned_payload_header : u32 = unsafe { :: std :: mem :: transmute (require_streaming_unsigned_payload_header) } ; require_streaming_unsigned_payload_header as u64 }) ; __bindgen_bitfield_unit } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request"] [:: std :: mem :: size_of :: < aws_s3_request > () - 400usize] ; ["Alignment of aws_s3_request"] [:: std :: mem :: align_of :: < aws_s3_request > () - 8usize] ; ["Offset of field: aws_s3_request::node"] [:: std :: mem :: offset_of ! (aws_s3_request , node) - 0usize] ; ["Offset of field: aws_s3_request::retry_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request , retry_start_timestamp_ns) - 16usize] ; ["Offset of field: aws_s3_request::retry_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request , retry_end_timestamp_ns) - 24usize] ; ["Offset of field: aws_s3_request::cancellable_http_streams_list_node"] [:: std :: mem :: offset_of ! (aws_s3_request , cancellable_http_streams_list_node) - 32usize] ; ["Offset of field: aws_s3_request::pending_buffer_future_list_node"] [:: std :: mem :: offset_of ! (aws_s3_request , pending_buffer_future_list_node) - 48usize] ; ["Offset of field: aws_s3_request::synced_data"] [:: std :: mem :: offset_of ! (aws_s3_request , synced_data) - 64usize] ; ["Offset of field: aws_s3_request::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_request , ref_count) - 80usize] ; ["Offset of field: aws_s3_request::allocator"] [:: std :: mem :: offset_of ! (aws_s3_request , allocator) - 104usize] ; ["Offset of field: aws_s3_request::meta_request"] [:: std :: mem :: offset_of ! (aws_s3_request , meta_request) - 112usize] ; ["Offset of field: aws_s3_request::buffer_size"] [:: std :: mem :: offset_of ! (aws_s3_request , buffer_size) - 120usize] ; ["Offset of field: aws_s3_request::request_body"] [:: std :: mem :: offset_of ! (aws_s3_request , request_body) - 128usize] ; ["Offset of field: aws_s3_request::fio_streaming"] [:: std :: mem :: offset_of ! (aws_s3_request , fio_streaming) - 160usize] ; ["Offset of field: aws_s3_request::request_body_stream"] [:: std :: mem :: offset_of ! (aws_s3_request , request_body_stream) - 168usize] ; ["Offset of field: aws_s3_request::content_length"] [:: std :: mem :: offset_of ! (aws_s3_request , content_length) - 176usize] ; ["Offset of field: aws_s3_request::ticket"] [:: std :: mem :: offset_of ! (aws_s3_request , ticket) - 184usize] ; ["Offset of field: aws_s3_request::part_range_start"] [:: std :: mem :: offset_of ! (aws_s3_request , part_range_start) - 192usize] ; ["Offset of field: aws_s3_request::part_range_end"] [:: std :: mem :: offset_of ! (aws_s3_request , part_range_end) - 200usize] ; ["Offset of field: aws_s3_request::part_number"] [:: std :: mem :: offset_of ! (aws_s3_request , part_number) - 208usize] ; ["Offset of field: aws_s3_request::upload_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_request , upload_timeout_ms) - 216usize] ; ["Offset of field: aws_s3_request::num_times_prepared"] [:: std :: mem :: offset_of ! (aws_s3_request , num_times_prepared) - 224usize] ; ["Offset of field: aws_s3_request::request_level_response_header_checksum"] [:: std :: mem :: offset_of ! (aws_s3_request , request_level_response_header_checksum) - 232usize] ; ["Offset of field: aws_s3_request::request_level_running_response_sum"] [:: std :: mem :: offset_of ! (aws_s3_request , request_level_running_response_sum) - 264usize] ; ["Offset of field: aws_s3_request::validation_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_request , validation_algorithm) - 272usize] ; ["Offset of field: aws_s3_request::did_validate"] [:: std :: mem :: offset_of ! (aws_s3_request , did_validate) - 276usize] ; ["Offset of field: aws_s3_request::checksum_match"] [:: std :: mem :: offset_of ! (aws_s3_request , checksum_match) - 277usize] ; ["Offset of field: aws_s3_request::request_tag"] [:: std :: mem :: offset_of ! (aws_s3_request , request_tag) - 280usize] ; ["Offset of field: aws_s3_request::request_type"] [:: std :: mem :: offset_of ! (aws_s3_request , request_type) - 284usize] ; ["Offset of field: aws_s3_request::operation_name"] [:: std :: mem :: offset_of ! (aws_s3_request , operation_name) - 288usize] ; ["Offset of field: aws_s3_request::send_data"] [:: std :: mem :: offset_of ! (aws_s3_request , send_data) - 296usize] ; } ; impl Default for aws_s3_request { 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 () } } } impl aws_s3_request { # [inline] pub fn record_response_headers (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_record_response_headers (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn record_response_headers_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_record_response_headers_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn should_allocate_buffer_from_pool (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_should_allocate_buffer_from_pool (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub unsafe fn should_allocate_buffer_from_pool_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 1usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_should_allocate_buffer_from_pool_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 1usize , 1u8 , val as u64 ,) } } # [inline] pub fn tracked_by_client (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_tracked_by_client (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub unsafe fn tracked_by_client_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 2usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_tracked_by_client_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 2usize , 1u8 , val as u64 ,) } } # [inline] pub fn always_send (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_always_send (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (3usize , 1u8 , val as u64) } } # [inline] pub unsafe fn always_send_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 3usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_always_send_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 3usize , 1u8 , val as u64 ,) } } # [inline] pub fn discovers_object_size (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (4usize , 1u8) as u32) } } # [inline] pub fn set_discovers_object_size (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (4usize , 1u8 , val as u64) } } # [inline] pub unsafe fn discovers_object_size_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 4usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_discovers_object_size_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 4usize , 1u8 , val as u64 ,) } } # [inline] pub fn is_noop (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (5usize , 1u8) as u32) } } # [inline] pub fn set_is_noop (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (5usize , 1u8 , val as u64) } } # [inline] pub unsafe fn is_noop_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 5usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_is_noop_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 5usize , 1u8 , val as u64 ,) } } # [inline] pub fn was_previously_uploaded (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 1u8) as u32) } } # [inline] pub fn set_was_previously_uploaded (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (6usize , 1u8 , val as u64) } } # [inline] pub unsafe fn was_previously_uploaded_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 6usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_was_previously_uploaded_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 6usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (record_response_headers : u32 , should_allocate_buffer_from_pool : u32 , tracked_by_client : u32 , always_send : u32 , discovers_object_size : u32 , is_noop : u32 , was_previously_uploaded : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let record_response_headers : u32 = unsafe { :: std :: mem :: transmute (record_response_headers) } ; record_response_headers as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let should_allocate_buffer_from_pool : u32 = unsafe { :: std :: mem :: transmute (should_allocate_buffer_from_pool) } ; should_allocate_buffer_from_pool as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let tracked_by_client : u32 = unsafe { :: std :: mem :: transmute (tracked_by_client) } ; tracked_by_client as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let always_send : u32 = unsafe { :: std :: mem :: transmute (always_send) } ; always_send as u64 }) ; __bindgen_bitfield_unit . set (4usize , 1u8 , { let discovers_object_size : u32 = unsafe { :: std :: mem :: transmute (discovers_object_size) } ; discovers_object_size as u64 }) ; __bindgen_bitfield_unit . set (5usize , 1u8 , { let is_noop : u32 = unsafe { :: std :: mem :: transmute (is_noop) } ; is_noop as u64 }) ; __bindgen_bitfield_unit . set (6usize , 1u8 , { let was_previously_uploaded : u32 = unsafe { :: std :: mem :: transmute (was_previously_uploaded) } ; was_previously_uploaded as u64 }) ; __bindgen_bitfield_unit } } unsafe extern "C" { pub fn aws_s3_request_new (meta_request : * mut aws_s3_meta_request , request_tag : :: libc :: c_int , request_type : aws_s3_request_type , part_number : u32 , flags : u32) -> * mut aws_s3_request ; } unsafe extern "C" { pub fn aws_s3_request_setup_send_data (request : * mut aws_s3_request , message : * mut aws_http_message) ; } unsafe extern "C" { pub fn aws_s3_request_clean_up_send_data (request : * mut aws_s3_request) ; } unsafe extern "C" { pub fn aws_s3_request_acquire (request : * mut aws_s3_request) -> * mut aws_s3_request ; } unsafe extern "C" { pub fn aws_s3_request_release (request : * mut aws_s3_request) -> * mut aws_s3_request ; } unsafe extern "C" { pub fn aws_s3_request_metrics_new (allocator : * mut aws_allocator) -> * mut aws_s3_request_metrics ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_state { AWS_S3_META_REQUEST_STATE_ACTIVE = 0 , AWS_S3_META_REQUEST_STATE_FINISHED = 1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_update_flags { AWS_S3_META_REQUEST_UPDATE_FLAG_CONSERVATIVE = 2 , } pub type aws_s3_meta_request_prepare_request_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_s3_prepare_request_payload { pub allocator : * mut aws_allocator , pub request : * mut aws_s3_request , pub task : aws_task , pub asyncstep_prepare_request : * mut aws_future_void , pub callback : aws_s3_meta_request_prepare_request_callback_fn , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_prepare_request_payload"] [:: std :: mem :: size_of :: < aws_s3_prepare_request_payload > () - 104usize] ; ["Alignment of aws_s3_prepare_request_payload"] [:: std :: mem :: align_of :: < aws_s3_prepare_request_payload > () - 8usize] ; ["Offset of field: aws_s3_prepare_request_payload::allocator"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , allocator) - 0usize] ; ["Offset of field: aws_s3_prepare_request_payload::request"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , request) - 8usize] ; ["Offset of field: aws_s3_prepare_request_payload::task"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , task) - 16usize] ; ["Offset of field: aws_s3_prepare_request_payload::asyncstep_prepare_request"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , asyncstep_prepare_request) - 80usize] ; ["Offset of field: aws_s3_prepare_request_payload::callback"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , callback) - 88usize] ; ["Offset of field: aws_s3_prepare_request_payload::user_data"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , user_data) - 96usize] ; } ; impl Default for aws_s3_prepare_request_payload { 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 (Copy , Clone)] pub struct aws_s3_meta_request_event { pub type_ : aws_s3_meta_request_event_aws_s3_meta_request_event_type , pub u : aws_s3_meta_request_event__bindgen_ty_1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_event_aws_s3_meta_request_event_type { AWS_S3_META_REQUEST_EVENT_RESPONSE_BODY = 0 , AWS_S3_META_REQUEST_EVENT_PROGRESS = 1 , AWS_S3_META_REQUEST_EVENT_TELEMETRY = 2 , } # [repr (C)] # [derive (Copy , Clone)] pub union aws_s3_meta_request_event__bindgen_ty_1 { pub response_body : aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 , pub progress : aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 , pub telemetry : aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 { pub completed_request : * mut aws_s3_request , pub bytes_delivered : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 > () - 16usize] ; ["Alignment of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1::completed_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 , completed_request) - 0usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1::bytes_delivered"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 , bytes_delivered) - 8usize] ; } ; impl Default for aws_s3_meta_request_event__bindgen_ty_1__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 () } } } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 { pub info : aws_s3_meta_request_progress , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 > () - 16usize] ; ["Alignment of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2::info"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 , info) - 0usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 { pub metrics : * mut aws_s3_request_metrics , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 > () - 8usize] ; ["Alignment of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3::metrics"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 , metrics) - 0usize] ; } ; impl Default for aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 { 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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event__bindgen_ty_1 > () - 16usize] ; ["Alignment of aws_s3_meta_request_event__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1::response_body"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1 , response_body) - 0usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1::progress"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1 , progress) - 0usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1::telemetry"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1 , telemetry) - 0usize] ; } ; impl Default for aws_s3_meta_request_event__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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event > () - 24usize] ; ["Alignment of aws_s3_meta_request_event"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event::type_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event , type_) - 0usize] ; ["Offset of field: aws_s3_meta_request_event::u"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event , u) - 8usize] ; } ; impl Default for aws_s3_meta_request_event { 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)] pub struct aws_s3_meta_request_vtable { pub update : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , flags : u32 , out_request : * mut * mut aws_s3_request) -> bool > , pub schedule_prepare_request : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , callback : aws_s3_meta_request_prepare_request_callback_fn , user_data : * mut :: libc :: c_void) > , pub prepare_request : :: std :: option :: Option < unsafe extern "C" fn (request : * mut aws_s3_request) -> * mut aws_future_void > , pub init_signing_date_time : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , date_time : * mut aws_date_time) > , pub sign_request : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , on_signing_complete : aws_signing_complete_fn , user_data : * mut :: libc :: c_void) > , pub send_request_finish : :: std :: option :: Option < unsafe extern "C" fn (connection : * mut aws_s3_connection , stream : * mut aws_http_stream , error_code : :: libc :: c_int) > , pub finished_request : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , error_code : :: libc :: c_int) > , pub finish : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request) > , pub destroy : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut aws_s3_meta_request) > , pub pause : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , resume_token : * mut * mut aws_s3_meta_request_resume_token) -> :: libc :: c_int > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_vtable"] [:: std :: mem :: size_of :: < aws_s3_meta_request_vtable > () - 80usize] ; ["Alignment of aws_s3_meta_request_vtable"] [:: std :: mem :: align_of :: < aws_s3_meta_request_vtable > () - 8usize] ; ["Offset of field: aws_s3_meta_request_vtable::update"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , update) - 0usize] ; ["Offset of field: aws_s3_meta_request_vtable::schedule_prepare_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , schedule_prepare_request) - 8usize] ; ["Offset of field: aws_s3_meta_request_vtable::prepare_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , prepare_request) - 16usize] ; ["Offset of field: aws_s3_meta_request_vtable::init_signing_date_time"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , init_signing_date_time) - 24usize] ; ["Offset of field: aws_s3_meta_request_vtable::sign_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , sign_request) - 32usize] ; ["Offset of field: aws_s3_meta_request_vtable::send_request_finish"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , send_request_finish) - 40usize] ; ["Offset of field: aws_s3_meta_request_vtable::finished_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , finished_request) - 48usize] ; ["Offset of field: aws_s3_meta_request_vtable::finish"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , finish) - 56usize] ; ["Offset of field: aws_s3_meta_request_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , destroy) - 64usize] ; ["Offset of field: aws_s3_meta_request_vtable::pause"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , pause) - 72usize] ; } ; # [doc = " This represents one meta request, ie, one accelerated file transfer.  One S3 meta request can represent multiple S3\n requests."] # [repr (C)] pub struct aws_s3_meta_request { pub allocator : * mut aws_allocator , pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , pub vtable : * mut aws_s3_meta_request_vtable , pub initial_request_message : * mut aws_http_message , pub request_body_async_stream : * mut aws_async_input_stream , pub request_body_parallel_stream : * mut aws_parallel_input_stream , pub request_body_using_async_writes : bool , pub part_size : usize , pub max_active_connections_override : u32 , pub cached_signing_config : * mut aws_cached_signing_config_aws , pub client : * mut aws_s3_client , pub endpoint : * mut aws_s3_endpoint , pub num_requests_network : aws_atomic_var , pub io_event_loop : * mut aws_event_loop , pub user_data : * mut :: libc :: c_void , pub headers_callback : aws_s3_meta_request_headers_callback_fn , pub body_callback : aws_s3_meta_request_receive_body_callback_fn , pub body_callback_ex : aws_s3_meta_request_receive_body_callback_ex_fn , pub finish_callback : aws_s3_meta_request_finish_fn , pub shutdown_callback : aws_s3_meta_request_shutdown_fn , pub progress_callback : aws_s3_meta_request_progress_fn , pub telemetry_callback : aws_s3_meta_request_telemetry_fn , pub upload_review_callback : aws_s3_meta_request_upload_review_fn , pub type_ : aws_s3_meta_request_type , pub s3express_session_host : * mut aws_string , pub is_express : bool , pub buffer_pool_optimized : bool , pub num_request_being_prepared : aws_atomic_var , pub synced_data : aws_s3_meta_request__bindgen_ty_1 , pub client_process_work_threaded_data : aws_s3_meta_request__bindgen_ty_2 , pub io_threaded_data : aws_s3_meta_request__bindgen_ty_3 , pub should_compute_content_md5 : bool , pub checksum_config : aws_s3_meta_request_checksum_config_storage , pub meta_request_level_response_header_checksum : aws_byte_buf , pub meta_request_level_running_response_sum : * mut aws_s3_checksum , pub recv_file : * mut FILE , pub recv_filepath : * mut aws_string , pub recv_file_delete_on_failure : bool , pub fio_opts : aws_s3_file_io_options , } # [repr (C)] pub struct aws_s3_meta_request__bindgen_ty_1 { pub lock : aws_mutex , pub pending_body_streaming_requests : aws_priority_queue , pub state : aws_s3_meta_request_state , pub read_window_running_total : u64 , pub next_streaming_part : u32 , pub num_parts_delivery_sent : u32 , pub num_parts_delivery_completed : u32 , pub event_delivery_task : aws_task , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub event_delivery_array : aws_array_list , pub event_delivery_active : bool , pub finish_result : aws_s3_meta_request_result , pub _bitfield_align_2 : [u8 ; 0] , pub _bitfield_2 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub cancellable_http_streams_list : aws_linked_list , pub pending_buffer_futures : aws_linked_list , pub async_write : aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data { pub ready_to_send : bool , pub eof : bool , pub buffered_data : aws_byte_buf , pub buffered_data_ticket : * mut aws_s3_buffer_ticket , pub waker : aws_simple_completion_callback , pub waker_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data"] [:: std :: mem :: size_of :: < aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data > () - 64usize] ; ["Alignment of aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data"] [:: std :: mem :: align_of :: < aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data > () - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::ready_to_send"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , ready_to_send) - 0usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::eof"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , eof) - 1usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::buffered_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , buffered_data) - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::buffered_data_ticket"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , buffered_data_ticket) - 40usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::waker"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , waker) - 48usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::waker_user_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , waker_user_data) - 56usize] ; } ; impl Default for aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_meta_request__bindgen_ty_1 > () - 464usize] ; ["Alignment of aws_s3_meta_request__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_meta_request__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::lock"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , lock) - 0usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::pending_body_streaming_requests"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , pending_body_streaming_requests) - 48usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::state"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , state) - 136usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::read_window_running_total"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , read_window_running_total) - 144usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::next_streaming_part"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , next_streaming_part) - 152usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::num_parts_delivery_sent"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , num_parts_delivery_sent) - 156usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::num_parts_delivery_completed"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , num_parts_delivery_completed) - 160usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::event_delivery_task"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , event_delivery_task) - 168usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::event_delivery_array"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , event_delivery_array) - 240usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::event_delivery_active"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , event_delivery_active) - 280usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::finish_result"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , finish_result) - 288usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::cancellable_http_streams_list"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , cancellable_http_streams_list) - 336usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::pending_buffer_futures"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , pending_buffer_futures) - 368usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::async_write"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , async_write) - 400usize] ; } ; impl Default for aws_s3_meta_request__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 () } } } impl aws_s3_meta_request__bindgen_ty_1 { # [inline] pub fn event_delivery_task_scheduled (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_event_delivery_task_scheduled (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn event_delivery_task_scheduled_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_event_delivery_task_scheduled_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (event_delivery_task_scheduled : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let event_delivery_task_scheduled : u32 = unsafe { :: std :: mem :: transmute (event_delivery_task_scheduled) } ; event_delivery_task_scheduled as u64 }) ; __bindgen_bitfield_unit } # [inline] pub fn finish_result_set (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_2 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_finish_result_set (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_2 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn finish_result_set_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_2) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_finish_result_set_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_2) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_2 (finish_result_set : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let finish_result_set : u32 = unsafe { :: std :: mem :: transmute (finish_result_set) } ; finish_result_set as u64 }) ; __bindgen_bitfield_unit } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request__bindgen_ty_2 { pub node : aws_linked_list_node , pub scheduled : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_meta_request__bindgen_ty_2 > () - 24usize] ; ["Alignment of aws_s3_meta_request__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_meta_request__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_2::node"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_2 , node) - 0usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_2::scheduled"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_2 , scheduled) - 16usize] ; } ; impl Default for aws_s3_meta_request__bindgen_ty_2 { 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)] pub struct aws_s3_meta_request__bindgen_ty_3 { pub event_delivery_array : aws_array_list , pub next_deliver_range_start : u64 , pub num_bytes_delivery_completed : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_meta_request__bindgen_ty_3 > () - 56usize] ; ["Alignment of aws_s3_meta_request__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_meta_request__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_3::event_delivery_array"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_3 , event_delivery_array) - 0usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_3::next_deliver_range_start"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_3 , next_deliver_range_start) - 40usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_3::num_bytes_delivery_completed"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_3 , num_bytes_delivery_completed) - 48usize] ; } ; impl Default for aws_s3_meta_request__bindgen_ty_3 { 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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request"] [:: std :: mem :: size_of :: < aws_s3_meta_request > () - 960usize] ; ["Alignment of aws_s3_meta_request"] [:: std :: mem :: align_of :: < aws_s3_meta_request > () - 8usize] ; ["Offset of field: aws_s3_meta_request::allocator"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , allocator) - 0usize] ; ["Offset of field: aws_s3_meta_request::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , ref_count) - 8usize] ; ["Offset of field: aws_s3_meta_request::impl_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , impl_) - 32usize] ; ["Offset of field: aws_s3_meta_request::vtable"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , vtable) - 40usize] ; ["Offset of field: aws_s3_meta_request::initial_request_message"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , initial_request_message) - 48usize] ; ["Offset of field: aws_s3_meta_request::request_body_async_stream"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , request_body_async_stream) - 56usize] ; ["Offset of field: aws_s3_meta_request::request_body_parallel_stream"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , request_body_parallel_stream) - 64usize] ; ["Offset of field: aws_s3_meta_request::request_body_using_async_writes"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , request_body_using_async_writes) - 72usize] ; ["Offset of field: aws_s3_meta_request::part_size"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , part_size) - 80usize] ; ["Offset of field: aws_s3_meta_request::max_active_connections_override"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , max_active_connections_override) - 88usize] ; ["Offset of field: aws_s3_meta_request::cached_signing_config"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , cached_signing_config) - 96usize] ; ["Offset of field: aws_s3_meta_request::client"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , client) - 104usize] ; ["Offset of field: aws_s3_meta_request::endpoint"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , endpoint) - 112usize] ; ["Offset of field: aws_s3_meta_request::num_requests_network"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , num_requests_network) - 120usize] ; ["Offset of field: aws_s3_meta_request::io_event_loop"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , io_event_loop) - 128usize] ; ["Offset of field: aws_s3_meta_request::user_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , user_data) - 136usize] ; ["Offset of field: aws_s3_meta_request::headers_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , headers_callback) - 144usize] ; ["Offset of field: aws_s3_meta_request::body_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , body_callback) - 152usize] ; ["Offset of field: aws_s3_meta_request::body_callback_ex"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , body_callback_ex) - 160usize] ; ["Offset of field: aws_s3_meta_request::finish_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , finish_callback) - 168usize] ; ["Offset of field: aws_s3_meta_request::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , shutdown_callback) - 176usize] ; ["Offset of field: aws_s3_meta_request::progress_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , progress_callback) - 184usize] ; ["Offset of field: aws_s3_meta_request::telemetry_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , telemetry_callback) - 192usize] ; ["Offset of field: aws_s3_meta_request::upload_review_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , upload_review_callback) - 200usize] ; ["Offset of field: aws_s3_meta_request::type_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , type_) - 208usize] ; ["Offset of field: aws_s3_meta_request::s3express_session_host"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , s3express_session_host) - 216usize] ; ["Offset of field: aws_s3_meta_request::is_express"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , is_express) - 224usize] ; ["Offset of field: aws_s3_meta_request::buffer_pool_optimized"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , buffer_pool_optimized) - 225usize] ; ["Offset of field: aws_s3_meta_request::num_request_being_prepared"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , num_request_being_prepared) - 232usize] ; ["Offset of field: aws_s3_meta_request::synced_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , synced_data) - 240usize] ; ["Offset of field: aws_s3_meta_request::client_process_work_threaded_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , client_process_work_threaded_data) - 704usize] ; ["Offset of field: aws_s3_meta_request::io_threaded_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , io_threaded_data) - 728usize] ; ["Offset of field: aws_s3_meta_request::should_compute_content_md5"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , should_compute_content_md5) - 784usize] ; ["Offset of field: aws_s3_meta_request::checksum_config"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , checksum_config) - 792usize] ; ["Offset of field: aws_s3_meta_request::meta_request_level_response_header_checksum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , meta_request_level_response_header_checksum) - 872usize] ; ["Offset of field: aws_s3_meta_request::meta_request_level_running_response_sum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , meta_request_level_running_response_sum) - 904usize] ; ["Offset of field: aws_s3_meta_request::recv_file"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , recv_file) - 912usize] ; ["Offset of field: aws_s3_meta_request::recv_filepath"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , recv_filepath) - 920usize] ; ["Offset of field: aws_s3_meta_request::recv_file_delete_on_failure"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , recv_file_delete_on_failure) - 928usize] ; ["Offset of field: aws_s3_meta_request::fio_opts"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , fio_opts) - 936usize] ; } ; impl Default for aws_s3_meta_request { 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)] pub struct aws_s3_mpu_part_info { pub size : u64 , pub etag : * mut aws_string , pub checksum_context : * mut aws_s3_upload_request_checksum_context , pub was_previously_uploaded : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_mpu_part_info"] [:: std :: mem :: size_of :: < aws_s3_mpu_part_info > () - 32usize] ; ["Alignment of aws_s3_mpu_part_info"] [:: std :: mem :: align_of :: < aws_s3_mpu_part_info > () - 8usize] ; ["Offset of field: aws_s3_mpu_part_info::size"] [:: std :: mem :: offset_of ! (aws_s3_mpu_part_info , size) - 0usize] ; ["Offset of field: aws_s3_mpu_part_info::etag"] [:: std :: mem :: offset_of ! (aws_s3_mpu_part_info , etag) - 8usize] ; ["Offset of field: aws_s3_mpu_part_info::checksum_context"] [:: std :: mem :: offset_of ! (aws_s3_mpu_part_info , checksum_context) - 16usize] ; ["Offset of field: aws_s3_mpu_part_info::was_previously_uploaded"] [:: std :: mem :: offset_of ! (aws_s3_mpu_part_info , was_previously_uploaded) - 24usize] ; } ; impl Default for aws_s3_mpu_part_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 () } } } unsafe extern "C" { pub fn aws_s3_meta_request_init_base (allocator : * mut aws_allocator , client : * mut aws_s3_client , part_size : usize , should_compute_content_md5 : bool , should_default_streaming : bool , options : * const aws_s3_meta_request_options , impl_ : * mut :: libc :: c_void , vtable : * mut aws_s3_meta_request_vtable , base_type : * mut aws_s3_meta_request) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_meta_request_is_active (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_is_finished (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_has_finish_result (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_lock_synced_data (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_unlock_synced_data (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_update (meta_request : * mut aws_s3_meta_request , flags : u32 , out_request : * mut * mut aws_s3_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_prepare_request (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , callback : aws_s3_meta_request_prepare_request_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_s3_meta_request_send_request (meta_request : * mut aws_s3_meta_request , connection : * mut aws_s3_connection) ; } unsafe extern "C" { pub fn aws_s3_meta_request_init_signing_date_time_default (meta_request : * mut aws_s3_meta_request , date_time : * mut aws_date_time) ; } unsafe extern "C" { pub fn aws_s3_meta_request_sign_request_default_impl (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , on_signing_complete : aws_signing_complete_fn , user_data : * mut :: libc :: c_void , disable_s3_express_signing : bool) ; } unsafe extern "C" { pub fn aws_s3_meta_request_sign_request_default (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , on_signing_complete : aws_signing_complete_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_s3_meta_request_send_request_finish_default (connection : * mut aws_s3_connection , stream : * mut aws_http_stream , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_finished_request (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_stream_response_body_synced (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_add_event_for_delivery_synced (meta_request : * mut aws_s3_meta_request , event : * const aws_s3_meta_request_event) ; } unsafe extern "C" { pub fn aws_s3_meta_request_are_events_out_for_delivery_synced (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_cancel_cancellable_requests_synced (meta_request : * mut aws_s3_meta_request , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_cancel_pending_buffer_futures_synced (meta_request : * mut aws_s3_meta_request , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_read_body (meta_request : * mut aws_s3_meta_request , offset : u64 , buffer : * mut aws_byte_buf) -> * mut aws_future_bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_set_fail_synced (meta_request : * mut aws_s3_meta_request , failed_request : * mut aws_s3_request , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_set_success_synced (meta_request : * mut aws_s3_meta_request , response_status : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_has_finish_result_synced (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_finish (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_finish_default (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_result_setup (meta_request : * mut aws_s3_meta_request , result : * mut aws_s3_meta_request_result , failed_request : * mut aws_s3_request , response_status : :: libc :: c_int , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_result_clean_up (meta_request : * mut aws_s3_meta_request , result : * mut aws_s3_meta_request_result) ; } unsafe extern "C" { pub fn aws_s3_meta_request_checksum_config_has_algorithm (meta_request : * mut aws_s3_meta_request , algorithm : aws_s3_checksum_algorithm) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_schedule_prepare_request_default_impl (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , parallel : bool , callback : aws_s3_meta_request_prepare_request_callback_fn , user_data : * mut :: libc :: c_void) ; } pub type __builtin_va_list = [__va_list_tag ; 1usize] ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct __va_list_tag { pub gp_offset : :: libc :: c_uint , pub fp_offset : :: libc :: c_uint , pub overflow_arg_area : * mut :: libc :: c_void , pub reg_save_area : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of __va_list_tag"] [:: std :: mem :: size_of :: < __va_list_tag > () - 24usize] ; ["Alignment of __va_list_tag"] [:: std :: mem :: align_of :: < __va_list_tag > () - 8usize] ; ["Offset of field: __va_list_tag::gp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , gp_offset) - 0usize] ; ["Offset of field: __va_list_tag::fp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , fp_offset) - 4usize] ; ["Offset of field: __va_list_tag::overflow_arg_area"] [:: std :: mem :: offset_of ! (__va_list_tag , overflow_arg_area) - 8usize] ; ["Offset of field: __va_list_tag::reg_save_area"] [:: std :: mem :: offset_of ! (__va_list_tag , reg_save_area) - 16usize] ; } ; impl Default for __va_list_tag { 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 = " (Optional)\n Use a cached merged profile collection. A merge collection has both config file\n (~/.aws/config) and credentials file based profile collection (~/.aws/credentials) using\n `aws_profile_collection_new_from_merge`.\n If this option is provided, `config_file_name_override` and `credentials_file_name_override` will be ignored."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_profile_collection { pub _address : u8 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_tls_ctx { pub _address : u8 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_parallel_input_stream { pub _address : u8 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_cached_signing_config_aws { pub _address : u8 , }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             +                +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unclosed HTML tag `bool`
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/mountpoint-s3-crt-sys-ba8805edaea6a745/out/bindings.rs:5:165119
[INFO] [stdout]   |
[INFO] [stdout] 5 | ... aws_future_bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_set_...
[INFO] [stdout]   |                                                                  ^^^^^^
[INFO] [stdout]   |
[INFO] [stdout] help: try marking as source code
[INFO] [stdout]   |
[INFO] [stdout] 5 | # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > where Storage : AsRef < [u8] > + AsMut < [u8] >, { # [inline] fn extract_bit (byte : u8 , index : usize) -> bool { let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn get_bit (& self , index : usize) -> bool { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = self . storage . as_ref () [byte_index] ; Self :: extract_bit (byte , index) } # [inline] pub unsafe fn raw_get_bit (this : * const Self , index : usize) -> bool { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { * (core :: ptr :: addr_of ! ((* this) . storage) as * const u8) . offset (byte_index as isize) } ; Self :: extract_bit (byte , index) } # [inline] fn change_bit (byte : u8 , index : usize , val : bool) -> u8 { let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { byte | mask } else { byte & ! mask } } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; * byte = Self :: change_bit (* byte , index , val) ; } # [inline] pub unsafe fn raw_set_bit (this : * mut Self , index : usize , val : bool) { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { (core :: ptr :: addr_of_mut ! ((* this) . storage) as * mut u8) . offset (byte_index as isize) } ; unsafe { * byte = Self :: change_bit (* byte , index , val) } ; } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; val |= 1 << index ; } } val } # [inline] pub unsafe fn raw_get (this : * const Self , bit_offset : usize , bit_width : u8 ,) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if unsafe { Self :: raw_get_bit (this , i + bit_offset) } { let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; val |= 1 << index ; } } val } # [inline] pub fn set (& mut self , bit_offset : usize , bit_width : u8 , val : u64) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } # [inline] pub unsafe fn raw_set (this : * mut Self , bit_offset : usize , bit_width : u8 , val : u64 ,) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; unsafe { Self :: raw_set_bit (this , index + bit_offset , val_bit_is_set) } ; } } } pub const PRInSTR : & [u8 ; 5] = b"%.*s\0" ; pub const AWS_PACKAGE_SLOTS : i32 = 32 ; pub const AWS_C_COMMON_PACKAGE_ID : i32 = 0 ; pub const AWS_OP_SUCCESS : i32 = 0 ; pub const AWS_OP_ERR : i32 = - 1 ; pub const AWS_ERROR_ENUM_STRIDE_BITS : i32 = 10 ; pub const AWS_ERROR_ENUM_STRIDE : i32 = 1024 ; pub const SIZE_BITS : i32 = 64 ; pub const AWS_C_IO_PACKAGE_ID : i32 = 1 ; pub const AWS_THREAD_NAME_RECOMMENDED_STRLEN : i32 = 15 ; pub const AWS_THREAD_ONCE_STATIC_INIT : i32 = 0 ; pub const AWS_LOG_LEVEL_NONE : i32 = 0 ; pub const AWS_LOG_LEVEL_FATAL : i32 = 1 ; pub const AWS_LOG_LEVEL_ERROR : i32 = 2 ; pub const AWS_LOG_LEVEL_WARN : i32 = 3 ; pub const AWS_LOG_LEVEL_INFO : i32 = 4 ; pub const AWS_LOG_LEVEL_DEBUG : i32 = 5 ; pub const AWS_LOG_LEVEL_TRACE : i32 = 6 ; pub const AWS_C_SDKUTILS_PACKAGE_ID : i32 = 15 ; pub const AWS_C_AUTH_PACKAGE_ID : i32 = 6 ; pub const AWS_C_HTTP_PACKAGE_ID : i32 = 2 ; pub const AWS_SHA512_LEN : i32 = 64 ; pub const AWS_SHA256_LEN : i32 = 32 ; pub const AWS_SHA1_LEN : i32 = 20 ; pub const AWS_MD5_LEN : i32 = 16 ; pub const AWS_HTTP2_DEFAULT_MAX_CLOSED_STREAMS : i32 = 32 ; pub const AWS_HTTP2_PING_DATA_SIZE : i32 = 8 ; pub const AWS_HTTP2_SETTINGS_COUNT : i32 = 6 ; pub const AWS_C_S3_PACKAGE_ID : i32 = 14 ; pub const AWS_S3_CLIENT_VERSION : & [u8 ; 6] = b"0.1.x\0" ; pub const AWS_CACHE_LINE : _bindgen_ty_18 = _bindgen_ty_18 :: AWS_CACHE_LINE ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_18 { AWS_CACHE_LINE = 64 , } pub type __gnuc_va_list = __builtin_va_list ; pub type va_list = __gnuc_va_list ; unsafe extern "C" { pub fn aws_fatal_assert (cond_str : * const :: libc :: c_char , file : * const :: libc :: c_char , line : :: libc :: c_int) -> ! ; } pub type pthread_once_t = :: libc :: 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)] pub struct aws_allocator { pub mem_acquire : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , size : usize) -> * mut :: libc :: c_void > , pub mem_release : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , ptr : * mut :: libc :: c_void) > , pub mem_realloc : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , oldptr : * mut :: libc :: c_void , oldsize : usize , newsize : usize) -> * mut :: libc :: c_void > , pub mem_calloc : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , num : usize , size : usize) -> * mut :: libc :: c_void > , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_allocator"] [:: std :: mem :: size_of :: < aws_allocator > () - 40usize] ; ["Alignment of aws_allocator"] [:: std :: mem :: align_of :: < aws_allocator > () - 8usize] ; ["Offset of field: aws_allocator::mem_acquire"] [:: std :: mem :: offset_of ! (aws_allocator , mem_acquire) - 0usize] ; ["Offset of field: aws_allocator::mem_release"] [:: std :: mem :: offset_of ! (aws_allocator , mem_release) - 8usize] ; ["Offset of field: aws_allocator::mem_realloc"] [:: std :: mem :: offset_of ! (aws_allocator , mem_realloc) - 16usize] ; ["Offset of field: aws_allocator::mem_calloc"] [:: std :: mem :: offset_of ! (aws_allocator , mem_calloc) - 24usize] ; ["Offset of field: aws_allocator::impl_"] [:: std :: mem :: offset_of ! (aws_allocator , impl_) - 32usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Inexpensive (constant time) check of data-structure invariants."] pub fn aws_allocator_is_valid (alloc : * const aws_allocator) -> bool ; } unsafe extern "C" { pub fn aws_default_allocator () -> * mut aws_allocator ; } unsafe extern "C" { pub fn aws_aligned_allocator () -> * mut aws_allocator ; } unsafe 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\n NULL. In later versions, if allocator->mem_acquire() returns NULL, this function will assert and exit. To handle\n conditions where OOM is not a fatal error, allocator->mem_acquire() is responsible for finding/reclaiming/running a\n GC etc...before returning."] pub fn aws_mem_acquire (allocator : * mut aws_allocator , size : usize) -> * mut :: libc :: c_void ; } unsafe 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\n to zero. In versions v0.6.8 and prior, this function was allowed to return NULL.\n In later versions, if allocator->mem_calloc() returns NULL, this function will assert and exit. To handle\n conditions where OOM is not a fatal error, allocator->mem_calloc() is responsible for finding/reclaiming/running a\n GC etc...before returning."] pub fn aws_mem_calloc (allocator : * mut aws_allocator , num : usize , size : usize) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Allocates many chunks of bytes into a single block. Expects to be called with alternating void ** (dest), size_t\n (size). The first void ** will be set to the root of the allocation. Alignment is assumed to be sizeof(intmax_t).\n\n This is useful for allocating structs using the pimpl pattern, as you may allocate the public object and impl object\n in the same contiguous block of memory.\n\n Returns a pointer to the allocation.\n\n In versions v0.6.8 and prior, this function was allowed to return\n NULL. In later versions, if allocator->mem_acquire() returns NULL, this function will assert and exit. To handle\n conditions where OOM is not a fatal error, allocator->mem_acquire() is responsible for finding/reclaiming/running a\n GC etc...before returning."] pub fn aws_mem_acquire_many (allocator : * mut aws_allocator , count : usize , ...) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Releases ptr back to whatever allocated it.\n Nothing happens if ptr is NULL."] pub fn aws_mem_release (allocator : * mut aws_allocator , ptr : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Attempts to adjust the size of the pointed-to memory buffer from oldsize to\n newsize. The pointer (*ptr) may be changed if the memory needs to be\n reallocated.\n\n In versions v0.6.8 and prior, this function was allowed to return\n NULL. In later versions, if allocator->mem_realloc() returns NULL, this function will assert and exit. To handle\n conditions where OOM is not a fatal error, allocator->mem_realloc() is responsible for finding/reclaiming/running a\n GC etc...before returning."] pub fn aws_mem_realloc (allocator : * mut aws_allocator , ptr : * mut * mut :: libc :: c_void , oldsize : usize , newsize : usize) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_mem_trace_level { AWS_MEMTRACE_NONE = 0 , AWS_MEMTRACE_BYTES = 1 , AWS_MEMTRACE_STACKS = 2 , } unsafe 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 ; } unsafe extern "C" { pub fn aws_mem_tracer_destroy (trace_allocator : * mut aws_allocator) -> * mut aws_allocator ; } unsafe extern "C" { pub fn aws_mem_tracer_dump (trace_allocator : * mut aws_allocator) ; } unsafe extern "C" { pub fn aws_mem_tracer_bytes (trace_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_mem_tracer_count (trace_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_small_block_allocator_new (allocator : * mut aws_allocator , multi_threaded : bool) -> * mut aws_allocator ; } unsafe extern "C" { pub fn aws_small_block_allocator_destroy (sba_allocator : * mut aws_allocator) ; } unsafe extern "C" { pub fn aws_small_block_allocator_bytes_active (sba_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_small_block_allocator_bytes_reserved (sba_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_small_block_allocator_page_size (sba_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_small_block_allocator_page_size_available (sba_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_explicit_aligned_allocator_new (alignment : usize) -> * mut aws_allocator ; } unsafe extern "C" { pub fn aws_explicit_aligned_allocator_destroy (aligned_alloc : * mut aws_allocator) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_error_info { pub error_code : :: libc :: c_int , pub literal_name : * const :: libc :: c_char , pub error_str : * const :: libc :: c_char , pub lib_name : * const :: libc :: c_char , pub formatted_name : * const :: libc :: c_char , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_error_info"] [:: std :: mem :: size_of :: < aws_error_info > () - 40usize] ; ["Alignment of aws_error_info"] [:: std :: mem :: align_of :: < aws_error_info > () - 8usize] ; ["Offset of field: aws_error_info::error_code"] [:: std :: mem :: offset_of ! (aws_error_info , error_code) - 0usize] ; ["Offset of field: aws_error_info::literal_name"] [:: std :: mem :: offset_of ! (aws_error_info , literal_name) - 8usize] ; ["Offset of field: aws_error_info::error_str"] [:: std :: mem :: offset_of ! (aws_error_info , error_str) - 16usize] ; ["Offset of field: aws_error_info::lib_name"] [:: std :: mem :: offset_of ! (aws_error_info , lib_name) - 24usize] ; ["Offset of field: aws_error_info::formatted_name"] [:: std :: mem :: offset_of ! (aws_error_info , formatted_name) - 32usize] ; } ; 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)] pub struct aws_error_info_list { pub error_list : * const aws_error_info , pub count : u16 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_error_info_list"] [:: std :: mem :: size_of :: < aws_error_info_list > () - 16usize] ; ["Alignment of aws_error_info_list"] [:: std :: mem :: align_of :: < aws_error_info_list > () - 8usize] ; ["Offset of field: aws_error_info_list::error_list"] [:: std :: mem :: offset_of ! (aws_error_info_list , error_list) - 0usize] ; ["Offset of field: aws_error_info_list::count"] [:: std :: mem :: offset_of ! (aws_error_info_list , count) - 8usize] ; } ; 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 : :: libc :: c_int , ctx : * mut :: libc :: c_void) > ; unsafe extern "C" { pub fn aws_last_error () -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_error_str (err : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { pub fn aws_error_name (err : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { pub fn aws_error_lib_name (err : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { pub fn aws_error_debug_str (err : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { pub fn aws_raise_error_private (err : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_raise_error (err : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_reset_error () ; } unsafe extern "C" { pub fn aws_restore_error (err : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_set_global_error_handler_fn (handler : aws_error_handler_fn , ctx : * mut :: libc :: c_void) -> aws_error_handler_fn ; } unsafe extern "C" { pub fn aws_set_thread_local_error_handler_fn (handler : aws_error_handler_fn , ctx : * mut :: libc :: c_void) -> aws_error_handler_fn ; } unsafe extern "C" { # [doc = " TODO: this needs to be a private function (wait till we have the cmake story\n better before moving it though). It should be external for the purpose of\n other libs we own, but customers should not be able to hit it without going\n out of their way to do so."] pub fn aws_register_error_info (error_info : * const aws_error_info_list) ; } unsafe extern "C" { pub fn aws_unregister_error_info (error_info : * const aws_error_info_list) ; } unsafe extern "C" { # [doc = " Convert a c library io error into an aws error, and raise it.\n If no conversion is found, fallback_aws_error_code is raised.\n Always returns AWS_OP_ERR."] pub fn aws_translate_and_raise_io_error_or (error_no : :: libc :: c_int , fallback_aws_error_code : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Convert a c library io error into an aws error, and raise it.\n If no conversion is found, AWS_ERROR_SYS_CALL_FAILURE is raised.\n Always returns AWS_OP_ERR."] pub fn aws_translate_and_raise_io_error (error_no : :: libc :: c_int) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_common_error { AWS_ERROR_SUCCESS = 0 , AWS_ERROR_OOM = 1 , AWS_ERROR_NO_SPACE = 2 , AWS_ERROR_UNKNOWN = 3 , AWS_ERROR_SHORT_BUFFER = 4 , AWS_ERROR_OVERFLOW_DETECTED = 5 , AWS_ERROR_UNSUPPORTED_OPERATION = 6 , AWS_ERROR_INVALID_BUFFER_SIZE = 7 , AWS_ERROR_INVALID_HEX_STR = 8 , AWS_ERROR_INVALID_BASE64_STR = 9 , AWS_ERROR_INVALID_INDEX = 10 , AWS_ERROR_THREAD_INVALID_SETTINGS = 11 , AWS_ERROR_THREAD_INSUFFICIENT_RESOURCE = 12 , AWS_ERROR_THREAD_NO_PERMISSIONS = 13 , AWS_ERROR_THREAD_NOT_JOINABLE = 14 , AWS_ERROR_THREAD_NO_SUCH_THREAD_ID = 15 , AWS_ERROR_THREAD_DEADLOCK_DETECTED = 16 , AWS_ERROR_MUTEX_NOT_INIT = 17 , AWS_ERROR_MUTEX_TIMEOUT = 18 , AWS_ERROR_MUTEX_CALLER_NOT_OWNER = 19 , AWS_ERROR_MUTEX_FAILED = 20 , AWS_ERROR_COND_VARIABLE_INIT_FAILED = 21 , AWS_ERROR_COND_VARIABLE_TIMED_OUT = 22 , AWS_ERROR_COND_VARIABLE_ERROR_UNKNOWN = 23 , AWS_ERROR_CLOCK_FAILURE = 24 , AWS_ERROR_LIST_EMPTY = 25 , AWS_ERROR_DEST_COPY_TOO_SMALL = 26 , AWS_ERROR_LIST_EXCEEDS_MAX_SIZE = 27 , AWS_ERROR_LIST_STATIC_MODE_CANT_SHRINK = 28 , AWS_ERROR_PRIORITY_QUEUE_FULL = 29 , AWS_ERROR_PRIORITY_QUEUE_EMPTY = 30 , AWS_ERROR_PRIORITY_QUEUE_BAD_NODE = 31 , AWS_ERROR_HASHTBL_ITEM_NOT_FOUND = 32 , AWS_ERROR_INVALID_DATE_STR = 33 , AWS_ERROR_INVALID_ARGUMENT = 34 , AWS_ERROR_RANDOM_GEN_FAILED = 35 , AWS_ERROR_MALFORMED_INPUT_STRING = 36 , AWS_ERROR_UNIMPLEMENTED = 37 , AWS_ERROR_INVALID_STATE = 38 , AWS_ERROR_ENVIRONMENT_GET = 39 , AWS_ERROR_ENVIRONMENT_SET = 40 , AWS_ERROR_ENVIRONMENT_UNSET = 41 , AWS_ERROR_STREAM_UNSEEKABLE = 42 , AWS_ERROR_NO_PERMISSION = 43 , AWS_ERROR_FILE_INVALID_PATH = 44 , AWS_ERROR_MAX_FDS_EXCEEDED = 45 , AWS_ERROR_SYS_CALL_FAILURE = 46 , AWS_ERROR_C_STRING_BUFFER_NOT_NULL_TERMINATED = 47 , AWS_ERROR_STRING_MATCH_NOT_FOUND = 48 , AWS_ERROR_DIVIDE_BY_ZERO = 49 , AWS_ERROR_INVALID_FILE_HANDLE = 50 , AWS_ERROR_OPERATION_INTERUPTED = 51 , AWS_ERROR_DIRECTORY_NOT_EMPTY = 52 , AWS_ERROR_PLATFORM_NOT_SUPPORTED = 53 , AWS_ERROR_INVALID_UTF8 = 54 , AWS_ERROR_GET_HOME_DIRECTORY_FAILED = 55 , AWS_ERROR_INVALID_XML = 56 , AWS_ERROR_FILE_OPEN_FAILURE = 57 , AWS_ERROR_FILE_READ_FAILURE = 58 , AWS_ERROR_FILE_WRITE_FAILURE = 59 , AWS_ERROR_INVALID_CBOR = 60 , AWS_ERROR_CBOR_UNEXPECTED_TYPE = 61 , AWS_ERROR_END_COMMON_RANGE = 1023 , } unsafe extern "C" { # [doc = " Returns whether each byte is zero."] pub fn aws_is_mem_zeroed (buf : * const :: libc :: c_void , bufsize : usize) -> bool ; } unsafe extern "C" { # [doc = " Securely zeroes a memory buffer. This function will attempt to ensure that\n the compiler will not optimize away this zeroing operation."] pub fn aws_secure_zero (pBuf : * mut :: libc :: c_void , bufsize : usize) ; } unsafe extern "C" { # [doc = " Initializes internal data structures used by aws-c-common.\n Must be called before using any functionality in aws-c-common."] pub fn aws_common_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Shuts down the internal data structures used by aws-c-common."] pub fn aws_common_library_clean_up () ; } unsafe extern "C" { pub fn aws_common_fatal_assert_library_initialized () ; } unsafe extern "C" { # [doc = " Multiplies a * b. If the result overflows, returns 2^64 - 1."] pub fn aws_mul_u64_saturating (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { # [doc = " If a * b overflows, returns AWS_OP_ERR; otherwise multiplies\n a * b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_mul_u64_checked (a : u64 , b : u64 , r : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Multiplies a * b. If the result overflows, returns 2^32 - 1."] pub fn aws_mul_u32_saturating (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { # [doc = " If a * b overflows, returns AWS_OP_ERR; otherwise multiplies\n a * b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_mul_u32_checked (a : u32 , b : u32 , r : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Adds a + b.  If the result overflows returns 2^64 - 1."] pub fn aws_add_u64_saturating (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { # [doc = " If a + b overflows, returns AWS_OP_ERR; otherwise adds\n a + b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_add_u64_checked (a : u64 , b : u64 , r : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Adds a + b. If the result overflows returns 2^32 - 1."] pub fn aws_add_u32_saturating (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { # [doc = " If a + b overflows, returns AWS_OP_ERR; otherwise adds\n a + b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_add_u32_checked (a : u32 , b : u32 , r : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Subtracts a - b. If the result overflows returns 0."] pub fn aws_sub_u64_saturating (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { # [doc = " If a - b overflows, returns AWS_OP_ERR; otherwise subtracts\n a - b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_sub_u64_checked (a : u64 , b : u64 , r : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Subtracts a - b. If the result overflows returns 0."] pub fn aws_sub_u32_saturating (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { # [doc = " If a - b overflows, returns AWS_OP_ERR; otherwise subtracts\n a - b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_sub_u32_checked (a : u32 , b : u32 , r : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Multiplies a * b. If the result overflows, returns SIZE_MAX."] pub fn aws_mul_size_saturating (a : usize , b : usize) -> usize ; } unsafe extern "C" { # [doc = " Multiplies a * b and returns the result in *r. If the result\n overflows, returns AWS_OP_ERR; otherwise returns AWS_OP_SUCCESS."] pub fn aws_mul_size_checked (a : usize , b : usize , r : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Adds a + b.  If the result overflows returns SIZE_MAX."] pub fn aws_add_size_saturating (a : usize , b : usize) -> usize ; } unsafe extern "C" { # [doc = " Adds a + b and returns the result in *r. If the result\n overflows, returns AWS_OP_ERR; otherwise returns AWS_OP_SUCCESS."] pub fn aws_add_size_checked (a : usize , b : usize , r : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Adds [num] arguments (expected to be of size_t), and returns the result in *r.\n 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 , ...) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Subtracts a - b. If the result overflows returns 0."] pub fn aws_sub_size_saturating (a : usize , b : usize) -> usize ; } unsafe extern "C" { # [doc = " If a - b overflows, returns AWS_OP_ERR; otherwise subtracts\n a - b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_sub_size_checked (a : usize , b : usize , r : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Function to check if x is power of 2"] pub fn aws_is_power_of_two (x : usize) -> bool ; } unsafe extern "C" { # [doc = " Function to find the smallest result that is power of 2 >= n. Returns AWS_OP_ERR if this cannot\n be done without overflow"] pub fn aws_round_up_to_power_of_two (n : usize , result : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Counts the number of leading 0 bits in an integer. 0 will return the size of the integer in bits."] pub fn aws_clz_u32 (n : u32) -> usize ; } unsafe extern "C" { pub fn aws_clz_i32 (n : i32) -> usize ; } unsafe extern "C" { pub fn aws_clz_u64 (n : u64) -> usize ; } unsafe extern "C" { pub fn aws_clz_i64 (n : i64) -> usize ; } unsafe extern "C" { pub fn aws_clz_size (n : usize) -> usize ; } unsafe extern "C" { # [doc = " Counts the number of trailing 0 bits in an integer. 0 will return the size of the integer in bits."] pub fn aws_ctz_u32 (n : u32) -> usize ; } unsafe extern "C" { pub fn aws_ctz_i32 (n : i32) -> usize ; } unsafe extern "C" { pub fn aws_ctz_u64 (n : u64) -> usize ; } unsafe extern "C" { pub fn aws_ctz_i64 (n : i64) -> usize ; } unsafe extern "C" { pub fn aws_ctz_size (n : usize) -> usize ; } unsafe extern "C" { pub fn aws_min_u8 (a : u8 , b : u8) -> u8 ; } unsafe extern "C" { pub fn aws_max_u8 (a : u8 , b : u8) -> u8 ; } unsafe extern "C" { pub fn aws_min_i8 (a : i8 , b : i8) -> i8 ; } unsafe extern "C" { pub fn aws_max_i8 (a : i8 , b : i8) -> i8 ; } unsafe extern "C" { pub fn aws_min_u16 (a : u16 , b : u16) -> u16 ; } unsafe extern "C" { pub fn aws_max_u16 (a : u16 , b : u16) -> u16 ; } unsafe extern "C" { pub fn aws_min_i16 (a : i16 , b : i16) -> i16 ; } unsafe extern "C" { pub fn aws_max_i16 (a : i16 , b : i16) -> i16 ; } unsafe extern "C" { pub fn aws_min_u32 (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { pub fn aws_max_u32 (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { pub fn aws_min_i32 (a : i32 , b : i32) -> i32 ; } unsafe extern "C" { pub fn aws_max_i32 (a : i32 , b : i32) -> i32 ; } unsafe extern "C" { pub fn aws_min_u64 (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { pub fn aws_max_u64 (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { pub fn aws_min_i64 (a : i64 , b : i64) -> i64 ; } unsafe extern "C" { pub fn aws_max_i64 (a : i64 , b : i64) -> i64 ; } unsafe extern "C" { pub fn aws_min_size (a : usize , b : usize) -> usize ; } unsafe extern "C" { pub fn aws_max_size (a : usize , b : usize) -> usize ; } unsafe extern "C" { pub fn aws_min_int (a : :: libc :: c_int , b : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_max_int (a : :: libc :: c_int , b : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_min_float (a : f32 , b : f32) -> f32 ; } unsafe extern "C" { pub fn aws_max_float (a : f32 , b : f32) -> f32 ; } unsafe extern "C" { pub fn aws_min_double (a : f64 , b : f64) -> f64 ; } unsafe extern "C" { pub fn aws_max_double (a : f64 , b : f64) -> f64 ; } pub const AWS_ARRAY_LIST_DEBUG_FILL : _bindgen_ty_19 = _bindgen_ty_19 :: AWS_ARRAY_LIST_DEBUG_FILL ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_19 { AWS_ARRAY_LIST_DEBUG_FILL = 221 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_array_list { pub alloc : * mut aws_allocator , pub current_size : usize , pub length : usize , pub item_size : usize , pub data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_array_list"] [:: std :: mem :: size_of :: < aws_array_list > () - 40usize] ; ["Alignment of aws_array_list"] [:: std :: mem :: align_of :: < aws_array_list > () - 8usize] ; ["Offset of field: aws_array_list::alloc"] [:: std :: mem :: offset_of ! (aws_array_list , alloc) - 0usize] ; ["Offset of field: aws_array_list::current_size"] [:: std :: mem :: offset_of ! (aws_array_list , current_size) - 8usize] ; ["Offset of field: aws_array_list::length"] [:: std :: mem :: offset_of ! (aws_array_list , length) - 16usize] ; ["Offset of field: aws_array_list::item_size"] [:: std :: mem :: offset_of ! (aws_array_list , item_size) - 24usize] ; ["Offset of field: aws_array_list::data"] [:: std :: mem :: offset_of ! (aws_array_list , data) - 32usize] ; } ; 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.\n\n a and b should be cast to pointers to the element type held in the list\n before being dereferenced. The function should compare the elements and\n return a positive number if a > b, zero if a = b, and a negative number\n if a < b."] pub type aws_array_list_comparator_fn = :: std :: option :: Option < unsafe extern "C" fn (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> :: libc :: c_int > ; unsafe extern "C" { # [doc = " Initializes an array list with an array of size initial_item_allocation * item_size. In this mode, the array size\n will grow by a factor of 2 upon insertion if space is not available. initial_item_allocation is the number of\n elements you want space allocated for. item_size is the size of each element in bytes. Mixing items types is not\n supported by this API."] pub fn aws_array_list_init_dynamic (list : * mut aws_array_list , alloc : * mut aws_allocator , initial_item_allocation : usize , item_size : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes an array list with a preallocated array of void *. item_count is the number of elements in the array,\n and item_size is the size in bytes of each element. Mixing items types is not supported\n by this API. Once this list is full, new items will be rejected."] pub fn aws_array_list_init_static (list : * mut aws_array_list , raw_array : * mut :: libc :: c_void , item_count : usize , item_size : usize) ; } unsafe extern "C" { # [doc = " Initializes an array list with a preallocated array of *already-initialized* elements. item_count is the number of\n elements in the array, and item_size is the size in bytes of each element.\n\n Once initialized, nothing further can be added to the list, since it will be full and cannot resize.\n\n Primary use case is to treat an already-initialized C array as an array list."] pub fn aws_array_list_init_static_from_initialized (list : * mut aws_array_list , raw_array : * mut :: libc :: c_void , item_count : usize , item_size : usize) ; } unsafe extern "C" { # [doc = " Set of properties of a valid aws_array_list."] pub fn aws_array_list_is_valid (list : * const aws_array_list) -> bool ; } unsafe extern "C" { # [doc = " Deallocates any memory that was allocated for this list, and resets list for reuse or deletion."] pub fn aws_array_list_clean_up (list : * mut aws_array_list) ; } unsafe extern "C" { # [doc = " Erases and then deallocates any memory that was allocated for this list, and resets list for reuse or deletion."] pub fn aws_array_list_clean_up_secure (list : * mut aws_array_list) ; } unsafe extern "C" { # [doc = " Pushes the memory pointed to by val onto the end of internal list"] pub fn aws_array_list_push_back (list : * mut aws_array_list , val : * const :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the element at the front of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised"] pub fn aws_array_list_front (list : * const aws_array_list , val : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Pushes the memory pointed to by val onto the front of internal list.\n This call results in shifting all of the elements in the list. Avoid this call unless that\n is intended behavior."] pub fn aws_array_list_push_front (list : * mut aws_array_list , val : * const :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Deletes the element at the front of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised.\n This call results in shifting all of the elements at the end of the array to the front. Avoid this call unless that\n is intended behavior."] pub fn aws_array_list_pop_front (list : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Delete N elements from the front of the list.\n Remaining elements are shifted to the front of the list.\n If the list has less than N elements, the list is cleared.\n This call is more efficient than calling aws_array_list_pop_front() N times."] pub fn aws_array_list_pop_front_n (list : * mut aws_array_list , n : usize) ; } unsafe extern "C" { # [doc = " Deletes the element this index in the list if it exists.\n If element does not exist, AWS_ERROR_INVALID_INDEX will be raised.\n This call results in shifting all remaining elements towards the front.\n Avoid this call unless that is intended behavior."] pub fn aws_array_list_erase (list : * mut aws_array_list , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the element at the end of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised."] pub fn aws_array_list_back (list : * const aws_array_list , val : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Deletes the element at the end of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised."] pub fn aws_array_list_pop_back (list : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Clears all elements in the array and resets length to zero. Size does not change in this operation."] pub fn aws_array_list_clear (list : * mut aws_array_list) ; } unsafe 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) -> :: libc :: c_int ; } unsafe 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\n in to will be overwritten in this copy."] pub fn aws_array_list_copy (from : * const aws_array_list , to : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Swap contents between two dynamic lists. Both lists must use the same allocator."] pub fn aws_array_list_swap_contents (list_a : * mut aws_array_list , list_b : * mut aws_array_list) ; } unsafe extern "C" { # [doc = " Returns the number of elements that can fit in the internal array. If list is initialized in dynamic mode,\n the capacity changes over time."] pub fn aws_array_list_capacity (list : * const aws_array_list) -> usize ; } unsafe extern "C" { # [doc = " Returns the number of elements in the internal array."] pub fn aws_array_list_length (list : * const aws_array_list) -> usize ; } unsafe extern "C" { # [doc = " Copies the memory at index to val. If element does not exist, AWS_ERROR_INVALID_INDEX will be raised."] pub fn aws_array_list_get_at (list : * const aws_array_list , val : * mut :: libc :: c_void , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the memory address of the element at index to *val. If element does not exist, AWS_ERROR_INVALID_INDEX will be\n raised."] pub fn aws_array_list_get_at_ptr (list : * const aws_array_list , val : * mut * mut :: libc :: c_void , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Ensures that the array list has enough capacity to store a value at the specified index. If there is not already\n enough capacity, and the list is in dynamic mode, this function will attempt to allocate more memory, expanding the\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the the memory pointed to by val into the array at index. If in dynamic mode, the size will grow by a factor\n of two when the array is full. In static mode, AWS_ERROR_INVALID_INDEX will be raised if the index is past the bounds\n of the array."] pub fn aws_array_list_set_at (list : * mut aws_array_list , val : * const :: libc :: c_void , index : usize) -> :: libc :: c_int ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Sort elements in the list in-place according to the comparator function."] pub fn aws_array_list_sort (list : * mut aws_array_list , compare_fn : aws_array_list_comparator_fn) ; } unsafe extern "C" { # [doc = " Returns 1 if machine is big endian, 0 if little endian.\n If you compile with even -O1 optimization, this check is completely optimized\n out at compile time and code which calls \"if (aws_is_big_endian())\" will do\n the right thing without branching."] pub fn aws_is_big_endian () -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Convert 64 bit integer from host to network byte order."] pub fn aws_hton64 (x : u64) -> u64 ; } unsafe extern "C" { # [doc = " Convert 64 bit integer from network to host byte order."] pub fn aws_ntoh64 (x : u64) -> u64 ; } unsafe extern "C" { # [doc = " Convert 32 bit integer from host to network byte order."] pub fn aws_hton32 (x : u32) -> u32 ; } unsafe extern "C" { # [doc = " Convert 32 bit float from host to network byte order."] pub fn aws_htonf32 (x : f32) -> f32 ; } unsafe extern "C" { # [doc = " Convert 64 bit double from host to network byte order."] pub fn aws_htonf64 (x : f64) -> f64 ; } unsafe extern "C" { # [doc = " Convert 32 bit integer from network to host byte order."] pub fn aws_ntoh32 (x : u32) -> u32 ; } unsafe extern "C" { # [doc = " Convert 32 bit float from network to host byte order."] pub fn aws_ntohf32 (x : f32) -> f32 ; } unsafe extern "C" { # [doc = " Convert 32 bit float from network to host byte order."] pub fn aws_ntohf64 (x : f64) -> f64 ; } unsafe extern "C" { # [doc = " Convert 16 bit integer from host to network byte order."] pub fn aws_hton16 (x : u16) -> u16 ; } unsafe extern "C" { # [doc = " Convert 16 bit integer from network to host byte order."] pub fn aws_ntoh16 (x : u16) -> u16 ; } # [doc = " Represents a length-delimited binary string or buffer. If byte buffer points\n to constant memory or memory that should otherwise not be freed by this\n struct, set allocator to NULL and free function will be a no-op.\n\n This structure used to define the output for all functions that write to a buffer.\n\n Note that this structure allocates memory at the buffer pointer only. The\n struct itself does not get dynamically allocated and must be either\n maintained or copied to avoid losing access to the memory."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_byte_buf { pub len : usize , pub buffer : * mut u8 , pub capacity : usize , pub allocator : * mut aws_allocator , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_byte_buf"] [:: std :: mem :: size_of :: < aws_byte_buf > () - 32usize] ; ["Alignment of aws_byte_buf"] [:: std :: mem :: align_of :: < aws_byte_buf > () - 8usize] ; ["Offset of field: aws_byte_buf::len"] [:: std :: mem :: offset_of ! (aws_byte_buf , len) - 0usize] ; ["Offset of field: aws_byte_buf::buffer"] [:: std :: mem :: offset_of ! (aws_byte_buf , buffer) - 8usize] ; ["Offset of field: aws_byte_buf::capacity"] [:: std :: mem :: offset_of ! (aws_byte_buf , capacity) - 16usize] ; ["Offset of field: aws_byte_buf::allocator"] [:: std :: mem :: offset_of ! (aws_byte_buf , allocator) - 24usize] ; } ; 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.\n\n This structure is used to define buffers for reading."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_byte_cursor { pub len : usize , pub ptr : * mut u8 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_byte_cursor"] [:: std :: mem :: size_of :: < aws_byte_cursor > () - 16usize] ; ["Alignment of aws_byte_cursor"] [:: std :: mem :: align_of :: < aws_byte_cursor > () - 8usize] ; ["Offset of field: aws_byte_cursor::len"] [:: std :: mem :: offset_of ! (aws_byte_cursor , len) - 0usize] ; ["Offset of field: aws_byte_cursor::ptr"] [:: std :: mem :: offset_of ! (aws_byte_cursor , ptr) - 8usize] ; } ; 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 > ; unsafe extern "C" { # [doc = " Compare two arrays.\n Return whether their contents are equivalent.\n NULL may be passed as the array pointer if its length is declared to be 0."] pub fn aws_array_eq (array_a : * const :: libc :: c_void , len_a : usize , array_b : * const :: libc :: c_void , len_b : usize) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of two arrays.\n Return whether their contents are equivalent.\n NULL may be passed as the array pointer if its length is declared to be 0.\n The \"C\" locale is used for comparing upper and lowercase letters.\n Data is assumed to be ASCII text, UTF-8 will work fine too."] pub fn aws_array_eq_ignore_case (array_a : * const :: libc :: c_void , len_a : usize , array_b : * const :: libc :: c_void , len_b : usize) -> bool ; } unsafe extern "C" { # [doc = " Compare an array and a null-terminated string.\n Returns true if their contents are equivalent.\n The array should NOT contain a null-terminator, or the comparison will always return false.\n 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 :: libc :: c_void , array_len : usize , c_str : * const :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of an array and a null-terminated string.\n Return whether their contents are equivalent.\n The array should NOT contain a null-terminator, or the comparison will always return false.\n NULL may be passed as the array pointer if its length is declared to be 0.\n The \"C\" locale is used for comparing upper and lowercase letters.\n Data is assumed to be ASCII text, UTF-8 will work fine too."] pub fn aws_array_eq_c_str_ignore_case (array : * const :: libc :: c_void , array_len : usize , c_str : * const :: libc :: c_char) -> bool ; } unsafe extern "C" { pub fn aws_byte_buf_init (buf : * mut aws_byte_buf , allocator : * mut aws_allocator , capacity : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes an aws_byte_buf structure base on another valid one.\n Requires: *src and *allocator are valid objects.\n Ensures: *dest is a valid aws_byte_buf with a new backing array dest->buffer\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Reads 'filename' into 'out_buf'. If successful, 'out_buf' is allocated and filled with the data;\n It is your responsibility to call 'aws_byte_buf_clean_up()' on it. Otherwise, 'out_buf' remains\n unused. In the very unfortunate case where some API needs to treat out_buf as a c_string, a null terminator\n 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 :: libc :: c_char) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Same as aws_byte_buf_init_from_file(), but for reading \"special files\" like /proc/cpuinfo.\n These files don't accurately report their size, so size_hint is used as initial buffer size,\n and the buffer grows until the while file is read."] pub fn aws_byte_buf_init_from_file_with_size_hint (out_buf : * mut aws_byte_buf , alloc : * mut aws_allocator , filename : * const :: libc :: c_char , size_hint : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Evaluates the set of properties that define the shape of all valid aws_byte_buf structures.\n 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 ; } unsafe extern "C" { # [doc = " Evaluates the set of properties that define the shape of all valid aws_byte_cursor structures.\n 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 ; } unsafe extern "C" { # [doc = " Copies src buffer into dest and sets the correct len and capacity.\n A new memory zone is allocated for dest->buffer. When dest is no longer needed it will have to be cleaned-up using\n aws_byte_buf_clean_up(dest).\n Dest capacity and len will be equal to the src len. Allocator of the dest will be identical with parameter allocator.\n If src buffer is null the dest will have a null buffer with a len and a capacity of 0\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Init buffer with contents of multiple cursors, and update cursors to reference the memory stored in the buffer.\n Each cursor arg must be an `struct aws_byte_cursor *`. NULL must be passed as the final arg.\n NOTE: Do not append/grow/resize buffers initialized this way, or the cursors will end up referencing invalid memory.\n Returns AWS_OP_SUCCESS in case of success.\n 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 , ...) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_byte_buf_clean_up (buf : * mut aws_byte_buf) ; } unsafe extern "C" { # [doc = " Equivalent to calling aws_byte_buf_secure_zero and then aws_byte_buf_clean_up\n on the buffer."] pub fn aws_byte_buf_clean_up_secure (buf : * mut aws_byte_buf) ; } unsafe extern "C" { # [doc = " Resets the len of the buffer to 0, but does not free the memory. The buffer can then be reused.\n 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) ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Compare two aws_byte_buf structures.\n Return whether their contents are equivalent."] pub fn aws_byte_buf_eq (a : * const aws_byte_buf , b : * const aws_byte_buf) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of two aws_byte_buf structures.\n Return whether their contents are equivalent.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 ; } unsafe extern "C" { # [doc = " Compare an aws_byte_buf and a null-terminated string.\n Returns true if their contents are equivalent.\n 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 :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of an aws_byte_buf and a null-terminated string.\n Return whether their contents are equivalent.\n The buffer should NOT contain a null-terminator, or the comparison will always return false.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " No copies, no buffer allocations. Iterates over input_str, and returns the\n next substring between split_on instances relative to previous substr.\n Behaves similar to strtok with substr being used as state for next split.\n\n Returns true each time substr is set and false when there is no more splits\n (substr is set to empty in that case).\n\n Example usage.\n struct aws_byte_cursor substr = {0};\n while (aws_byte_cursor_next_split(&input_str, ';', &substr)) {\n   // ...use substr...\n }\n\n Note: It is the user's responsibility zero-initialize substr before the first call.\n\n Edge case rules are as follows:\n empty input will have single empty split. ex. \"\" splits into \"\"\n if input starts with split_on then first split is empty. ex \";A\" splits into \"\", \"A\"\n adjacent split tokens result in empty split. ex \"A;;B\" splits into \"A\", \"\", \"B\"\n If the input ends with split_on, last split is empty. ex. \"A;\" splits into \"A\", \"\"\n\n It is the user's responsibility to make sure the input buffer stays in memory\n long enough to use the results."] pub fn aws_byte_cursor_next_split (input_str : * const aws_byte_cursor , split_on : :: libc :: c_char , substr : * mut aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " No copies, no buffer allocations. Fills in output with a list of\n aws_byte_cursor instances where buffer is an offset into the input_str and\n len is the length of that string in the original buffer.\n\n Edge case rules are as follows:\n if the input begins with split_on, an empty cursor will be the first entry in\n output. if the input has two adjacent split_on tokens, an empty cursor will\n be inserted into the output. if the input ends with split_on, an empty cursor\n will be appended to the output.\n\n It is the user's responsibility to properly initialize output. Recommended number of preallocated elements from\n output is your most likely guess for the upper bound of the number of elements resulting from the split.\n\n The type that will be stored in output is struct aws_byte_cursor (you'll need\n this for the item size param).\n\n It is the user's responsibility to make sure the input buffer stays in memory\n long enough to use the results."] pub fn aws_byte_cursor_split_on_char (input_str : * const aws_byte_cursor , split_on : :: libc :: c_char , output : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " No copies, no buffer allocations. Fills in output with a list of aws_byte_cursor instances where buffer is\n an offset into the input_str and len is the length of that string in the original buffer. N is the max number of\n splits, if this value is zero, it will add all splits to the output.\n\n Edge case rules are as follows:\n if the input begins with split_on, an empty cursor will be the first entry in output\n if the input has two adjacent split_on tokens, an empty cursor will be inserted into the output.\n if the input ends with split_on, an empty cursor will be appended to the output.\n\n It is the user's responsibility to properly initialize output. Recommended number of preallocated elements from\n output is your most likely guess for the upper bound of the number of elements resulting from the split.\n\n If the output array is not large enough, input_str will be updated to point to the first character after the last\n processed split_on instance.\n\n The type that will be stored in output is struct aws_byte_cursor (you'll need this for the item size param).\n\n 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 : :: libc :: c_char , n : usize , output : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Search for an exact byte match inside a cursor. The first match will be returned. Returns AWS_OP_SUCCESS\n on successful match and first_find will be set to the offset in input_str, and length will be the remaining length\n from input_str past the returned offset. If the match was not found, AWS_OP_ERR will be returned and\n 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) -> :: libc :: c_int ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Copies from to to. If to is too small, AWS_ERROR_DEST_COPY_TOO_SMALL will be\n returned. dest->len will contain the amount of data actually copied to dest.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies from to to while converting bytes via the passed in lookup table.\n If to is too small, AWS_ERROR_DEST_COPY_TOO_SMALL will be\n returned. to->len will contain its original size plus the amount of data actually copied to to.\n\n from and to should not be the same buffer (overlap is not handled)\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies from to to. If to is too small, the buffer will be grown appropriately and\n the old contents copied to, before the new contents are appended.\n\n If the grow fails (overflow or OOM), then an error will be returned.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies `from` to `to`. If `to` is too small, the buffer will be grown appropriately and\n the old contents copied over, before the new contents are appended.\n\n If the grow fails (overflow or OOM), then an error will be returned.\n\n If the buffer is grown, the old buffer will be securely cleared before getting freed.\n\n `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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies a single byte into `to`. If `to` is too small, the buffer will be grown appropriately and\n the old contents copied over, before the byte is appended.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies a single byte into `to`. If `to` is too small, the buffer will be grown appropriately and\n the old contents copied over, before the byte is appended.\n\n If the grow fails (overflow or OOM), then an error will be returned.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copy contents of cursor to buffer, then update cursor to reference the memory stored in the buffer.\n If buffer is too small, AWS_ERROR_DEST_COPY_TOO_SMALL will be returned.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Appends '\\0' at the end of the buffer."] pub fn aws_byte_buf_append_null_terminator (buf : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Attempts to increase the capacity of a buffer to the requested capacity\n\n If the the buffer's capacity is currently larger than the request capacity, the\n function does nothing (no shrink is performed)."] pub fn aws_byte_buf_reserve (buffer : * mut aws_byte_buf , requested_capacity : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Convenience function that attempts to increase the capacity of a buffer relative to the current\n length.\n\n  aws_byte_buf_reserve_relative(buf, x) ~~ aws_byte_buf_reserve(buf, buf->len + x)\n"] pub fn aws_byte_buf_reserve_relative (buffer : * mut aws_byte_buf , additional_length : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Concatenates a variable number of struct aws_byte_buf * into destination.\n Number of args must be greater than 1. If dest is too small,\n AWS_ERROR_DEST_COPY_TOO_SMALL will be returned. dest->len will contain the\n amount of data actually copied to dest."] pub fn aws_byte_buf_cat (dest : * mut aws_byte_buf , number_of_args : usize , ...) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Compare two aws_byte_cursor structures.\n Return whether their contents are equivalent."] pub fn aws_byte_cursor_eq (a : * const aws_byte_cursor , b : * const aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of two aws_byte_cursor structures.\n Return whether their contents are equivalent.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 ; } unsafe extern "C" { # [doc = " Compare an aws_byte_cursor and an aws_byte_buf.\n 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 ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of an aws_byte_cursor and an aws_byte_buf.\n Return whether their contents are equivalent.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 ; } unsafe extern "C" { # [doc = " Compare an aws_byte_cursor and a null-terminated string.\n Returns true if their contents are equivalent.\n 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 :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of an aws_byte_cursor and a null-terminated string.\n Return whether their contents are equivalent.\n The cursor should NOT contain a null-terminator, or the comparison will always return false.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 :: libc :: c_char) -> bool ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Return true if the input starts with the prefix (case-insensitive).\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 ; } unsafe extern "C" { # [doc = " Case-insensitive hash function for array containing ASCII or UTF-8 text."] pub fn aws_hash_array_ignore_case (array : * const :: libc :: c_void , len : usize) -> u64 ; } unsafe extern "C" { # [doc = " Case-insensitive hash function for aws_byte_cursors stored in an aws_hash_table.\n For case-sensitive hashing, use aws_hash_byte_cursor_ptr()."] pub fn aws_hash_byte_cursor_ptr_ignore_case (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Returns a lookup table for bytes that is the identity transformation with the exception\n of uppercase ascii characters getting replaced with lowercase characters.  Used in\n caseless comparisons."] pub fn aws_lookup_table_to_lower_get () -> * const u8 ; } unsafe extern "C" { # [doc = " Returns lookup table to go from ASCII/UTF-8 hex character to a number (0-15).\n Non-hex characters map to 255.\n Valid examples:\n '0' -> 0\n 'F' -> 15\n 'f' -> 15\n Invalid examples:\n ' ' -> 255\n 'Z' -> 255\n '\\0' -> 255"] pub fn aws_lookup_table_hex_to_num_get () -> * const u8 ; } unsafe 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) -> :: libc :: c_int ; } unsafe 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) -> :: libc :: c_int ; } unsafe 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 :: libc :: c_char) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_byte_buf_from_array (bytes : * const :: libc :: c_void , len : usize) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_byte_buf_from_empty_array (bytes : * const :: libc :: c_void , capacity : usize) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_byte_cursor_from_buf (buf : * const aws_byte_buf) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_byte_cursor_from_c_str (c_str : * const :: libc :: c_char) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_byte_cursor_from_array (bytes : * const :: libc :: c_void , len : usize) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Tests if the given aws_byte_cursor has at least len bytes remaining. If so,\n *buf is advanced by len bytes (incrementing ->ptr and decrementing ->len),\n and an aws_byte_cursor referring to the first len bytes of the original *buf\n is returned. Otherwise, an aws_byte_cursor with ->ptr = NULL, ->len = 0 is\n returned.\n\n Note that if len is above (SIZE_MAX / 2), this function will also treat it as\n 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 ; } unsafe extern "C" { # [doc = " Behaves identically to aws_byte_cursor_advance, but avoids speculative\n execution potentially reading out-of-bounds pointers (by returning an\n empty ptr in such speculated paths).\n\n This should generally be done when using an untrusted or\n data-dependent value for 'len', to avoid speculating into a path where\n 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 ; } unsafe extern "C" { # [doc = " Reads specified length of data from byte cursor and copies it to the\n destination array.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read (cur : * mut aws_byte_cursor , dest : * mut :: libc :: c_void , len : usize) -> bool ; } unsafe extern "C" { # [doc = " Reads as many bytes from cursor as size of buffer, and copies them to buffer.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_and_fill_buffer (cur : * mut aws_byte_cursor , dest : * mut aws_byte_buf) -> bool ; } unsafe extern "C" { # [doc = " Reads a single byte from cursor, placing it in *var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_u8 (cur : * mut aws_byte_cursor , var : * mut u8) -> bool ; } unsafe extern "C" { # [doc = " Reads a 16-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_be16 (cur : * mut aws_byte_cursor , var : * mut u16) -> bool ; } unsafe extern "C" { # [doc = " Reads an unsigned 24-bit value (3 bytes) in network byte order from cur,\n and places it in host byte order into 32-bit var.\n Ex: if cur's next 3 bytes are {0xAA, 0xBB, 0xCC}, then var becomes 0x00AABBCC.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_be24 (cur : * mut aws_byte_cursor , var : * mut u32) -> bool ; } unsafe extern "C" { # [doc = " Reads a 32-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_be32 (cur : * mut aws_byte_cursor , var : * mut u32) -> bool ; } unsafe extern "C" { # [doc = " Reads a 64-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_be64 (cur : * mut aws_byte_cursor , var : * mut u64) -> bool ; } unsafe extern "C" { # [doc = " Reads a 32-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_float_be32 (cur : * mut aws_byte_cursor , var : * mut f32) -> bool ; } unsafe extern "C" { # [doc = " Reads a 64-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_float_be64 (cur : * mut aws_byte_cursor , var : * mut f64) -> bool ; } unsafe extern "C" { # [doc = " Reads 2 hex characters from ASCII/UTF-8 text to produce an 8-bit number.\n Accepts both lowercase 'a'-'f' and uppercase 'A'-'F'.\n For example: \"0F\" produces 15.\n\n On success, returns true and advances the cursor by 2.\n If there is insufficient space in the cursor or an invalid character\n 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 ; } unsafe extern "C" { # [doc = " Appends a sub-buffer to the specified buffer.\n\n If the buffer has at least `len' bytes remaining (buffer->capacity - buffer->len >= len),\n then buffer->len is incremented by len, and an aws_byte_buf is assigned to *output corresponding\n to the last len bytes of the input buffer. The aws_byte_buf at *output will have a null\n allocator, a zero initial length, and a capacity of 'len'. The function then returns true.\n\n If there is insufficient space, then this function nulls all fields in *output and returns\n false."] pub fn aws_byte_buf_advance (buffer : * mut aws_byte_buf , output : * mut aws_byte_buf , len : usize) -> bool ; } unsafe extern "C" { # [doc = " Write specified number of bytes from array to byte buffer.\n\n On success, returns true and updates the buffer length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write (buf : * mut aws_byte_buf , src : * const u8 , len : usize) -> bool ; } unsafe extern "C" { # [doc = " Copies all bytes from buffer to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_from_whole_buffer (buf : * mut aws_byte_buf , src : aws_byte_buf) -> bool ; } unsafe extern "C" { # [doc = " Copies all bytes from buffer to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_from_whole_cursor (buf : * mut aws_byte_buf , src : aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " Without increasing buf's capacity, write as much as possible from advancing_cursor into buf.\n\n buf's len is updated accordingly.\n advancing_cursor is advanced so it contains the remaining unwritten parts.\n Returns the section of advancing_cursor which was written.\n\n This function cannot fail. If buf is full (len == capacity) or advancing_len has 0 length,\n then buf and advancing_cursor are not altered and a cursor with 0 length is returned.\n\n Example: Given a buf with 2 bytes of space available and advancing_cursor with contents \"abc\".\n \"ab\" will be written to buf and buf->len will increase 2 and become equal to buf->capacity.\n advancing_cursor will advance so its contents become the unwritten \"c\".\n 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 ; } unsafe extern "C" { # [doc = " Copies one byte to buffer.\n\n On success, returns true and updates the cursor /length\naccordingly.\n\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_u8 (buf : * mut aws_byte_buf , c : u8) -> bool ; } unsafe extern "C" { # [doc = " Writes one byte repeatedly to buffer (like memset)\n\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_u8_n (buf : * mut aws_byte_buf , c : u8 , count : usize) -> bool ; } unsafe extern "C" { # [doc = " Writes a 16-bit integer in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_be16 (buf : * mut aws_byte_buf , x : u16) -> bool ; } unsafe extern "C" { # [doc = " Writes low 24-bits (3 bytes) of an unsigned integer in network byte order (big endian) to buffer.\n Ex: If x is 0x00AABBCC then {0xAA, 0xBB, 0xCC} is written to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, or x's value cannot fit in 3 bytes,\n returns false, leaving the buffer unchanged."] pub fn aws_byte_buf_write_be24 (buf : * mut aws_byte_buf , x : u32) -> bool ; } unsafe extern "C" { # [doc = " Writes a 32-bit integer in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_be32 (buf : * mut aws_byte_buf , x : u32) -> bool ; } unsafe extern "C" { # [doc = " Writes a 32-bit float in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_float_be32 (buf : * mut aws_byte_buf , x : f32) -> bool ; } unsafe extern "C" { # [doc = " Writes a 64-bit integer in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_be64 (buf : * mut aws_byte_buf , x : u64) -> bool ; } unsafe extern "C" { # [doc = " Writes a 64-bit float in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_float_be64 (buf : * mut aws_byte_buf , x : f64) -> bool ; } unsafe extern "C" { # [doc = " Like isalnum(), but ignores C locale.\n 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 ; } unsafe extern "C" { # [doc = " Like isalpha(), but ignores C locale.\n Returns true if ch has the value of ASCII/UTF-8: 'a'-'z' or 'A'-'Z'."] pub fn aws_isalpha (ch : u8) -> bool ; } unsafe extern "C" { # [doc = " Like isdigit().\n Returns true if ch has the value of ASCII/UTF-8: '0'-'9'.\n\n Note: C's built-in isdigit() is also supposed to ignore the C locale,\n but cppreference.com claims \"some implementations (e.g. Microsoft in 1252 codepage)\n may classify additional single-byte characters as digits\""] pub fn aws_isdigit (ch : u8) -> bool ; } unsafe extern "C" { # [doc = " Like isxdigit().\n Returns true if ch has the value of ASCII/UTF-8: '0'-'9', 'a'-'f', or 'A'-'F'.\n\n Note: C's built-in isxdigit() is also supposed to ignore the C locale,\n but cppreference.com claims \"some implementations (e.g. Microsoft in 1252 codepage)\n may classify additional single-byte characters as digits\""] pub fn aws_isxdigit (ch : u8) -> bool ; } unsafe extern "C" { # [doc = " Like isspace(), but ignores C locale.\n Return true if ch has the value of ASCII/UTF-8: space (0x20), form feed (0x0C),\n line feed (0x0A), carriage return (0x0D), horizontal tab (0x09), or vertical tab (0x0B)."] pub fn aws_isspace (ch : u8) -> bool ; } unsafe extern "C" { # [doc = " Read entire cursor as ASCII/UTF-8 unsigned base-10 number.\n Stricter than strtoull(), which allows whitespace and inputs that start with \"0x\"\n\n Examples:\n \"0\" -> 0\n \"123\" -> 123\n \"00004\" -> 4 // leading zeros ok\n\n Rejects things like:\n \"-1\" // negative numbers not allowed\n \"1,000\" // only characters 0-9 allowed\n \"\" // blank string not allowed\n \" 0 \" // whitespace not allowed\n \"0x0\" // hex not allowed\n \"FF\" // hex not allowed\n \"999999999999999999999999999999999999999999\" // larger than max u64"] pub fn aws_byte_cursor_utf8_parse_u64 (cursor : aws_byte_cursor , dst : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Read entire cursor as ASCII/UTF-8 unsigned base-16 number with NO \"0x\" prefix.\n\n Examples:\n \"F\" -> 15\n \"000000ff\" -> 255 // leading zeros ok\n \"Ff\" -> 255 // mixed case ok\n \"123\" -> 291\n \"FFFFFFFFFFFFFFFF\" -> 18446744073709551616 // max u64\n\n Rejects things like:\n \"0x0\" // 0x prefix not allowed\n \"\" // blank string not allowed\n \" F \" // whitespace not allowed\n \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\" // larger than max u64"] pub fn aws_byte_cursor_utf8_parse_u64_hex (cursor : aws_byte_cursor , dst : * mut u64) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_linked_list_node { pub next : * mut aws_linked_list_node , pub prev : * mut aws_linked_list_node , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_linked_list_node"] [:: std :: mem :: size_of :: < aws_linked_list_node > () - 16usize] ; ["Alignment of aws_linked_list_node"] [:: std :: mem :: align_of :: < aws_linked_list_node > () - 8usize] ; ["Offset of field: aws_linked_list_node::next"] [:: std :: mem :: offset_of ! (aws_linked_list_node , next) - 0usize] ; ["Offset of field: aws_linked_list_node::prev"] [:: std :: mem :: offset_of ! (aws_linked_list_node , prev) - 8usize] ; } ; 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)] pub struct aws_linked_list { pub head : aws_linked_list_node , pub tail : aws_linked_list_node , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_linked_list"] [:: std :: mem :: size_of :: < aws_linked_list > () - 32usize] ; ["Alignment of aws_linked_list"] [:: std :: mem :: align_of :: < aws_linked_list > () - 8usize] ; ["Offset of field: aws_linked_list::head"] [:: std :: mem :: offset_of ! (aws_linked_list , head) - 0usize] ; ["Offset of field: aws_linked_list::tail"] [:: std :: mem :: offset_of ! (aws_linked_list , tail) - 16usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Set node's next and prev pointers to NULL."] pub fn aws_linked_list_node_reset (node : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Tests if the list is empty."] pub fn aws_linked_list_empty (list : * const aws_linked_list) -> bool ; } unsafe extern "C" { # [doc = " Checks that a linked list is valid."] pub fn aws_linked_list_is_valid (list : * const aws_linked_list) -> bool ; } unsafe extern "C" { # [doc = " Checks that the prev of the next pointer of a node points to the\n node. As this checks whether the [next] connection of a node is\n bidirectional, it returns false if used for the list tail."] pub fn aws_linked_list_node_next_is_valid (node : * const aws_linked_list_node) -> bool ; } unsafe extern "C" { # [doc = " Checks that the next of the prev pointer of a node points to the\n node. Similarly to the above, this returns false if used for the\n head of a list."] pub fn aws_linked_list_node_prev_is_valid (node : * const aws_linked_list_node) -> bool ; } unsafe extern "C" { # [doc = " Checks that a linked list satisfies double linked list connectivity\n constraints. This check is O(n) as it traverses the whole linked\n list to ensure that tail is reachable from head (and vice versa)\n and that every connection is bidirectional.\n\n Note: This check *cannot* go into an infinite loop, because we\n ensure that the connection to the next node is\n bidirectional. Therefore, if a node's [a] a.next is a previous node\n [b] in the list, b.prev != &a and so this check would fail, thus\n terminating the loop."] pub fn aws_linked_list_is_valid_deep (list : * const aws_linked_list) -> bool ; } unsafe extern "C" { # [doc = " Initializes the list. List will be empty after this call."] pub fn aws_linked_list_init (list : * mut aws_linked_list) ; } unsafe extern "C" { # [doc = " Returns an iteration pointer for the first element in the list."] pub fn aws_linked_list_begin (list : * const aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns an iteration pointer for one past the last element in the list."] pub fn aws_linked_list_end (list : * const aws_linked_list) -> * const aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns a pointer for the last element in the list.\n Used to begin iterating the list in reverse. Ex:\n   for (i = aws_linked_list_rbegin(list); i != aws_linked_list_rend(list); i = aws_linked_list_prev(i)) {...}"] pub fn aws_linked_list_rbegin (list : * const aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the pointer to one before the first element in the list.\n Used to end iterating the list in reverse."] pub fn aws_linked_list_rend (list : * const aws_linked_list) -> * const aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the next element in the list."] pub fn aws_linked_list_next (node : * const aws_linked_list_node) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the previous element in the list."] pub fn aws_linked_list_prev (node : * const aws_linked_list_node) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Inserts to_add immediately after after."] pub fn aws_linked_list_insert_after (after : * mut aws_linked_list_node , to_add : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Swaps the order two nodes in the linked list."] pub fn aws_linked_list_swap_nodes (a : * mut aws_linked_list_node , b : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Inserts to_add immediately before before."] pub fn aws_linked_list_insert_before (before : * mut aws_linked_list_node , to_add : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Removes the specified node from the list (prev/next point to each other) and\n returns the next node in the list."] pub fn aws_linked_list_remove (node : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Append new_node."] pub fn aws_linked_list_push_back (list : * mut aws_linked_list , node : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Returns the element in the back of the list."] pub fn aws_linked_list_back (list : * const aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the element in the back of the list and removes it"] pub fn aws_linked_list_pop_back (list : * mut aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Prepend new_node."] pub fn aws_linked_list_push_front (list : * mut aws_linked_list , node : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Returns the element in the front of the list."] pub fn aws_linked_list_front (list : * const aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the element in the front of the list and removes it"] pub fn aws_linked_list_pop_front (list : * mut aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { pub fn aws_linked_list_swap_contents (a : * mut aws_linked_list , b : * mut aws_linked_list) ; } unsafe extern "C" { # [doc = " Remove all nodes from one list, and add them to the back of another.\n\n Example: if dst={1,2} and src={3,4}, they become dst={1,2,3,4} and src={}"] pub fn aws_linked_list_move_all_back (dst : * mut aws_linked_list , src : * mut aws_linked_list) ; } unsafe extern "C" { # [doc = " Remove all nodes from one list, and add them to the front of another.\n\n Example: if dst={2,1} and src={4,3}, they become dst={4,3,2,1} and src={}"] pub fn aws_linked_list_move_all_front (dst : * mut aws_linked_list , src : * mut aws_linked_list) ; } unsafe extern "C" { # [doc = " Returns true if the node is currently in a list, false otherwise."] pub fn aws_linked_list_node_is_in_list (node : * mut aws_linked_list_node) -> bool ; } pub type aws_io_set_queue_on_handle_fn = :: std :: option :: Option < unsafe extern "C" fn (handle : * mut aws_io_handle , queue : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_io_handle { pub data : aws_io_handle__bindgen_ty_1 , pub additional_data : * mut :: libc :: c_void , pub set_queue : aws_io_set_queue_on_handle_fn , } # [repr (C)] # [derive (Copy , Clone)] pub union aws_io_handle__bindgen_ty_1 { pub fd : :: libc :: c_int , pub handle : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_io_handle__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_io_handle__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_io_handle__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_io_handle__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_io_handle__bindgen_ty_1::fd"] [:: std :: mem :: offset_of ! (aws_io_handle__bindgen_ty_1 , fd) - 0usize] ; ["Offset of field: aws_io_handle__bindgen_ty_1::handle"] [:: std :: mem :: offset_of ! (aws_io_handle__bindgen_ty_1 , handle) - 0usize] ; } ; impl Default for aws_io_handle__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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_io_handle"] [:: std :: mem :: size_of :: < aws_io_handle > () - 24usize] ; ["Alignment of aws_io_handle"] [:: std :: mem :: align_of :: < aws_io_handle > () - 8usize] ; ["Offset of field: aws_io_handle::data"] [:: std :: mem :: offset_of ! (aws_io_handle , data) - 0usize] ; ["Offset of field: aws_io_handle::additional_data"] [:: std :: mem :: offset_of ! (aws_io_handle , additional_data) - 8usize] ; ["Offset of field: aws_io_handle::set_queue"] [:: std :: mem :: offset_of ! (aws_io_handle , set_queue) - 16usize] ; } ; impl Default for aws_io_handle { 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 (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_io_message_type { AWS_IO_MESSAGE_APPLICATION_DATA = 0 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_channel { _unused : [u8 ; 0] , } pub type aws_channel_on_message_write_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (channel : * mut aws_channel , message : * mut aws_io_message , err_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_io_message { # [doc = " Allocator used for the message and message data. If this is null, the message belongs to a pool or some other\n message manager."] pub allocator : * mut aws_allocator , # [doc = " Buffer containing the data for message"] pub message_data : aws_byte_buf , # [doc = " type of the message. This is used for framework control messages. Currently the only type is\n AWS_IO_MESSAGE_APPLICATION_DATA"] pub message_type : aws_io_message_type , # [doc = " Conveys information about the contents of message_data (e.g. cast the ptr to some type). If 0, it's just opaque\n data."] pub message_tag : :: libc :: c_int , # [doc = " In order to avoid excess allocations/copies, on a partial read or write, the copy mark is set to indicate how\n much of this message has already been processed or copied."] pub copy_mark : usize , # [doc = " The channel that the message is bound to."] pub owning_channel : * mut aws_channel , # [doc = " Invoked by the channel once the entire message has been written to the data sink."] pub on_completion : aws_channel_on_message_write_completed_fn , # [doc = " arbitrary user data for the on_completion callback"] pub user_data : * mut :: libc :: c_void , # [doc = " it's incredibly likely something is going to need to queue this,\n go ahead and make sure the list info is part of the original allocation."] pub queueing_handle : aws_linked_list_node , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_io_message"] [:: std :: mem :: size_of :: < aws_io_message > () - 96usize] ; ["Alignment of aws_io_message"] [:: std :: mem :: align_of :: < aws_io_message > () - 8usize] ; ["Offset of field: aws_io_message::allocator"] [:: std :: mem :: offset_of ! (aws_io_message , allocator) - 0usize] ; ["Offset of field: aws_io_message::message_data"] [:: std :: mem :: offset_of ! (aws_io_message , message_data) - 8usize] ; ["Offset of field: aws_io_message::message_type"] [:: std :: mem :: offset_of ! (aws_io_message , message_type) - 40usize] ; ["Offset of field: aws_io_message::message_tag"] [:: std :: mem :: offset_of ! (aws_io_message , message_tag) - 44usize] ; ["Offset of field: aws_io_message::copy_mark"] [:: std :: mem :: offset_of ! (aws_io_message , copy_mark) - 48usize] ; ["Offset of field: aws_io_message::owning_channel"] [:: std :: mem :: offset_of ! (aws_io_message , owning_channel) - 56usize] ; ["Offset of field: aws_io_message::on_completion"] [:: std :: mem :: offset_of ! (aws_io_message , on_completion) - 64usize] ; ["Offset of field: aws_io_message::user_data"] [:: std :: mem :: offset_of ! (aws_io_message , user_data) - 72usize] ; ["Offset of field: aws_io_message::queueing_handle"] [:: std :: mem :: offset_of ! (aws_io_message , queueing_handle) - 80usize] ; } ; impl Default for aws_io_message { 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_io_clock_fn = :: std :: option :: Option < unsafe extern "C" fn (timestamp : * mut u64) -> :: libc :: c_int > ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_io_errors { AWS_IO_CHANNEL_ERROR_ERROR_CANT_ACCEPT_INPUT = 1024 , AWS_IO_CHANNEL_UNKNOWN_MESSAGE_TYPE = 1025 , AWS_IO_CHANNEL_READ_WOULD_EXCEED_WINDOW = 1026 , AWS_IO_EVENT_LOOP_ALREADY_ASSIGNED = 1027 , AWS_IO_EVENT_LOOP_SHUTDOWN = 1028 , AWS_IO_TLS_ERROR_NEGOTIATION_FAILURE = 1029 , AWS_IO_TLS_ERROR_NOT_NEGOTIATED = 1030 , AWS_IO_TLS_ERROR_WRITE_FAILURE = 1031 , AWS_IO_TLS_ERROR_ALERT_RECEIVED = 1032 , AWS_IO_TLS_CTX_ERROR = 1033 , AWS_IO_TLS_VERSION_UNSUPPORTED = 1034 , AWS_IO_TLS_CIPHER_PREF_UNSUPPORTED = 1035 , AWS_IO_MISSING_ALPN_MESSAGE = 1036 , AWS_IO_UNHANDLED_ALPN_PROTOCOL_MESSAGE = 1037 , AWS_IO_FILE_VALIDATION_FAILURE = 1038 , AWS_ERROR_IO_EVENT_LOOP_THREAD_ONLY = 1039 , AWS_ERROR_IO_ALREADY_SUBSCRIBED = 1040 , AWS_ERROR_IO_NOT_SUBSCRIBED = 1041 , AWS_ERROR_IO_OPERATION_CANCELLED = 1042 , AWS_IO_READ_WOULD_BLOCK = 1043 , AWS_IO_BROKEN_PIPE = 1044 , AWS_IO_SOCKET_UNSUPPORTED_ADDRESS_FAMILY = 1045 , AWS_IO_SOCKET_INVALID_OPERATION_FOR_TYPE = 1046 , AWS_IO_SOCKET_CONNECTION_REFUSED = 1047 , AWS_IO_SOCKET_TIMEOUT = 1048 , AWS_IO_SOCKET_NO_ROUTE_TO_HOST = 1049 , AWS_IO_SOCKET_NETWORK_DOWN = 1050 , AWS_IO_SOCKET_CLOSED = 1051 , AWS_IO_SOCKET_NOT_CONNECTED = 1052 , AWS_IO_SOCKET_INVALID_OPTIONS = 1053 , AWS_IO_SOCKET_ADDRESS_IN_USE = 1054 , AWS_IO_SOCKET_INVALID_ADDRESS = 1055 , AWS_IO_SOCKET_ILLEGAL_OPERATION_FOR_STATE = 1056 , AWS_IO_SOCKET_CONNECT_ABORTED = 1057 , AWS_IO_DNS_QUERY_FAILED = 1058 , AWS_IO_DNS_INVALID_NAME = 1059 , AWS_IO_DNS_NO_ADDRESS_FOR_HOST = 1060 , AWS_IO_DNS_HOST_REMOVED_FROM_CACHE = 1061 , AWS_IO_STREAM_INVALID_SEEK_POSITION = 1062 , AWS_IO_STREAM_READ_FAILED = 1063 , DEPRECATED_AWS_IO_INVALID_FILE_HANDLE = 1064 , AWS_IO_SHARED_LIBRARY_LOAD_FAILURE = 1065 , AWS_IO_SHARED_LIBRARY_FIND_SYMBOL_FAILURE = 1066 , AWS_IO_TLS_NEGOTIATION_TIMEOUT = 1067 , AWS_IO_TLS_ALERT_NOT_GRACEFUL = 1068 , AWS_IO_MAX_RETRIES_EXCEEDED = 1069 , AWS_IO_RETRY_PERMISSION_DENIED = 1070 , AWS_IO_TLS_DIGEST_ALGORITHM_UNSUPPORTED = 1071 , AWS_IO_TLS_SIGNATURE_ALGORITHM_UNSUPPORTED = 1072 , AWS_ERROR_PKCS11_VERSION_UNSUPPORTED = 1073 , AWS_ERROR_PKCS11_TOKEN_NOT_FOUND = 1074 , AWS_ERROR_PKCS11_KEY_NOT_FOUND = 1075 , AWS_ERROR_PKCS11_KEY_TYPE_UNSUPPORTED = 1076 , AWS_ERROR_PKCS11_UNKNOWN_CRYPTOKI_RETURN_VALUE = 1077 , AWS_ERROR_PKCS11_CKR_CANCEL = 1078 , AWS_ERROR_PKCS11_CKR_HOST_MEMORY = 1079 , AWS_ERROR_PKCS11_CKR_SLOT_ID_INVALID = 1080 , AWS_ERROR_PKCS11_CKR_GENERAL_ERROR = 1081 , AWS_ERROR_PKCS11_CKR_FUNCTION_FAILED = 1082 , AWS_ERROR_PKCS11_CKR_ARGUMENTS_BAD = 1083 , AWS_ERROR_PKCS11_CKR_NO_EVENT = 1084 , AWS_ERROR_PKCS11_CKR_NEED_TO_CREATE_THREADS = 1085 , AWS_ERROR_PKCS11_CKR_CANT_LOCK = 1086 , AWS_ERROR_PKCS11_CKR_ATTRIBUTE_READ_ONLY = 1087 , AWS_ERROR_PKCS11_CKR_ATTRIBUTE_SENSITIVE = 1088 , AWS_ERROR_PKCS11_CKR_ATTRIBUTE_TYPE_INVALID = 1089 , AWS_ERROR_PKCS11_CKR_ATTRIBUTE_VALUE_INVALID = 1090 , AWS_ERROR_PKCS11_CKR_ACTION_PROHIBITED = 1091 , AWS_ERROR_PKCS11_CKR_DATA_INVALID = 1092 , AWS_ERROR_PKCS11_CKR_DATA_LEN_RANGE = 1093 , AWS_ERROR_PKCS11_CKR_DEVICE_ERROR = 1094 , AWS_ERROR_PKCS11_CKR_DEVICE_MEMORY = 1095 , AWS_ERROR_PKCS11_CKR_DEVICE_REMOVED = 1096 , AWS_ERROR_PKCS11_CKR_ENCRYPTED_DATA_INVALID = 1097 , AWS_ERROR_PKCS11_CKR_ENCRYPTED_DATA_LEN_RANGE = 1098 , AWS_ERROR_PKCS11_CKR_FUNCTION_CANCELED = 1099 , AWS_ERROR_PKCS11_CKR_FUNCTION_NOT_PARALLEL = 1100 , AWS_ERROR_PKCS11_CKR_FUNCTION_NOT_SUPPORTED = 1101 , AWS_ERROR_PKCS11_CKR_KEY_HANDLE_INVALID = 1102 , AWS_ERROR_PKCS11_CKR_KEY_SIZE_RANGE = 1103 , AWS_ERROR_PKCS11_CKR_KEY_TYPE_INCONSISTENT = 1104 , AWS_ERROR_PKCS11_CKR_KEY_NOT_NEEDED = 1105 , AWS_ERROR_PKCS11_CKR_KEY_CHANGED = 1106 , AWS_ERROR_PKCS11_CKR_KEY_NEEDED = 1107 , AWS_ERROR_PKCS11_CKR_KEY_INDIGESTIBLE = 1108 , AWS_ERROR_PKCS11_CKR_KEY_FUNCTION_NOT_PERMITTED = 1109 , AWS_ERROR_PKCS11_CKR_KEY_NOT_WRAPPABLE = 1110 , AWS_ERROR_PKCS11_CKR_KEY_UNEXTRACTABLE = 1111 , AWS_ERROR_PKCS11_CKR_MECHANISM_INVALID = 1112 , AWS_ERROR_PKCS11_CKR_MECHANISM_PARAM_INVALID = 1113 , AWS_ERROR_PKCS11_CKR_OBJECT_HANDLE_INVALID = 1114 , AWS_ERROR_PKCS11_CKR_OPERATION_ACTIVE = 1115 , AWS_ERROR_PKCS11_CKR_OPERATION_NOT_INITIALIZED = 1116 , AWS_ERROR_PKCS11_CKR_PIN_INCORRECT = 1117 , AWS_ERROR_PKCS11_CKR_PIN_INVALID = 1118 , AWS_ERROR_PKCS11_CKR_PIN_LEN_RANGE = 1119 , AWS_ERROR_PKCS11_CKR_PIN_EXPIRED = 1120 , AWS_ERROR_PKCS11_CKR_PIN_LOCKED = 1121 , AWS_ERROR_PKCS11_CKR_SESSION_CLOSED = 1122 , AWS_ERROR_PKCS11_CKR_SESSION_COUNT = 1123 , AWS_ERROR_PKCS11_CKR_SESSION_HANDLE_INVALID = 1124 , AWS_ERROR_PKCS11_CKR_SESSION_PARALLEL_NOT_SUPPORTED = 1125 , AWS_ERROR_PKCS11_CKR_SESSION_READ_ONLY = 1126 , AWS_ERROR_PKCS11_CKR_SESSION_EXISTS = 1127 , AWS_ERROR_PKCS11_CKR_SESSION_READ_ONLY_EXISTS = 1128 , AWS_ERROR_PKCS11_CKR_SESSION_READ_WRITE_SO_EXISTS = 1129 , AWS_ERROR_PKCS11_CKR_SIGNATURE_INVALID = 1130 , AWS_ERROR_PKCS11_CKR_SIGNATURE_LEN_RANGE = 1131 , AWS_ERROR_PKCS11_CKR_TEMPLATE_INCOMPLETE = 1132 , AWS_ERROR_PKCS11_CKR_TEMPLATE_INCONSISTENT = 1133 , AWS_ERROR_PKCS11_CKR_TOKEN_NOT_PRESENT = 1134 , AWS_ERROR_PKCS11_CKR_TOKEN_NOT_RECOGNIZED = 1135 , AWS_ERROR_PKCS11_CKR_TOKEN_WRITE_PROTECTED = 1136 , AWS_ERROR_PKCS11_CKR_UNWRAPPING_KEY_HANDLE_INVALID = 1137 , AWS_ERROR_PKCS11_CKR_UNWRAPPING_KEY_SIZE_RANGE = 1138 , AWS_ERROR_PKCS11_CKR_UNWRAPPING_KEY_TYPE_INCONSISTENT = 1139 , AWS_ERROR_PKCS11_CKR_USER_ALREADY_LOGGED_IN = 1140 , AWS_ERROR_PKCS11_CKR_USER_NOT_LOGGED_IN = 1141 , AWS_ERROR_PKCS11_CKR_USER_PIN_NOT_INITIALIZED = 1142 , AWS_ERROR_PKCS11_CKR_USER_TYPE_INVALID = 1143 , AWS_ERROR_PKCS11_CKR_USER_ANOTHER_ALREADY_LOGGED_IN = 1144 , AWS_ERROR_PKCS11_CKR_USER_TOO_MANY_TYPES = 1145 , AWS_ERROR_PKCS11_CKR_WRAPPED_KEY_INVALID = 1146 , AWS_ERROR_PKCS11_CKR_WRAPPED_KEY_LEN_RANGE = 1147 , AWS_ERROR_PKCS11_CKR_WRAPPING_KEY_HANDLE_INVALID = 1148 , AWS_ERROR_PKCS11_CKR_WRAPPING_KEY_SIZE_RANGE = 1149 , AWS_ERROR_PKCS11_CKR_WRAPPING_KEY_TYPE_INCONSISTENT = 1150 , AWS_ERROR_PKCS11_CKR_RANDOM_SEED_NOT_SUPPORTED = 1151 , AWS_ERROR_PKCS11_CKR_RANDOM_NO_RNG = 1152 , AWS_ERROR_PKCS11_CKR_DOMAIN_PARAMS_INVALID = 1153 , AWS_ERROR_PKCS11_CKR_CURVE_NOT_SUPPORTED = 1154 , AWS_ERROR_PKCS11_CKR_BUFFER_TOO_SMALL = 1155 , AWS_ERROR_PKCS11_CKR_SAVED_STATE_INVALID = 1156 , AWS_ERROR_PKCS11_CKR_INFORMATION_SENSITIVE = 1157 , AWS_ERROR_PKCS11_CKR_STATE_UNSAVEABLE = 1158 , AWS_ERROR_PKCS11_CKR_CRYPTOKI_NOT_INITIALIZED = 1159 , AWS_ERROR_PKCS11_CKR_CRYPTOKI_ALREADY_INITIALIZED = 1160 , AWS_ERROR_PKCS11_CKR_MUTEX_BAD = 1161 , AWS_ERROR_PKCS11_CKR_MUTEX_NOT_LOCKED = 1162 , AWS_ERROR_PKCS11_CKR_NEW_PIN_MODE = 1163 , AWS_ERROR_PKCS11_CKR_NEXT_OTP = 1164 , AWS_ERROR_PKCS11_CKR_EXCEEDED_MAX_ITERATIONS = 1165 , AWS_ERROR_PKCS11_CKR_FIPS_SELF_TEST_FAILED = 1166 , AWS_ERROR_PKCS11_CKR_LIBRARY_LOAD_FAILED = 1167 , AWS_ERROR_PKCS11_CKR_PIN_TOO_WEAK = 1168 , AWS_ERROR_PKCS11_CKR_PUBLIC_KEY_INVALID = 1169 , AWS_ERROR_PKCS11_CKR_FUNCTION_REJECTED = 1170 , AWS_ERROR_IO_PINNED_EVENT_LOOP_MISMATCH = 1171 , AWS_ERROR_PKCS11_ENCODING_ERROR = 1172 , AWS_IO_TLS_ERROR_DEFAULT_TRUST_STORE_NOT_FOUND = 1173 , AWS_IO_STREAM_SEEK_FAILED = 1174 , AWS_IO_STREAM_GET_LENGTH_FAILED = 1175 , AWS_IO_STREAM_SEEK_UNSUPPORTED = 1176 , AWS_IO_STREAM_GET_LENGTH_UNSUPPORTED = 1177 , AWS_IO_TLS_ERROR_READ_FAILURE = 1178 , AWS_ERROR_PEM_MALFORMED = 1179 , AWS_IO_SOCKET_MISSING_EVENT_LOOP = 1180 , AWS_IO_TLS_UNKNOWN_ROOT_CERTIFICATE = 1181 , AWS_IO_TLS_NO_ROOT_CERTIFICATE_FOUND = 1182 , AWS_IO_TLS_CERTIFICATE_EXPIRED = 1183 , AWS_IO_TLS_CERTIFICATE_NOT_YET_VALID = 1184 , AWS_IO_TLS_BAD_CERTIFICATE = 1185 , AWS_IO_TLS_PEER_CERTIFICATE_EXPIRED = 1186 , AWS_IO_TLS_BAD_PEER_CERTIFICATE = 1187 , AWS_IO_TLS_PEER_CERTIFICATE_REVOKED = 1188 , AWS_IO_TLS_PEER_CERTIFICATE_UNKNOWN = 1189 , AWS_IO_TLS_INTERNAL_ERROR = 1190 , AWS_IO_TLS_CLOSED_GRACEFUL = 1191 , AWS_IO_TLS_CLOSED_ABORT = 1192 , AWS_IO_TLS_INVALID_CERTIFICATE_CHAIN = 1193 , AWS_IO_TLS_HOST_NAME_MISMATCH = 1194 , AWS_IO_DNS_QUERY_AGAIN = 1195 , AWS_IO_ERROR_END_RANGE = 2047 , AWS_IO_INVALID_FILE_HANDLE = 50 , } unsafe extern "C" { # [doc = " Initializes internal datastructures used by aws-c-io.\n Must be called before using any functionality in aws-c-io."] pub fn aws_io_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Shuts down the internal datastructures used by aws-c-io."] pub fn aws_io_library_clean_up () ; } unsafe extern "C" { pub fn aws_io_fatal_assert_library_initialized () ; } unsafe extern "C" { pub fn aws_io_error_code_is_retryable (error_code : :: libc :: c_int) -> bool ; } # [doc = " struct aws_atomic_var represents an atomic variable - a value which can hold an integer or pointer\n that can be manipulated atomically. struct aws_atomic_vars should normally only be manipulated\n with atomics methods defined in this header."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_atomic_var { pub value : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_atomic_var"] [:: std :: mem :: size_of :: < aws_atomic_var > () - 8usize] ; ["Alignment of aws_atomic_var"] [:: std :: mem :: align_of :: < aws_atomic_var > () - 8usize] ; ["Offset of field: aws_atomic_var::value"] [:: std :: mem :: offset_of ! (aws_atomic_var , value) - 0usize] ; } ; 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 () } } } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_memory_order { # [doc = " No particular ordering constraints are guaranteed relative to other\n operations at all; we merely ensure that the operation itself is atomic."] aws_memory_order_relaxed = 0 , # [doc = " Specifies acquire ordering. No reads or writes on the current thread can be\n reordered to happen before this operation. This is typically paired with a release\n ordering; any writes that happened on the releasing operation will be visible\n after the paired acquire operation.\n\n Acquire ordering is only meaningful on load or load-store operations."] aws_memory_order_acquire = 2 , # [doc = " Specifies release order. No reads or writes can be reordered to come after this\n operation. Typically paired with an acquire operation.\n\n Release ordering is only meaningful on store or load-store operations."] aws_memory_order_release = 3 , # [doc = " Specifies acquire-release order; if this operation acts as a load, it acts as an\n acquire operation; if it acts as a store, it acts as a release operation; if it's\n a load-store, it does both."] aws_memory_order_acq_rel = 4 , # [doc = " Specifies acquire-release order; if this operation acts as a load, it acts as an\n acquire operation; if it acts as a store, it acts as a release operation; if it's\n a load-store, it does both."] aws_memory_order_seq_cst = 5 , } unsafe extern "C" { # [doc = " Initializes an atomic variable with an integer value. This operation should be done before any\n other operations on this atomic variable, and must be done before attempting any parallel operations.\n\n This operation does not imply a barrier. Ensure that you use an acquire-release barrier (or stronger)\n when communicating the fact that initialization is complete to the other thread. Launching the thread\n implies a sufficiently strong barrier."] pub fn aws_atomic_init_int (var : * mut aws_atomic_var , n : usize) ; } unsafe extern "C" { # [doc = " Initializes an atomic variable with a pointer value. This operation should be done before any\n other operations on this atomic variable, and must be done before attempting any parallel operations.\n\n This operation does not imply a barrier. Ensure that you use an acquire-release barrier (or stronger)\n when communicating the fact that initialization is complete to the other thread. Launching the thread\n implies a sufficiently strong barrier."] pub fn aws_atomic_init_ptr (var : * mut aws_atomic_var , p : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Reads an atomic var as an integer, using the specified ordering, and returns the result."] pub fn aws_atomic_load_int_explicit (var : * const aws_atomic_var , memory_order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Reads an atomic var as an integer, using sequentially consistent ordering, and returns the result."] pub fn aws_atomic_load_int (var : * const aws_atomic_var) -> usize ; } unsafe extern "C" { # [doc = " Reads an atomic var as a pointer, using the specified ordering, and returns the result."] pub fn aws_atomic_load_ptr_explicit (var : * const aws_atomic_var , memory_order : aws_memory_order) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Reads an atomic var as a pointer, using sequentially consistent ordering, and returns the result."] pub fn aws_atomic_load_ptr (var : * const aws_atomic_var) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Stores an integer into an atomic var, using the specified ordering."] pub fn aws_atomic_store_int_explicit (var : * mut aws_atomic_var , n : usize , memory_order : aws_memory_order) ; } unsafe extern "C" { # [doc = " Stores an integer into an atomic var, using sequentially consistent ordering."] pub fn aws_atomic_store_int (var : * mut aws_atomic_var , n : usize) ; } unsafe extern "C" { # [doc = " Stores a pointer into an atomic var, using the specified ordering."] pub fn aws_atomic_store_ptr_explicit (var : * mut aws_atomic_var , p : * mut :: libc :: c_void , memory_order : aws_memory_order) ; } unsafe extern "C" { # [doc = " Stores a pointer into an atomic var, using sequentially consistent ordering."] pub fn aws_atomic_store_ptr (var : * mut aws_atomic_var , p : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Exchanges an integer with the value in an atomic_var, using the specified ordering.\n Returns the value that was previously in the atomic_var."] pub fn aws_atomic_exchange_int_explicit (var : * mut aws_atomic_var , n : usize , memory_order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Exchanges an integer with the value in an atomic_var, using sequentially consistent ordering.\n Returns the value that was previously in the atomic_var."] pub fn aws_atomic_exchange_int (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Exchanges a pointer with the value in an atomic_var, using the specified ordering.\n Returns the value that was previously in the atomic_var."] pub fn aws_atomic_exchange_ptr_explicit (var : * mut aws_atomic_var , p : * mut :: libc :: c_void , memory_order : aws_memory_order) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Exchanges an integer with the value in an atomic_var, using sequentially consistent ordering.\n Returns the value that was previously in the atomic_var."] pub fn aws_atomic_exchange_ptr (var : * mut aws_atomic_var , p : * mut :: libc :: c_void) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set\n to the value in *var. On success, the memory ordering used was order_success; otherwise, it was order_failure.\n order_failure must be no stronger than order_success, and must not be release or acq_rel.\n Returns true if the compare was successful and the variable updated to desired."] pub fn aws_atomic_compare_exchange_int_explicit (var : * mut aws_atomic_var , expected : * mut usize , desired : usize , order_success : aws_memory_order , order_failure : aws_memory_order) -> bool ; } unsafe extern "C" { # [doc = " Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set\n to the value in *var. Uses sequentially consistent memory ordering, regardless of success or failure.\n Returns true if the compare was successful and the variable updated to desired."] pub fn aws_atomic_compare_exchange_int (var : * mut aws_atomic_var , expected : * mut usize , desired : usize) -> bool ; } unsafe extern "C" { # [doc = " Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set\n to the value in *var. On success, the memory ordering used was order_success; otherwise, it was order_failure.\n order_failure must be no stronger than order_success, and must not be release or acq_rel.\n Returns true if the compare was successful and the variable updated to desired."] pub fn aws_atomic_compare_exchange_ptr_explicit (var : * mut aws_atomic_var , expected : * mut * mut :: libc :: c_void , desired : * mut :: libc :: c_void , order_success : aws_memory_order , order_failure : aws_memory_order) -> bool ; } unsafe extern "C" { # [doc = " Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set\n to the value in *var. Uses sequentially consistent memory ordering, regardless of success or failure.\n Returns true if the compare was successful and the variable updated to desired."] pub fn aws_atomic_compare_exchange_ptr (var : * mut aws_atomic_var , expected : * mut * mut :: libc :: c_void , desired : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " Atomically adds n to *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_add_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically subtracts n from *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_sub_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically ORs n with *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_or_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically ANDs n with *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_and_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically XORs n with *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_xor_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically adds n to *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_add (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Atomically subtracts n from *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_sub (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Atomically ands n into *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_and (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Atomically ors n into *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_or (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Atomically xors n into *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_xor (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Provides the same reordering guarantees as an atomic operation with the specified memory order, without\n needing to actually perform an atomic operation."] pub fn aws_atomic_thread_fence (order : aws_memory_order) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_string { pub allocator : * mut aws_allocator , pub len : usize , pub bytes : [u8 ; 1usize] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_string"] [:: std :: mem :: size_of :: < aws_string > () - 24usize] ; ["Alignment of aws_string"] [:: std :: mem :: align_of :: < aws_string > () - 8usize] ; ["Offset of field: aws_string::allocator"] [:: std :: mem :: offset_of ! (aws_string , allocator) - 0usize] ; ["Offset of field: aws_string::len"] [:: std :: mem :: offset_of ! (aws_string , len) - 8usize] ; ["Offset of field: aws_string::bytes"] [:: std :: mem :: offset_of ! (aws_string , bytes) - 16usize] ; } ; 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 () } } } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn aws_string_eq_c_str (str_ : * const aws_string , c_str : * const :: libc :: c_char) -> bool ; } unsafe 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 :: libc :: c_char) -> bool ; } unsafe 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 :: libc :: c_char) -> * mut aws_string ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Deallocate string."] pub fn aws_string_destroy (str_ : * mut aws_string) ; } unsafe extern "C" { # [doc = " Zeroes out the data bytes of string and then deallocates the memory.\n Not safe to run on a string created with AWS_STATIC_STRING_FROM_LITERAL."] pub fn aws_string_destroy_secure (str_ : * mut aws_string) ; } unsafe extern "C" { # [doc = " Compares lexicographical ordering of two strings. This is a binary\n byte-by-byte comparison, treating bytes as unsigned integers. It is suitable\n for either textual or binary data and is unaware of unicode or any other byte\n encoding. If both strings are identical in the bytes of the shorter string,\n then the longer string is lexicographically after the shorter.\n\n Returns a positive number if string a > string b. (i.e., string a is\n lexicographically after string b.) Returns zero if string a = string b.\n Returns negative number if string a < string b."] pub fn aws_string_compare (a : * const aws_string , b : * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " A convenience function for sorting lists of (const struct aws_string *) elements. This can be used as a\n 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 :: libc :: c_void , b : * const :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies all bytes from string to buf.\n\n On success, returns true and updates the buf pointer/length\n accordingly. If there is insufficient space in the buf, returns\n false, leaving the buf unchanged."] pub fn aws_byte_buf_write_from_whole_string (buf : * mut aws_byte_buf , src : * const aws_string) -> bool ; } unsafe extern "C" { # [doc = " Creates an aws_byte_cursor from an existing string.\n If the src is NULL, it returns an empty cursor"] pub fn aws_byte_cursor_from_string (src : * const aws_string) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " If the string was dynamically allocated, clones it. If the string was statically allocated (i.e. has no allocator),\n returns the original string."] pub fn aws_string_clone_or_reuse (allocator : * mut aws_allocator , str_ : * const aws_string) -> * mut aws_string ; } unsafe 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\n is found within max_read_len of str, AWS_ERROR_C_STRING_BUFFER_NOT_NULL_TERMINATED is raised. Otherwise, str_len\n will contain the string length minus the NULL character, and AWS_OP_SUCCESS will be returned."] pub fn aws_secure_strlen (str_ : * const :: libc :: c_char , max_read_len : usize , str_len : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Equivalent to str->bytes."] pub fn aws_string_bytes (str_ : * const aws_string) -> * const u8 ; } unsafe extern "C" { # [doc = " Equivalent to `(const char *)str->bytes`."] pub fn aws_string_c_str (str_ : * const aws_string) -> * const :: libc :: c_char ; } unsafe extern "C" { # [doc = " Evaluates the set of properties that define the shape of all valid aws_string structures.\n It is also a cheap check, in the sense it run in constant time (i.e., no loops or recursion)."] pub fn aws_string_is_valid (str_ : * const aws_string) -> bool ; } unsafe extern "C" { # [doc = " Best-effort checks aws_string invariants, when the str->len is unknown"] pub fn aws_c_string_is_valid (str_ : * const :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " Evaluates if a char is a white character."] pub fn aws_char_is_space (c : u8) -> bool ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_thread_detach_state { AWS_THREAD_NOT_CREATED = 1 , AWS_THREAD_JOINABLE = 2 , AWS_THREAD_JOIN_COMPLETED = 3 , AWS_THREAD_MANAGED = 4 , } # [repr (u32)] # [non_exhaustive] # [doc = " Specifies the join strategy used on an aws_thread, which in turn controls whether or not a thread participates\n in the managed thread system.  The managed thread system provides logic to guarantee a join on all participating\n threads at the cost of laziness (the user cannot control when joins happen).\n\n Manual - thread does not participate in the managed thread system; any joins must be done by the user.  This\n is the default.  The user must call aws_thread_clean_up(), but only after any desired join operation has completed.\n Not doing so will cause the windows handle to leak.\n\n Managed - the managed thread system will automatically perform a join some time after the thread's run function\n has completed.  It is an error to call aws_thread_join on a thread configured with the managed join strategy.  The\n managed thread system will call aws_thread_clean_up() on the thread after the background join has completed.\n\n Additionally, an API exists, aws_thread_join_all_managed(), which blocks and returns when all outstanding threads\n with the managed strategy have fully joined.  This API is useful for tests (rather than waiting for many individual\n signals) and program shutdown or DLL unload.  This API is automatically invoked by the common library clean up\n function.  If the common library clean up is called from a managed thread, this will cause deadlock.\n\n Lazy thread joining is done only when threads finish their run function or when the user calls\n aws_thread_join_all_managed().  This means it may be a long time between thread function completion and the join\n being applied, but the queue of unjoined threads is always one or fewer so there is no critical resource\n backlog.\n\n Currently, only event loop group async cleanup and host resolver threads participate in the managed thread system.\n Additionally, event loop threads will increment and decrement the pending join count (they are manually joined\n internally) in order to have an accurate view of internal thread usage and also to prevent failure to release\n an event loop group fully from allowing aws_thread_join_all_managed() from running to completion when its\n intent is such that it should block instead."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_thread_join_strategy { AWS_TJS_MANUAL = 0 , AWS_TJS_MANAGED = 1 , } # [repr (C)] # [derive (Debug , Copy , Clone)] 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.\n The length should not exceed AWS_THREAD_NAME_RECOMMENDED_STRLEN(15)\n if you want it to display properly on all platforms."] pub name : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_thread_options"] [:: std :: mem :: size_of :: < aws_thread_options > () - 32usize] ; ["Alignment of aws_thread_options"] [:: std :: mem :: align_of :: < aws_thread_options > () - 8usize] ; ["Offset of field: aws_thread_options::stack_size"] [:: std :: mem :: offset_of ! (aws_thread_options , stack_size) - 0usize] ; ["Offset of field: aws_thread_options::cpu_id"] [:: std :: mem :: offset_of ! (aws_thread_options , cpu_id) - 8usize] ; ["Offset of field: aws_thread_options::join_strategy"] [:: std :: mem :: offset_of ! (aws_thread_options , join_strategy) - 12usize] ; ["Offset of field: aws_thread_options::name"] [:: std :: mem :: offset_of ! (aws_thread_options , name) - 16usize] ; } ; 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_thread"] [:: std :: mem :: size_of :: < aws_thread > () - 24usize] ; ["Alignment of aws_thread"] [:: std :: mem :: align_of :: < aws_thread > () - 8usize] ; ["Offset of field: aws_thread::allocator"] [:: std :: mem :: offset_of ! (aws_thread , allocator) - 0usize] ; ["Offset of field: aws_thread::detach_state"] [:: std :: mem :: offset_of ! (aws_thread , detach_state) - 8usize] ; ["Offset of field: aws_thread::thread_id"] [:: std :: mem :: offset_of ! (aws_thread , thread_id) - 16usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Returns an instance of system default thread options."] pub fn aws_default_thread_options () -> * const aws_thread_options ; } unsafe extern "C" { pub fn aws_thread_call_once (flag : * mut aws_thread_once , call_once : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: libc :: c_void) > , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Initializes a new platform specific thread object struct (not the os-level\n thread itself)."] pub fn aws_thread_init (thread : * mut aws_thread , allocator : * mut aws_allocator) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Creates an OS level thread and associates it with func. context will be passed to func when it is executed.\n options will be applied to the thread if they are applicable for the platform.\n\n After launch, you may join on the thread.  A successfully launched thread must have clean_up called on it in order\n to avoid a handle leak.  If you do not join before calling clean_up, the thread will become detached.\n\n 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 :: libc :: c_void) > , arg : * mut :: libc :: c_void , options : * const aws_thread_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the id of thread"] pub fn aws_thread_get_id (thread : * mut aws_thread) -> aws_thread_id_t ; } unsafe extern "C" { # [doc = " Gets the detach state of the thread. For example, is it safe to call join on\n this thread? Has it been detached()?"] pub fn aws_thread_get_detach_state (thread : * mut aws_thread) -> aws_thread_detach_state ; } unsafe extern "C" { # [doc = " Joins the calling thread to a thread instance. Returns when thread is\n finished.  Calling this from the associated OS thread will cause a deadlock."] pub fn aws_thread_join (thread : * mut aws_thread) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Blocking call that waits for all managed threads to complete their join call.  This can only be called\n from the main thread or a non-managed thread.\n\n This gets called automatically from library cleanup.\n\n 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 () -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Overrides how long, in nanoseconds, that aws_thread_join_all_managed will wait for threads to complete.\n A value of zero will result in an unbounded wait."] pub fn aws_thread_set_managed_join_timeout_ns (timeout_in_ns : u64) ; } unsafe 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\n before calling this function."] pub fn aws_thread_clean_up (thread : * mut aws_thread) ; } unsafe extern "C" { # [doc = " Returns the thread id of the calling thread."] pub fn aws_thread_current_thread_id () -> aws_thread_id_t ; } unsafe extern "C" { # [doc = " Compare thread ids."] pub fn aws_thread_thread_id_equal (t1 : aws_thread_id_t , t2 : aws_thread_id_t) -> bool ; } unsafe 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 :: libc :: c_void) > ; unsafe extern "C" { # [doc = " Adds a callback to the chain to be called when the current thread joins.\n Callbacks are called from the current thread, in the reverse order they\n were added, after the thread function returns.\n 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 :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Increments the count of unjoined threads in the managed thread system.  Used by managed threads and\n event loop threads.  Additional usage requires the user to join corresponding threads themselves and\n correctly increment/decrement even in the face of launch/join errors.\n\n aws_thread_join_all_managed() will not return until this count has gone to zero."] pub fn aws_thread_increment_unjoined_count () ; } unsafe extern "C" { # [doc = " Decrements the count of unjoined threads in the managed thread system.  Used by managed threads and\n event loop threads.  Additional usage requires the user to join corresponding threads themselves and\n correctly increment/decrement even in the face of launch/join errors.\n\n aws_thread_join_all_managed() will not return until this count has gone to zero."] pub fn aws_thread_decrement_unjoined_count () ; } unsafe extern "C" { # [doc = " Gets name of the current thread.\n Caller is responsible for destroying returned string.\n If thread does not have a name, AWS_OP_SUCCESS is returned and out_name is\n set to NULL.\n If underlying OS call fails,  AWS_ERROR_SYS_CALL_FAILURE will be raised\n If OS does not support getting thread name, AWS_ERROR_PLATFORM_NOT_SUPPORTED\n will be raised"] pub fn aws_thread_current_name (allocator : * mut aws_allocator , out_name : * mut * mut aws_string) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets name of the thread.\n Caller is responsible for destroying returned string.\n If thread does not have a name, AWS_OP_SUCCESS is returned and out_name is\n set to NULL.\n If underlying OS call fails,  AWS_ERROR_SYS_CALL_FAILURE will be raised\n If OS does not support getting thread name, AWS_ERROR_PLATFORM_NOT_SUPPORTED\n will be raised"] pub fn aws_thread_name (allocator : * mut aws_allocator , thread_id : aws_thread_id_t , out_name : * mut * mut aws_string) -> :: libc :: c_int ; } pub mod aws_log_level { # [doc = " Controls what log calls pass through the logger and what log calls get filtered out.\n If a log level has a value of X, then all log calls using a level <= X will appear, while\n those using a value > X will not occur.\n\n You can filter both dynamically (by setting the log level on the logger object) or statically\n (by defining AWS_STATIC_LOG_LEVEL to be an appropriate integer module-wide).  Statically filtered\n log calls will be completely compiled out but require a rebuild if you want to get more detail\n about what's happening."] pub type Type = :: libc :: c_uint ; pub const AWS_LL_NONE : Type = 0 ; pub const AWS_LL_FATAL : Type = 1 ; pub const AWS_LL_ERROR : Type = 2 ; pub const AWS_LL_WARN : Type = 3 ; pub const AWS_LL_INFO : Type = 4 ; pub const AWS_LL_DEBUG : Type = 5 ; pub const AWS_LL_TRACE : Type = 6 ; pub const AWS_LL_COUNT : Type = 7 ; } # [doc = " Log subject is a way of designating the topic of logging.\n\n The general idea is to support a finer-grained approach to log level control.  The primary use case\n is for situations that require more detailed logging within a specific domain, where enabling that detail\n globally leads to an untenable flood of information.\n\n For example, enable TRACE logging for tls-related log statements (handshake binary payloads), but\n only WARN logging everywhere else (because http payloads would blow up the log files).\n\n Log subject is an enum similar to aws error: each library has its own value-space and someone is\n responsible for registering the value <-> string connections."] pub type aws_log_subject_t = u32 ; pub const AWS_LOG_SUBJECT_STRIDE_BITS : _bindgen_ty_20 = _bindgen_ty_20 :: AWS_LOG_SUBJECT_STRIDE_BITS ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_20 { AWS_LOG_SUBJECT_STRIDE_BITS = 10 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_log_subject_info { pub subject_id : aws_log_subject_t , pub subject_name : * const :: libc :: c_char , pub subject_description : * const :: libc :: c_char , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_subject_info"] [:: std :: mem :: size_of :: < aws_log_subject_info > () - 24usize] ; ["Alignment of aws_log_subject_info"] [:: std :: mem :: align_of :: < aws_log_subject_info > () - 8usize] ; ["Offset of field: aws_log_subject_info::subject_id"] [:: std :: mem :: offset_of ! (aws_log_subject_info , subject_id) - 0usize] ; ["Offset of field: aws_log_subject_info::subject_name"] [:: std :: mem :: offset_of ! (aws_log_subject_info , subject_name) - 8usize] ; ["Offset of field: aws_log_subject_info::subject_description"] [:: std :: mem :: offset_of ! (aws_log_subject_info , subject_description) - 16usize] ; } ; 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)] pub struct aws_log_subject_info_list { pub subject_list : * mut aws_log_subject_info , pub count : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_subject_info_list"] [:: std :: mem :: size_of :: < aws_log_subject_info_list > () - 16usize] ; ["Alignment of aws_log_subject_info_list"] [:: std :: mem :: align_of :: < aws_log_subject_info_list > () - 8usize] ; ["Offset of field: aws_log_subject_info_list::subject_list"] [:: std :: mem :: offset_of ! (aws_log_subject_info_list , subject_list) - 0usize] ; ["Offset of field: aws_log_subject_info_list::count"] [:: std :: mem :: offset_of ! (aws_log_subject_info_list , count) - 8usize] ; } ; 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 () } } } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_common_log_subject { AWS_LS_COMMON_GENERAL = 0 , AWS_LS_COMMON_TASK_SCHEDULER = 1 , AWS_LS_COMMON_THREAD = 2 , AWS_LS_COMMON_MEMTRACE = 3 , AWS_LS_COMMON_XML_PARSER = 4 , AWS_LS_COMMON_IO = 5 , AWS_LS_COMMON_BUS = 6 , AWS_LS_COMMON_TEST = 7 , AWS_LS_COMMON_JSON_PARSER = 8 , AWS_LS_COMMON_CBOR = 9 , AWS_LS_COMMON_LAST = 1023 , } # [doc = " We separate the log level function from the log call itself so that we can do the filter check in the macros (see\n below)\n\n By doing so, we make it so that the variadic format arguments are not even evaluated if the filter check does not\n succeed."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_logger_vtable { pub log : :: std :: option :: Option < unsafe extern "C" fn (logger : * mut aws_logger , log_level : aws_log_level :: Type , subject : aws_log_subject_t , format : * const :: libc :: c_char , ...) -> :: libc :: 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 :: Type > , 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 :: Type) -> :: libc :: c_int > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logger_vtable"] [:: std :: mem :: size_of :: < aws_logger_vtable > () - 32usize] ; ["Alignment of aws_logger_vtable"] [:: std :: mem :: align_of :: < aws_logger_vtable > () - 8usize] ; ["Offset of field: aws_logger_vtable::log"] [:: std :: mem :: offset_of ! (aws_logger_vtable , log) - 0usize] ; ["Offset of field: aws_logger_vtable::get_log_level"] [:: std :: mem :: offset_of ! (aws_logger_vtable , get_log_level) - 8usize] ; ["Offset of field: aws_logger_vtable::clean_up"] [:: std :: mem :: offset_of ! (aws_logger_vtable , clean_up) - 16usize] ; ["Offset of field: aws_logger_vtable::set_log_level"] [:: std :: mem :: offset_of ! (aws_logger_vtable , set_log_level) - 24usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_logger { pub vtable : * mut aws_logger_vtable , pub allocator : * mut aws_allocator , pub p_impl : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logger"] [:: std :: mem :: size_of :: < aws_logger > () - 24usize] ; ["Alignment of aws_logger"] [:: std :: mem :: align_of :: < aws_logger > () - 8usize] ; ["Offset of field: aws_logger::vtable"] [:: std :: mem :: offset_of ! (aws_logger , vtable) - 0usize] ; ["Offset of field: aws_logger::allocator"] [:: std :: mem :: offset_of ! (aws_logger , allocator) - 8usize] ; ["Offset of field: aws_logger::p_impl"] [:: std :: mem :: offset_of ! (aws_logger , p_impl) - 16usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logger_pipeline"] [:: std :: mem :: size_of :: < aws_logger_pipeline > () - 40usize] ; ["Alignment of aws_logger_pipeline"] [:: std :: mem :: align_of :: < aws_logger_pipeline > () - 8usize] ; ["Offset of field: aws_logger_pipeline::formatter"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , formatter) - 0usize] ; ["Offset of field: aws_logger_pipeline::channel"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , channel) - 8usize] ; ["Offset of field: aws_logger_pipeline::writer"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , writer) - 16usize] ; ["Offset of field: aws_logger_pipeline::allocator"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , allocator) - 24usize] ; ["Offset of field: aws_logger_pipeline::level"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , level) - 32usize] ; } ; 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().\n Set `filename` to open a file for logging and close it when the logger cleans up.\n Set `file` to use a file that is already open, such as `stderr` or `stdout`."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_logger_standard_options { pub level : aws_log_level :: Type , pub filename : * const :: libc :: c_char , pub file : * mut FILE , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logger_standard_options"] [:: std :: mem :: size_of :: < aws_logger_standard_options > () - 24usize] ; ["Alignment of aws_logger_standard_options"] [:: std :: mem :: align_of :: < aws_logger_standard_options > () - 8usize] ; ["Offset of field: aws_logger_standard_options::level"] [:: std :: mem :: offset_of ! (aws_logger_standard_options , level) - 0usize] ; ["Offset of field: aws_logger_standard_options::filename"] [:: std :: mem :: offset_of ! (aws_logger_standard_options , filename) - 8usize] ; ["Offset of field: aws_logger_standard_options::file"] [:: std :: mem :: offset_of ! (aws_logger_standard_options , file) - 16usize] ; } ; 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 () } } } unsafe 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) ; } unsafe extern "C" { # [doc = " Gets the aws logger used globally across the process."] pub fn aws_logger_get () -> * mut aws_logger ; } unsafe extern "C" { # [doc = " Gets the aws logger used globally across the process if the logging level is at least the inputted level.\n\n @param subject log subject to perform the level check versus, not currently used\n @param level logging level to check against in order to return the logger\n @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 :: Type) -> * mut aws_logger ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Sets the current logging level for the logger.  Loggers are not require to support this.\n @param logger logger to set the log level for\n @param level new log level for the logger\n @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 :: Type) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Converts a log level to a c-string constant.  Intended primarily to support building log lines that\n include the level in them, i.e.\n\n [ERROR] 10:34:54.642 01-31-19 - Json parse error...."] pub fn aws_log_level_to_string (log_level : aws_log_level :: Type , level_string : * mut * const :: libc :: c_char) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Converts a c-string constant to a log level value.  Uses case-insensitive comparison\n and simply iterates all possibilities until a match or nothing remains.  If no match\n is found, AWS_OP_ERR is returned."] pub fn aws_string_to_log_level (level_string : * const :: libc :: c_char , log_level : * mut aws_log_level :: Type) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Converts an aws_thread_id_t to a c-string.  For portability, aws_thread_id_t\n must not be printed directly.  Intended primarily to support building log\n lines that include the thread id in them.  The parameter `buffer` must\n point-to a char buffer of length `bufsz == AWS_THREAD_ID_T_REPR_BUFSZ`.  The\n thread id representation is returned in `buffer`."] pub fn aws_thread_id_t_to_string (thread_id : aws_thread_id_t , buffer : * mut :: libc :: c_char , bufsz : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get subject name from log subject."] pub fn aws_log_subject_name (subject : aws_log_subject_t) -> * const :: libc :: c_char ; } unsafe 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) ; } unsafe 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) ; } unsafe extern "C" { pub fn aws_logger_init_standard (logger : * mut aws_logger , allocator : * mut aws_allocator , options : * mut aws_logger_standard_options) -> :: libc :: c_int ; } unsafe 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 :: Type) -> :: libc :: c_int ; } unsafe extern "C" { pub static mut g_pipeline_logger_owned_vtable : aws_logger_vtable ; } unsafe extern "C" { pub fn aws_logger_init_noalloc (logger : * mut aws_logger , allocator : * mut aws_allocator , options : * mut aws_logger_standard_options) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_io_log_subject { AWS_LS_IO_GENERAL = 1024 , AWS_LS_IO_EVENT_LOOP = 1025 , AWS_LS_IO_SOCKET = 1026 , AWS_LS_IO_SOCKET_HANDLER = 1027 , AWS_LS_IO_TLS = 1028 , AWS_LS_IO_ALPN = 1029 , AWS_LS_IO_DNS = 1030 , AWS_LS_IO_PKI = 1031 , AWS_LS_IO_CHANNEL = 1032 , AWS_LS_IO_CHANNEL_BOOTSTRAP = 1033 , AWS_LS_IO_FILE_UTILS = 1034 , AWS_LS_IO_SHARED_LIBRARY = 1035 , AWS_LS_IO_EXPONENTIAL_BACKOFF_RETRY_STRATEGY = 1036 , AWS_LS_IO_STANDARD_RETRY_STRATEGY = 1037 , AWS_LS_IO_PKCS11 = 1038 , AWS_LS_IO_PEM = 1039 , AWS_IO_LS_LAST = 2047 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_sdkutils_errors { AWS_ERROR_SDKUTILS_GENERAL = 15360 , AWS_ERROR_SDKUTILS_PARSE_FATAL = 15361 , AWS_ERROR_SDKUTILS_PARSE_RECOVERABLE = 15362 , AWS_ERROR_SDKUTILS_ENDPOINTS_UNSUPPORTED_RULESET = 15363 , AWS_ERROR_SDKUTILS_ENDPOINTS_PARSE_FAILED = 15364 , AWS_ERROR_SDKUTILS_ENDPOINTS_RESOLVE_INIT_FAILED = 15365 , AWS_ERROR_SDKUTILS_ENDPOINTS_RESOLVE_FAILED = 15366 , AWS_ERROR_SDKUTILS_ENDPOINTS_EMPTY_RULESET = 15367 , AWS_ERROR_SDKUTILS_ENDPOINTS_RULESET_EXHAUSTED = 15368 , AWS_ERROR_SDKUTILS_PARTITIONS_UNSUPPORTED = 15369 , AWS_ERROR_SDKUTILS_PARTITIONS_PARSE_FAILED = 15370 , AWS_ERROR_SDKUTILS_ENDPOINTS_UNSUPPORTED_REGEX = 15371 , AWS_ERROR_SDKUTILS_ENDPOINTS_REGEX_NO_MATCH = 15372 , AWS_ERROR_SDKUTILS_END_RANGE = 16383 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_sdkutils_log_subject { AWS_LS_SDKUTILS_GENERAL = 15360 , AWS_LS_SDKUTILS_PROFILE = 15361 , AWS_LS_SDKUTILS_ENDPOINTS_PARSING = 15362 , AWS_LS_SDKUTILS_ENDPOINTS_RESOLVE = 15363 , AWS_LS_SDKUTILS_ENDPOINTS_GENERAL = 15364 , AWS_LS_SDKUTILS_PARTITIONS_PARSING = 15365 , AWS_LS_SDKUTILS_ENDPOINTS_REGEX = 15366 , AWS_LS_SDKUTILS_LAST = 16383 , } unsafe extern "C" { pub fn aws_sdkutils_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { pub fn aws_sdkutils_library_clean_up () ; } # [repr (u32)] # [non_exhaustive] # [doc = " Auth-specific error codes"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_auth_errors { AWS_AUTH_PROFILE_PARSE_RECOVERABLE_ERROR = 15362 , AWS_AUTH_PROFILE_PARSE_FATAL_ERROR = 15361 , AWS_AUTH_SIGNING_UNSUPPORTED_ALGORITHM = 6144 , AWS_AUTH_SIGNING_MISMATCHED_CONFIGURATION = 6145 , AWS_AUTH_SIGNING_NO_CREDENTIALS = 6146 , AWS_AUTH_SIGNING_ILLEGAL_REQUEST_QUERY_PARAM = 6147 , AWS_AUTH_SIGNING_ILLEGAL_REQUEST_HEADER = 6148 , AWS_AUTH_SIGNING_INVALID_CONFIGURATION = 6149 , AWS_AUTH_CREDENTIALS_PROVIDER_INVALID_ENVIRONMENT = 6150 , AWS_AUTH_CREDENTIALS_PROVIDER_INVALID_DELEGATE = 6151 , AWS_AUTH_CREDENTIALS_PROVIDER_PROFILE_SOURCE_FAILURE = 6152 , AWS_AUTH_CREDENTIALS_PROVIDER_IMDS_SOURCE_FAILURE = 6153 , AWS_AUTH_CREDENTIALS_PROVIDER_STS_SOURCE_FAILURE = 6154 , AWS_AUTH_CREDENTIALS_PROVIDER_HTTP_STATUS_FAILURE = 6155 , AWS_AUTH_PROVIDER_PARSER_UNEXPECTED_RESPONSE = 6156 , AWS_AUTH_CREDENTIALS_PROVIDER_ECS_SOURCE_FAILURE = 6157 , AWS_AUTH_CREDENTIALS_PROVIDER_X509_SOURCE_FAILURE = 6158 , AWS_AUTH_CREDENTIALS_PROVIDER_PROCESS_SOURCE_FAILURE = 6159 , AWS_AUTH_CREDENTIALS_PROVIDER_STS_WEB_IDENTITY_SOURCE_FAILURE = 6160 , AWS_AUTH_SIGNING_UNSUPPORTED_SIGNATURE_TYPE = 6161 , AWS_AUTH_SIGNING_MISSING_PREVIOUS_SIGNATURE = 6162 , AWS_AUTH_SIGNING_INVALID_CREDENTIALS = 6163 , AWS_AUTH_CANONICAL_REQUEST_MISMATCH = 6164 , AWS_AUTH_SIGV4A_SIGNATURE_VALIDATION_FAILURE = 6165 , AWS_AUTH_CREDENTIALS_PROVIDER_COGNITO_SOURCE_FAILURE = 6166 , AWS_AUTH_CREDENTIALS_PROVIDER_DELEGATE_FAILURE = 6167 , AWS_AUTH_SSO_TOKEN_PROVIDER_SOURCE_FAILURE = 6168 , AWS_AUTH_SSO_TOKEN_INVALID = 6169 , AWS_AUTH_SSO_TOKEN_EXPIRED = 6170 , AWS_AUTH_CREDENTIALS_PROVIDER_SSO_SOURCE_FAILURE = 6171 , AWS_AUTH_IMDS_CLIENT_SOURCE_FAILURE = 6172 , AWS_AUTH_PROFILE_STS_CREDENTIALS_PROVIDER_CYCLE_FAILURE = 6173 , AWS_AUTH_CREDENTIALS_PROVIDER_ECS_INVALID_TOKEN_FILE_PATH = 6174 , AWS_AUTH_CREDENTIALS_PROVIDER_ECS_INVALID_HOST = 6175 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_SESSION_MISSING = 6176 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_REGION_MISSING = 6177 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_TOKEN_PATH = 6178 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_TOKEN = 6179 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_TOKEN_EXPIRED = 6180 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_INVALID_PEM = 6181 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_REFRESH_TOKEN = 6182 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_WRITE_TOKEN = 6183 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_DPOP_HEADER = 6184 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_REQUEST_BODY = 6185 , AWS_AUTH_ERROR_END_RANGE = 7167 , } # [repr (u32)] # [non_exhaustive] # [doc = " Auth-specific logging subjects"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_auth_log_subject { AWS_LS_AUTH_GENERAL = 6144 , AWS_LS_AUTH_PROFILE = 6145 , AWS_LS_AUTH_CREDENTIALS_PROVIDER = 6146 , AWS_LS_AUTH_SIGNING = 6147 , AWS_LS_IMDS_CLIENT = 6148 , AWS_LS_AUTH_LAST = 7167 , } unsafe extern "C" { # [doc = " Initializes internal datastructures used by aws-c-auth.\n Must be called before using any functionality in aws-c-auth.\n\n @param allocator memory allocator to use for any module-level memory allocation"] pub fn aws_auth_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Clean up internal datastructures used by aws-c-auth.\n Must not be called until application is done using functionality in aws-c-auth."] pub fn aws_auth_library_clean_up () ; } pub type aws_simple_completion_callback = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: libc :: c_void) > ; # [doc = " Configuration for a callback to invoke when something has been completely\n cleaned up.  Primarily used in async cleanup control flows."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_shutdown_callback_options { # [doc = " Function to invoke when the associated object is fully destroyed."] pub shutdown_callback_fn : aws_simple_completion_callback , # [doc = " User data to invoke the shutdown callback with."] pub shutdown_callback_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_shutdown_callback_options"] [:: std :: mem :: size_of :: < aws_shutdown_callback_options > () - 16usize] ; ["Alignment of aws_shutdown_callback_options"] [:: std :: mem :: align_of :: < aws_shutdown_callback_options > () - 8usize] ; ["Offset of field: aws_shutdown_callback_options::shutdown_callback_fn"] [:: std :: mem :: offset_of ! (aws_shutdown_callback_options , shutdown_callback_fn) - 0usize] ; ["Offset of field: aws_shutdown_callback_options::shutdown_callback_user_data"] [:: std :: mem :: offset_of ! (aws_shutdown_callback_options , shutdown_callback_user_data) - 8usize] ; } ; 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 () } } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_ref_count { pub ref_count : aws_atomic_var , pub object : * mut :: libc :: c_void , pub on_zero_fn : aws_simple_completion_callback , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_ref_count"] [:: std :: mem :: size_of :: < aws_ref_count > () - 24usize] ; ["Alignment of aws_ref_count"] [:: std :: mem :: align_of :: < aws_ref_count > () - 8usize] ; ["Offset of field: aws_ref_count::ref_count"] [:: std :: mem :: offset_of ! (aws_ref_count , ref_count) - 0usize] ; ["Offset of field: aws_ref_count::object"] [:: std :: mem :: offset_of ! (aws_ref_count , object) - 8usize] ; ["Offset of field: aws_ref_count::on_zero_fn"] [:: std :: mem :: offset_of ! (aws_ref_count , on_zero_fn) - 16usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Initializes a ref-counter structure.  After initialization, the ref count will be 1.\n\n @param ref_count ref-counter to initialize\n @param object object being ref counted\n @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 :: libc :: c_void , on_zero_fn : aws_simple_completion_callback) ; } unsafe extern "C" { # [doc = " Increments a ref-counter's ref count\n\n @param ref_count ref-counter to increment the count for\n @return the object being ref-counted"] pub fn aws_ref_count_acquire (ref_count : * mut aws_ref_count) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Decrements a ref-counter's ref count.  Invokes the on_zero callback if the ref count drops to zero\n @param ref_count ref-counter to decrement the count for\n @return the value of the decremented ref count"] pub fn aws_ref_count_release (ref_count : * mut aws_ref_count) -> usize ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_errors { AWS_ERROR_HTTP_UNKNOWN = 2048 , AWS_ERROR_HTTP_HEADER_NOT_FOUND = 2049 , AWS_ERROR_HTTP_INVALID_HEADER_FIELD = 2050 , AWS_ERROR_HTTP_INVALID_HEADER_NAME = 2051 , AWS_ERROR_HTTP_INVALID_HEADER_VALUE = 2052 , AWS_ERROR_HTTP_INVALID_METHOD = 2053 , AWS_ERROR_HTTP_INVALID_PATH = 2054 , AWS_ERROR_HTTP_INVALID_STATUS_CODE = 2055 , AWS_ERROR_HTTP_MISSING_BODY_STREAM = 2056 , AWS_ERROR_HTTP_INVALID_BODY_STREAM = 2057 , AWS_ERROR_HTTP_CONNECTION_CLOSED = 2058 , AWS_ERROR_HTTP_SWITCHED_PROTOCOLS = 2059 , AWS_ERROR_HTTP_UNSUPPORTED_PROTOCOL = 2060 , AWS_ERROR_HTTP_REACTION_REQUIRED = 2061 , AWS_ERROR_HTTP_DATA_NOT_AVAILABLE = 2062 , AWS_ERROR_HTTP_OUTGOING_STREAM_LENGTH_INCORRECT = 2063 , AWS_ERROR_HTTP_CALLBACK_FAILURE = 2064 , AWS_ERROR_HTTP_WEBSOCKET_UPGRADE_FAILURE = 2065 , AWS_ERROR_HTTP_WEBSOCKET_CLOSE_FRAME_SENT = 2066 , AWS_ERROR_HTTP_WEBSOCKET_IS_MIDCHANNEL_HANDLER = 2067 , AWS_ERROR_HTTP_CONNECTION_MANAGER_INVALID_STATE_FOR_ACQUIRE = 2068 , AWS_ERROR_HTTP_CONNECTION_MANAGER_VENDED_CONNECTION_UNDERFLOW = 2069 , AWS_ERROR_HTTP_SERVER_CLOSED = 2070 , AWS_ERROR_HTTP_PROXY_CONNECT_FAILED = 2071 , AWS_ERROR_HTTP_CONNECTION_MANAGER_SHUTTING_DOWN = 2072 , AWS_ERROR_HTTP_CHANNEL_THROUGHPUT_FAILURE = 2073 , AWS_ERROR_HTTP_PROTOCOL_ERROR = 2074 , AWS_ERROR_HTTP_STREAM_IDS_EXHAUSTED = 2075 , AWS_ERROR_HTTP_GOAWAY_RECEIVED = 2076 , AWS_ERROR_HTTP_RST_STREAM_RECEIVED = 2077 , AWS_ERROR_HTTP_RST_STREAM_SENT = 2078 , AWS_ERROR_HTTP_STREAM_NOT_ACTIVATED = 2079 , AWS_ERROR_HTTP_STREAM_HAS_COMPLETED = 2080 , AWS_ERROR_HTTP_PROXY_STRATEGY_NTLM_CHALLENGE_TOKEN_MISSING = 2081 , AWS_ERROR_HTTP_PROXY_STRATEGY_TOKEN_RETRIEVAL_FAILURE = 2082 , AWS_ERROR_HTTP_PROXY_CONNECT_FAILED_RETRYABLE = 2083 , AWS_ERROR_HTTP_PROTOCOL_SWITCH_FAILURE = 2084 , AWS_ERROR_HTTP_MAX_CONCURRENT_STREAMS_EXCEEDED = 2085 , AWS_ERROR_HTTP_STREAM_MANAGER_SHUTTING_DOWN = 2086 , AWS_ERROR_HTTP_STREAM_MANAGER_CONNECTION_ACQUIRE_FAILURE = 2087 , AWS_ERROR_HTTP_STREAM_MANAGER_UNEXPECTED_HTTP_VERSION = 2088 , AWS_ERROR_HTTP_WEBSOCKET_PROTOCOL_ERROR = 2089 , AWS_ERROR_HTTP_MANUAL_WRITE_NOT_ENABLED = 2090 , AWS_ERROR_HTTP_MANUAL_WRITE_HAS_COMPLETED = 2091 , AWS_ERROR_HTTP_RESPONSE_FIRST_BYTE_TIMEOUT = 2092 , AWS_ERROR_HTTP_CONNECTION_MANAGER_ACQUISITION_TIMEOUT = 2093 , AWS_ERROR_HTTP_CONNECTION_MANAGER_MAX_PENDING_ACQUISITIONS_EXCEEDED = 2094 , AWS_ERROR_HTTP_END_RANGE = 3071 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http2_error_code { AWS_HTTP2_ERR_NO_ERROR = 0 , AWS_HTTP2_ERR_PROTOCOL_ERROR = 1 , AWS_HTTP2_ERR_INTERNAL_ERROR = 2 , AWS_HTTP2_ERR_FLOW_CONTROL_ERROR = 3 , AWS_HTTP2_ERR_SETTINGS_TIMEOUT = 4 , AWS_HTTP2_ERR_STREAM_CLOSED = 5 , AWS_HTTP2_ERR_FRAME_SIZE_ERROR = 6 , AWS_HTTP2_ERR_REFUSED_STREAM = 7 , AWS_HTTP2_ERR_CANCEL = 8 , AWS_HTTP2_ERR_COMPRESSION_ERROR = 9 , AWS_HTTP2_ERR_CONNECT_ERROR = 10 , AWS_HTTP2_ERR_ENHANCE_YOUR_CALM = 11 , AWS_HTTP2_ERR_INADEQUATE_SECURITY = 12 , AWS_HTTP2_ERR_HTTP_1_1_REQUIRED = 13 , AWS_HTTP2_ERR_COUNT = 14 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_log_subject { AWS_LS_HTTP_GENERAL = 2048 , AWS_LS_HTTP_CONNECTION = 2049 , AWS_LS_HTTP_ENCODER = 2050 , AWS_LS_HTTP_DECODER = 2051 , AWS_LS_HTTP_SERVER = 2052 , AWS_LS_HTTP_STREAM = 2053 , AWS_LS_HTTP_CONNECTION_MANAGER = 2054 , AWS_LS_HTTP_STREAM_MANAGER = 2055 , AWS_LS_HTTP_WEBSOCKET = 2056 , AWS_LS_HTTP_WEBSOCKET_SETUP = 2057 , AWS_LS_HTTP_PROXY_NEGOTIATION = 2058 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_version { AWS_HTTP_VERSION_UNKNOWN = 0 , AWS_HTTP_VERSION_1_0 = 1 , AWS_HTTP_VERSION_1_1 = 2 , AWS_HTTP_VERSION_2 = 3 , AWS_HTTP_VERSION_COUNT = 4 , } unsafe extern "C" { # [doc = " Initializes internal datastructures used by aws-c-http.\n Must be called before using any functionality in aws-c-http."] pub fn aws_http_library_init (alloc : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Clean up internal datastructures used by aws-c-http.\n Must not be called until application is done using functionality in aws-c-http."] pub fn aws_http_library_clean_up () ; } unsafe extern "C" { pub fn aws_http_error_code_is_retryable (error_code : :: libc :: c_int) -> bool ; } unsafe extern "C" { # [doc = " Returns the description of common status codes.\n Ex: 404 -> \"Not Found\"\n An empty string is returned if the status code is not recognized."] pub fn aws_http_status_text (status_code : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { # [doc = " Shortcuts for common HTTP request methods"] pub static aws_http_method_get : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_head : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_post : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_put : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_delete : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_connect : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_options : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_method : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_scheme : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_authority : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_path : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_status : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_scheme_http : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_scheme_https : aws_byte_cursor ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_impl { _unused : [u8 ; 0] , } # [doc = " Completion callback for aws_future<T>"] pub type aws_future_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; pub type aws_future_impl_result_clean_up_fn = :: std :: option :: Option < unsafe extern "C" fn (result_addr : * mut :: libc :: c_void) > ; pub type aws_future_impl_result_destroy_fn = :: std :: option :: Option < unsafe extern "C" fn (result : * mut :: libc :: c_void) > ; pub type aws_future_impl_result_release_fn = :: std :: option :: Option < unsafe extern "C" fn (result : * mut :: libc :: c_void) -> * mut :: libc :: c_void > ; unsafe extern "C" { pub fn aws_future_impl_new_by_value (alloc : * mut aws_allocator , sizeof_result : usize) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_new_by_value_with_clean_up (alloc : * mut aws_allocator , sizeof_result : usize , result_clean_up : aws_future_impl_result_clean_up_fn) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_new_pointer (alloc : * mut aws_allocator) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_new_pointer_with_destroy (alloc : * mut aws_allocator , result_destroy : aws_future_impl_result_destroy_fn) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_new_pointer_with_release (alloc : * mut aws_allocator , result_release : aws_future_impl_result_release_fn) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_release (promise : * mut aws_future_impl) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_acquire (promise : * mut aws_future_impl) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_set_error (promise : * mut aws_future_impl , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_future_impl_set_result_by_move (promise : * mut aws_future_impl , src_address : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_impl_is_done (future : * const aws_future_impl) -> bool ; } unsafe extern "C" { pub fn aws_future_impl_register_callback (future : * mut aws_future_impl , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_impl_register_callback_if_not_done (future : * mut aws_future_impl , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { pub fn aws_future_impl_register_event_loop_callback (future : * mut aws_future_impl , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_impl_register_channel_callback (future : * mut aws_future_impl , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_impl_wait (future : * const aws_future_impl , timeout_ns : u64) -> bool ; } unsafe extern "C" { pub fn aws_future_impl_get_error (future : * const aws_future_impl) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_future_impl_get_result_address (future : * const aws_future_impl) -> * mut :: libc :: c_void ; } unsafe extern "C" { pub fn aws_future_impl_get_result_by_move (future : * mut aws_future_impl , dst_address : * mut :: libc :: c_void) ; } # [doc = " aws_future<size_t>\n See top of future.h for docs."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_size { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_new (alloc : * mut aws_allocator) -> * mut aws_future_size ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_set_result (future : * mut aws_future_size , result : usize) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_get_result (future : * const aws_future_size) -> usize ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_acquire (future : * mut aws_future_size) -> * mut aws_future_size ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_release (future : * mut aws_future_size) -> * mut aws_future_size ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_set_error (future : * mut aws_future_size , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_is_done (future : * const aws_future_size) -> bool ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_get_error (future : * const aws_future_size) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_register_callback (future : * mut aws_future_size , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_register_callback_if_not_done (future : * mut aws_future_size , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_register_event_loop_callback (future : * mut aws_future_size , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_register_channel_callback (future : * mut aws_future_size , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_wait (future : * mut aws_future_size , timeout_ns : u64) -> bool ; } # [doc = " aws_future<bool>\n See top of future.h for docs."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_bool { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_new (alloc : * mut aws_allocator) -> * mut aws_future_bool ; } unsafe extern "C" { # [doc = " `aws_future<bool>`\n See top of future.h for docs."] pub fn aws_future_bool_set_result (future : * mut aws_future_bool , result : bool) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_get_result (future : * const aws_future_bool) -> bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_acquire (future : * mut aws_future_bool) -> * mut aws_future_bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_release (future : * mut aws_future_bool) -> * mut aws_future_bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_set_error (future : * mut aws_future_bool , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_is_done (future : * const aws_future_bool) -> bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_get_error (future : * const aws_future_bool) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_register_callback (future : * mut aws_future_bool , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_register_callback_if_not_done (future : * mut aws_future_bool , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_register_event_loop_callback (future : * mut aws_future_bool , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_register_channel_callback (future : * mut aws_future_bool , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_wait (future : * mut aws_future_bool , timeout_ns : u64) -> bool ; } # [doc = " aws_future<void>\n See top of future.h for docs."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_void { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<void>\n See top of future.h for docs."] pub fn aws_future_void_new (alloc : * mut aws_allocator) -> * mut aws_future_void ; } unsafe extern "C" { pub fn aws_future_void_set_result (future : * mut aws_future_void) ; } unsafe extern "C" { pub fn aws_future_void_acquire (future : * mut aws_future_void) -> * mut aws_future_void ; } unsafe extern "C" { pub fn aws_future_void_release (future : * mut aws_future_void) -> * mut aws_future_void ; } unsafe extern "C" { pub fn aws_future_void_set_error (future : * mut aws_future_void , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_future_void_is_done (future : * const aws_future_void) -> bool ; } unsafe extern "C" { pub fn aws_future_void_get_error (future : * const aws_future_void) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_future_void_register_callback (future : * mut aws_future_void , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_void_register_callback_if_not_done (future : * mut aws_future_void , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { pub fn aws_future_void_register_event_loop_callback (future : * mut aws_future_void , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_void_register_channel_callback (future : * mut aws_future_void , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_void_wait (future : * mut aws_future_void , timeout_ns : u64) -> bool ; } # [doc = " An HTTP connection.\n This type is used by both server-side and client-side connections.\n This type is also used by all supported versions of HTTP."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_connection { _unused : [u8 ; 0] , } # [doc = " A stream exists for the duration of a request/response exchange.\n A client creates a stream to send a request and receive a response.\n A server creates a stream to receive a request and send a response.\n In http/2, a push-promise stream can be sent by a server and received by a client."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_stream { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [doc = " Controls whether a header's strings may be compressed by encoding the index of\n strings in a cache, rather than encoding the literal string.\n\n This setting has no effect on HTTP/1.x connections.\n On HTTP/2 connections this controls HPACK behavior.\n See RFC-7541 Section 7.1 for security considerations."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_header_compression { # [doc = " Compress header by encoding the cached index of its strings,\n or by updating the cache to contain these strings for future reference.\n Best for headers that are sent repeatedly.\n This is the default setting."] AWS_HTTP_HEADER_COMPRESSION_USE_CACHE = 0 , # [doc = " Encode header strings literally.\n If an intermediary re-broadcasts the headers, it is permitted to use cache.\n Best for unique headers that are unlikely to repeat."] AWS_HTTP_HEADER_COMPRESSION_NO_CACHE = 1 , # [doc = " Encode header strings literally and forbid all intermediaries from using\n cache when re-broadcasting.\n Best for header fields that are highly valuable or sensitive to recovery."] AWS_HTTP_HEADER_COMPRESSION_NO_FORWARD_CACHE = 2 , } # [doc = " A lightweight HTTP header struct.\n Note that the underlying strings are not owned by the byte cursors."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_header { pub name : aws_byte_cursor , pub value : aws_byte_cursor , pub compression : aws_http_header_compression , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_header"] [:: std :: mem :: size_of :: < aws_http_header > () - 40usize] ; ["Alignment of aws_http_header"] [:: std :: mem :: align_of :: < aws_http_header > () - 8usize] ; ["Offset of field: aws_http_header::name"] [:: std :: mem :: offset_of ! (aws_http_header , name) - 0usize] ; ["Offset of field: aws_http_header::value"] [:: std :: mem :: offset_of ! (aws_http_header , value) - 16usize] ; ["Offset of field: aws_http_header::compression"] [:: std :: mem :: offset_of ! (aws_http_header , compression) - 32usize] ; } ; impl Default for aws_http_header { 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 = " A transformable block of HTTP headers.\n Provides a nice API for getting/setting header names and values.\n\n All strings are copied and stored within this datastructure.\n The index of a given header may change any time headers are modified.\n When iterating headers, the following ordering rules apply:\n\n - Headers with the same name will always be in the same order, relative to one another.\n   If \"A: one\" is added before \"A: two\", then \"A: one\" will always precede \"A: two\".\n\n - Headers with different names could be in any order, relative to one another.\n   If \"A: one\" is seen before \"B: bee\" in one iteration, you might see \"B: bee\" before \"A: one\" on the next."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_headers { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [doc = " Header block type.\n INFORMATIONAL: Header block for 1xx informational (interim) responses.\n MAIN: Main header block sent with request or response.\n TRAILING: Headers sent after the body of a request or response."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_header_block { AWS_HTTP_HEADER_BLOCK_MAIN = 0 , AWS_HTTP_HEADER_BLOCK_INFORMATIONAL = 1 , AWS_HTTP_HEADER_BLOCK_TRAILING = 2 , } # [doc = " The definition for an outgoing HTTP request or response.\n The message may be transformed (ex: signing the request) before its data is eventually sent.\n\n The message keeps internal copies of its trivial strings (method, path, headers)\n but does NOT take ownership of its body stream.\n\n A language binding would likely present this as an HttpMessage base class with\n HttpRequest and HttpResponse subclasses."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_message { _unused : [u8 ; 0] , } # [doc = " Function to invoke when a message transformation completes.\n This function MUST be invoked or the application will soft-lock.\n `message` and `complete_ctx` must be the same pointers provided to the `aws_http_message_transform_fn`.\n `error_code` should should be AWS_ERROR_SUCCESS if transformation was successful,\n otherwise pass a different AWS_ERROR_X value."] pub type aws_http_message_transform_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (message : * mut aws_http_message , error_code : :: libc :: c_int , complete_ctx : * mut :: libc :: c_void) > ; # [doc = " A function that may modify a request or response before it is sent.\n The transformation may be asynchronous or immediate.\n The user MUST invoke the `complete_fn` when transformation is complete or the application will soft-lock.\n When invoking the `complete_fn`, pass along the `message` and `complete_ctx` provided here and an error code.\n The error code should be AWS_ERROR_SUCCESS if transformation was successful,\n otherwise pass a different AWS_ERROR_X value."] pub type aws_http_message_transform_fn = :: std :: option :: Option < unsafe extern "C" fn (message : * mut aws_http_message , user_data : * mut :: libc :: c_void , complete_fn : aws_http_message_transform_complete_fn , complete_ctx : * mut :: libc :: c_void) > ; # [doc = " Invoked repeatedly times as headers are received.\n At this point, aws_http_stream_get_incoming_response_status() can be called for the client.\n And aws_http_stream_get_incoming_request_method() and aws_http_stream_get_incoming_request_uri() can be called for\n the server.\n This is always invoked on the HTTP connection's event-loop thread.\n\n Return AWS_OP_SUCCESS to continue processing the stream.\n Return aws_raise_error(E) to indicate failure and cancel the stream.\n The error you raise will be reflected in the error_code passed to the on_complete callback."] pub type aws_http_on_incoming_headers_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , header_block : aws_http_header_block , header_array : * const aws_http_header , num_headers : usize , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked when the incoming header block of this type(informational/main/trailing) has been completely read.\n This is always invoked on the HTTP connection's event-loop thread.\n\n Return AWS_OP_SUCCESS to continue processing the stream.\n Return aws_raise_error(E) to indicate failure and cancel the stream.\n The error you raise will be reflected in the error_code passed to the on_complete callback."] pub type aws_http_on_incoming_header_block_done_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , header_block : aws_http_header_block , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Called repeatedly as body data is received.\n The data must be copied immediately if you wish to preserve it.\n This is always invoked on the HTTP connection's event-loop thread.\n\n Note that, if the connection is using manual_window_management then the window\n size has shrunk by the amount of body data received. If the window size\n reaches 0 no further data will be received. Increment the window size with\n aws_http_stream_update_window().\n\n Return AWS_OP_SUCCESS to continue processing the stream.\n Return aws_raise_error(E) to indicate failure and cancel the stream.\n The error you raise will be reflected in the error_code passed to the on_complete callback."] pub type aws_http_on_incoming_body_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , data : * const aws_byte_cursor , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked when request has been completely read.\n This is always invoked on the HTTP connection's event-loop thread.\n\n Return AWS_OP_SUCCESS to continue processing the stream.\n Return aws_raise_error(E) to indicate failure and cancel the stream.\n The error you raise will be reflected in the error_code passed to the on_complete callback."] pub type aws_http_on_incoming_request_done_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked when a request/response stream is complete, whether successful or unsuccessful\n This is always invoked on the HTTP connection's event-loop thread.\n This will not be invoked if the stream is never activated."] pub type aws_http_on_stream_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when request/response stream destroy completely.\n This can be invoked within the same thead who release the refcount on http stream.\n This is invoked even if the stream is never activated."] pub type aws_http_on_stream_destroy_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " Tracing metrics for aws_http_stream.\n Data maybe not be available if the data of stream was never sent/received before it completes."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_stream_metrics { pub send_start_timestamp_ns : i64 , pub send_end_timestamp_ns : i64 , pub sending_duration_ns : i64 , pub receive_start_timestamp_ns : i64 , pub receive_end_timestamp_ns : i64 , pub receiving_duration_ns : i64 , pub stream_id : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_stream_metrics"] [:: std :: mem :: size_of :: < aws_http_stream_metrics > () - 56usize] ; ["Alignment of aws_http_stream_metrics"] [:: std :: mem :: align_of :: < aws_http_stream_metrics > () - 8usize] ; ["Offset of field: aws_http_stream_metrics::send_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , send_start_timestamp_ns) - 0usize] ; ["Offset of field: aws_http_stream_metrics::send_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , send_end_timestamp_ns) - 8usize] ; ["Offset of field: aws_http_stream_metrics::sending_duration_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , sending_duration_ns) - 16usize] ; ["Offset of field: aws_http_stream_metrics::receive_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , receive_start_timestamp_ns) - 24usize] ; ["Offset of field: aws_http_stream_metrics::receive_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , receive_end_timestamp_ns) - 32usize] ; ["Offset of field: aws_http_stream_metrics::receiving_duration_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , receiving_duration_ns) - 40usize] ; ["Offset of field: aws_http_stream_metrics::stream_id"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , stream_id) - 48usize] ; } ; # [doc = " Invoked right before request/response stream is complete to report the tracing metrics for aws_http_stream.\n This may be invoked synchronously when aws_http_stream_release() is called.\n This is invoked even if the stream is never activated.\n See `aws_http_stream_metrics` for details."] pub type aws_http_on_stream_metrics_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , metrics : * const aws_http_stream_metrics , user_data : * mut :: libc :: c_void) > ; # [doc = " Options for creating a stream which sends a request from the client and receives a response from the server."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_make_request_options { # [doc = " The sizeof() this struct, used for versioning.\n Required."] pub self_size : usize , # [doc = " Definition for outgoing request.\n Required.\n The request will be kept alive via refcounting until the request completes."] pub request : * mut aws_http_message , pub user_data : * mut :: libc :: c_void , # [doc = " Invoked repeatedly times as headers are received.\n Optional.\n See `aws_http_on_incoming_headers_fn`."] pub on_response_headers : aws_http_on_incoming_headers_fn , # [doc = " Invoked when response header block has been completely read.\n Optional.\n See `aws_http_on_incoming_header_block_done_fn`."] pub on_response_header_block_done : aws_http_on_incoming_header_block_done_fn , # [doc = " Invoked repeatedly as body data is received.\n Optional.\n See `aws_http_on_incoming_body_fn`."] pub on_response_body : aws_http_on_incoming_body_fn , # [doc = " Invoked right before stream is complete, whether successful or unsuccessful\n Optional.\n See `aws_http_on_stream_metrics_fn`"] pub on_metrics : aws_http_on_stream_metrics_fn , # [doc = " Invoked when request/response stream is complete, whether successful or unsuccessful\n Optional.\n See `aws_http_on_stream_complete_fn`."] pub on_complete : aws_http_on_stream_complete_fn , pub on_destroy : aws_http_on_stream_destroy_fn , # [doc = " When using HTTP/2, request body data will be provided over time. The stream will only be polled for writing\n when data has been supplied via `aws_http2_stream_write_data`"] pub http2_use_manual_data_writes : bool , # [doc = " Optional (ignored if 0).\n After a request is fully sent, if the server does not begin responding within N milliseconds, then fail with\n AWS_ERROR_HTTP_RESPONSE_FIRST_BYTE_TIMEOUT.\n It override the connection level settings, when the request completes, the\n original monitoring options will be applied back to the connection.\n TODO: Only supported in HTTP/1.1 now, support it in HTTP/2"] pub response_first_byte_timeout_ms : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_make_request_options"] [:: std :: mem :: size_of :: < aws_http_make_request_options > () - 88usize] ; ["Alignment of aws_http_make_request_options"] [:: std :: mem :: align_of :: < aws_http_make_request_options > () - 8usize] ; ["Offset of field: aws_http_make_request_options::self_size"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , self_size) - 0usize] ; ["Offset of field: aws_http_make_request_options::request"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , request) - 8usize] ; ["Offset of field: aws_http_make_request_options::user_data"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , user_data) - 16usize] ; ["Offset of field: aws_http_make_request_options::on_response_headers"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_response_headers) - 24usize] ; ["Offset of field: aws_http_make_request_options::on_response_header_block_done"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_response_header_block_done) - 32usize] ; ["Offset of field: aws_http_make_request_options::on_response_body"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_response_body) - 40usize] ; ["Offset of field: aws_http_make_request_options::on_metrics"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_metrics) - 48usize] ; ["Offset of field: aws_http_make_request_options::on_complete"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_complete) - 56usize] ; ["Offset of field: aws_http_make_request_options::on_destroy"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_destroy) - 64usize] ; ["Offset of field: aws_http_make_request_options::http2_use_manual_data_writes"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , http2_use_manual_data_writes) - 72usize] ; ["Offset of field: aws_http_make_request_options::response_first_byte_timeout_ms"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , response_first_byte_timeout_ms) - 80usize] ; } ; impl Default for aws_http_make_request_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)] pub struct aws_http_request_handler_options { pub self_size : usize , # [doc = " Required."] pub server_connection : * mut aws_http_connection , # [doc = " user_data passed to callbacks.\n Optional."] pub user_data : * mut :: libc :: c_void , # [doc = " Invoked repeatedly times as headers are received.\n Optional.\n See `aws_http_on_incoming_headers_fn`."] pub on_request_headers : aws_http_on_incoming_headers_fn , # [doc = " Invoked when the request header block has been completely read.\n Optional.\n See `aws_http_on_incoming_header_block_done_fn`."] pub on_request_header_block_done : aws_http_on_incoming_header_block_done_fn , # [doc = " Invoked as body data is received.\n Optional.\n See `aws_http_on_incoming_body_fn`."] pub on_request_body : aws_http_on_incoming_body_fn , # [doc = " Invoked when request has been completely read.\n Optional.\n See `aws_http_on_incoming_request_done_fn`."] pub on_request_done : aws_http_on_incoming_request_done_fn , # [doc = " Invoked when request/response stream is complete, whether successful or unsuccessful\n Optional.\n See `aws_http_on_stream_complete_fn`."] pub on_complete : aws_http_on_stream_complete_fn , pub on_destroy : aws_http_on_stream_destroy_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_request_handler_options"] [:: std :: mem :: size_of :: < aws_http_request_handler_options > () - 72usize] ; ["Alignment of aws_http_request_handler_options"] [:: std :: mem :: align_of :: < aws_http_request_handler_options > () - 8usize] ; ["Offset of field: aws_http_request_handler_options::self_size"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , self_size) - 0usize] ; ["Offset of field: aws_http_request_handler_options::server_connection"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , server_connection) - 8usize] ; ["Offset of field: aws_http_request_handler_options::user_data"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , user_data) - 16usize] ; ["Offset of field: aws_http_request_handler_options::on_request_headers"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_request_headers) - 24usize] ; ["Offset of field: aws_http_request_handler_options::on_request_header_block_done"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_request_header_block_done) - 32usize] ; ["Offset of field: aws_http_request_handler_options::on_request_body"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_request_body) - 40usize] ; ["Offset of field: aws_http_request_handler_options::on_request_done"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_request_done) - 48usize] ; ["Offset of field: aws_http_request_handler_options::on_complete"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_complete) - 56usize] ; ["Offset of field: aws_http_request_handler_options::on_destroy"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_destroy) - 64usize] ; } ; impl Default for aws_http_request_handler_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 () } } } # [doc = " Invoked when the data stream of an outgoing HTTP write operation is no longer in use.\n This is always invoked on the HTTP connection's event-loop thread.\n\n @param stream        HTTP-stream this write operation was submitted to.\n @param error_code    If error_code is AWS_ERROR_SUCCESS (0), the data was successfully sent.\n                      Any other error_code indicates that the HTTP-stream is in the process of terminating.\n                      If the error_code is AWS_ERROR_HTTP_STREAM_HAS_COMPLETED,\n                      the stream's termination has nothing to do with this write operation.\n                      Any other non-zero error code indicates a problem with this particular write\n                      operation's data.\n @param user_data     User data for this write operation."] pub type aws_http_stream_write_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when the data of an outgoing HTTP/1.1 chunk is no longer in use.\n This is always invoked on the HTTP connection's event-loop thread.\n\n @param stream        HTTP-stream this chunk was submitted to.\n @param error_code    If error_code is AWS_ERROR_SUCCESS (0), the data was successfully sent.\n                      Any other error_code indicates that the HTTP-stream is in the process of terminating.\n                      If the error_code is AWS_ERROR_HTTP_STREAM_HAS_COMPLETED,\n                      the stream's termination has nothing to do with this chunk.\n                      Any other non-zero error code indicates a problem with this particular chunk's data.\n @param user_data     User data for this chunk."] pub type aws_http1_stream_write_chunk_complete_fn = aws_http_stream_write_complete_fn ; # [doc = " HTTP/1.1 chunk extension for chunked encoding.\n Note that the underlying strings are not owned by the byte cursors."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http1_chunk_extension { pub key : aws_byte_cursor , pub value : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http1_chunk_extension"] [:: std :: mem :: size_of :: < aws_http1_chunk_extension > () - 32usize] ; ["Alignment of aws_http1_chunk_extension"] [:: std :: mem :: align_of :: < aws_http1_chunk_extension > () - 8usize] ; ["Offset of field: aws_http1_chunk_extension::key"] [:: std :: mem :: offset_of ! (aws_http1_chunk_extension , key) - 0usize] ; ["Offset of field: aws_http1_chunk_extension::value"] [:: std :: mem :: offset_of ! (aws_http1_chunk_extension , value) - 16usize] ; } ; impl Default for aws_http1_chunk_extension { 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 = " Encoding options for an HTTP/1.1 chunked transfer encoding chunk."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http1_chunk_options { pub chunk_data : * mut aws_input_stream , pub chunk_data_size : u64 , # [doc = " A pointer to an array of chunked extensions.\n The num_extensions must match the length of the array.\n This data is deep-copied by aws_http1_stream_write_chunk(),\n it does not need to remain valid until on_complete is invoked."] pub extensions : * mut aws_http1_chunk_extension , # [doc = " The number of elements defined in the extensions array."] pub num_extensions : usize , # [doc = " Invoked when the chunk data is no longer in use, whether or not it was successfully sent.\n Optional.\n See `aws_http1_stream_write_chunk_complete_fn`."] pub on_complete : aws_http1_stream_write_chunk_complete_fn , # [doc = " User provided data passed to the on_complete callback on its invocation."] pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http1_chunk_options"] [:: std :: mem :: size_of :: < aws_http1_chunk_options > () - 48usize] ; ["Alignment of aws_http1_chunk_options"] [:: std :: mem :: align_of :: < aws_http1_chunk_options > () - 8usize] ; ["Offset of field: aws_http1_chunk_options::chunk_data"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , chunk_data) - 0usize] ; ["Offset of field: aws_http1_chunk_options::chunk_data_size"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , chunk_data_size) - 8usize] ; ["Offset of field: aws_http1_chunk_options::extensions"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , extensions) - 16usize] ; ["Offset of field: aws_http1_chunk_options::num_extensions"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , num_extensions) - 24usize] ; ["Offset of field: aws_http1_chunk_options::on_complete"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , on_complete) - 32usize] ; ["Offset of field: aws_http1_chunk_options::user_data"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , user_data) - 40usize] ; } ; impl Default for aws_http1_chunk_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 () } } } # [doc = " Invoked when the data of an outgoing HTTP2 data frame is no longer in use.\n This is always invoked on the HTTP connection's event-loop thread.\n\n @param stream        HTTP2-stream this write was submitted to.\n @param error_code    If error_code is AWS_ERROR_SUCCESS (0), the data was successfully sent.\n                      Any other error_code indicates that the HTTP-stream is in the process of terminating.\n                      If the error_code is AWS_ERROR_HTTP_STREAM_HAS_COMPLETED,\n                      the stream's termination has nothing to do with this write.\n                      Any other non-zero error code indicates a problem with this particular write's data.\n @param user_data     User data for this write."] pub type aws_http2_stream_write_data_complete_fn = aws_http_stream_write_complete_fn ; # [doc = " Encoding options for manual H2 data frame writes"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http2_stream_write_data_options { # [doc = " The data to be sent.\n Optional.\n If not set, input stream with length 0 will be used."] pub data : * mut aws_input_stream , # [doc = " Set true when it's the last chunk to be sent.\n After a write with end_stream, no more data write will be accepted."] pub end_stream : bool , # [doc = " Invoked when the data stream is no longer in use, whether or not it was successfully sent.\n Optional.\n See `aws_http2_stream_write_data_complete_fn`."] pub on_complete : aws_http2_stream_write_data_complete_fn , # [doc = " User provided data passed to the on_complete callback on its invocation."] pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http2_stream_write_data_options"] [:: std :: mem :: size_of :: < aws_http2_stream_write_data_options > () - 32usize] ; ["Alignment of aws_http2_stream_write_data_options"] [:: std :: mem :: align_of :: < aws_http2_stream_write_data_options > () - 8usize] ; ["Offset of field: aws_http2_stream_write_data_options::data"] [:: std :: mem :: offset_of ! (aws_http2_stream_write_data_options , data) - 0usize] ; ["Offset of field: aws_http2_stream_write_data_options::end_stream"] [:: std :: mem :: offset_of ! (aws_http2_stream_write_data_options , end_stream) - 8usize] ; ["Offset of field: aws_http2_stream_write_data_options::on_complete"] [:: std :: mem :: offset_of ! (aws_http2_stream_write_data_options , on_complete) - 16usize] ; ["Offset of field: aws_http2_stream_write_data_options::user_data"] [:: std :: mem :: offset_of ! (aws_http2_stream_write_data_options , user_data) - 24usize] ; } ; impl Default for aws_http2_stream_write_data_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 () } } } unsafe extern "C" { # [doc = " Return whether both names are equivalent.\n This is a case-insensitive string comparison.\n\n Example Matches:\n \"Content-Length\" == \"content-length\" // upper or lower case ok\n\n Example Mismatches:\n \"Content-Length\" != \" Content-Length\" // leading whitespace bad"] pub fn aws_http_header_name_eq (name_a : aws_byte_cursor , name_b : aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " Create a new headers object.\n The caller has a hold on the object and must call aws_http_headers_release() when they are done with it."] pub fn aws_http_headers_new (allocator : * mut aws_allocator) -> * mut aws_http_headers ; } unsafe extern "C" { # [doc = " Acquire a hold on the object, preventing it from being deleted until\n aws_http_headers_release() is called by all those with a hold on it."] pub fn aws_http_headers_acquire (headers : * mut aws_http_headers) ; } unsafe extern "C" { # [doc = " Release a hold on the object.\n The object is deleted when all holds on it are released."] pub fn aws_http_headers_release (headers : * mut aws_http_headers) ; } unsafe extern "C" { # [doc = " Add a header.\n The underlying strings are copied."] pub fn aws_http_headers_add_header (headers : * mut aws_http_headers , header : * const aws_http_header) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add a header.\n The underlying strings are copied."] pub fn aws_http_headers_add (headers : * mut aws_http_headers , name : aws_byte_cursor , value : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add an array of headers.\n The underlying strings are copied."] pub fn aws_http_headers_add_array (headers : * mut aws_http_headers , array : * const aws_http_header , count : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set a header value.\n The header is added if necessary and any existing values for this name are removed.\n The underlying strings are copied."] pub fn aws_http_headers_set (headers : * mut aws_http_headers , name : aws_byte_cursor , value : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the total number of headers."] pub fn aws_http_headers_count (headers : * const aws_http_headers) -> usize ; } unsafe extern "C" { # [doc = " Get the header at the specified index.\n The index of a given header may change any time headers are modified.\n When iterating headers, the following ordering rules apply:\n\n - Headers with the same name will always be in the same order, relative to one another.\n   If \"A: one\" is added before \"A: two\", then \"A: one\" will always precede \"A: two\".\n\n - Headers with different names could be in any order, relative to one another.\n   If \"A: one\" is seen before \"B: bee\" in one iteration, you might see \"B: bee\" before \"A: one\" on the next.\n\n AWS_ERROR_INVALID_INDEX is raised if the index is invalid."] pub fn aws_http_headers_get_index (headers : * const aws_http_headers , index : usize , out_header : * mut aws_http_header) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get all values with this name, combined into one new aws_string that you are responsible for destroying.\n If there are multiple headers with this name, their values are appended with comma-separators.\n If there are no headers with this name, NULL is returned and AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised."] pub fn aws_http_headers_get_all (headers : * const aws_http_headers , name : aws_byte_cursor) -> * mut aws_string ; } unsafe extern "C" { # [doc = " Get the first value for this name, ignoring any additional values.\n AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised if the name is not found."] pub fn aws_http_headers_get (headers : * const aws_http_headers , name : aws_byte_cursor , out_value : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Test if header name exists or not in headers"] pub fn aws_http_headers_has (headers : * const aws_http_headers , name : aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " Remove all headers with this name.\n AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised if no headers with this name are found."] pub fn aws_http_headers_erase (headers : * mut aws_http_headers , name : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Remove the first header found with this name and value.\n AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised if no such header is found."] pub fn aws_http_headers_erase_value (headers : * mut aws_http_headers , name : aws_byte_cursor , value : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Remove the header at the specified index.\n\n AWS_ERROR_INVALID_INDEX is raised if the index is invalid."] pub fn aws_http_headers_erase_index (headers : * mut aws_http_headers , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Clear all headers."] pub fn aws_http_headers_clear (headers : * mut aws_http_headers) ; } unsafe extern "C" { # [doc = " Get the `:method` value (HTTP/2 headers only)."] pub fn aws_http2_headers_get_request_method (h2_headers : * const aws_http_headers , out_method : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:method` (HTTP/2 headers only).\n The headers makes its own copy of the underlying string."] pub fn aws_http2_headers_set_request_method (h2_headers : * mut aws_http_headers , method : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http2_headers_get_request_scheme (h2_headers : * const aws_http_headers , out_scheme : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:scheme` (request pseudo headers only).\n The pseudo headers makes its own copy of the underlying string."] pub fn aws_http2_headers_set_request_scheme (h2_headers : * mut aws_http_headers , scheme : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http2_headers_get_request_authority (h2_headers : * const aws_http_headers , out_authority : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:authority` (request pseudo headers only).\n The pseudo headers makes its own copy of the underlying string."] pub fn aws_http2_headers_set_request_authority (h2_headers : * mut aws_http_headers , authority : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http2_headers_get_request_path (h2_headers : * const aws_http_headers , out_path : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:path` (request pseudo headers only).\n The pseudo headers makes its own copy of the underlying string."] pub fn aws_http2_headers_set_request_path (h2_headers : * mut aws_http_headers , path : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get `:status` (response pseudo headers only).\n If no status is set, AWS_ERROR_HTTP_DATA_NOT_AVAILABLE is raised."] pub fn aws_http2_headers_get_response_status (h2_headers : * const aws_http_headers , out_status_code : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:status` (response pseudo headers only)."] pub fn aws_http2_headers_set_response_status (h2_headers : * mut aws_http_headers , status_code : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Create a new HTTP/1.1 request message.\n The message is blank, all properties (method, path, etc) must be set individually.\n If HTTP/1.1 message used in HTTP/2 connection, the transformation will be automatically applied.\n A HTTP/2 message will created and sent based on the HTTP/1.1 message.\n\n The caller has a hold on the object and must call aws_http_message_release() when they are done with it."] pub fn aws_http_message_new_request (allocator : * mut aws_allocator) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Like aws_http_message_new_request(), but uses existing aws_http_headers instead of creating a new one.\n Acquires a hold on the headers, and releases it when the request is destroyed."] pub fn aws_http_message_new_request_with_headers (allocator : * mut aws_allocator , existing_headers : * mut aws_http_headers) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Create a new HTTP/1.1 response message.\n The message is blank, all properties (status, headers, etc) must be set individually.\n\n The caller has a hold on the object and must call aws_http_message_release() when they are done with it."] pub fn aws_http_message_new_response (allocator : * mut aws_allocator) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Create a new HTTP/2 request message.\n pseudo headers need to be set from aws_http2_headers_set_request_* to the headers of the aws_http_message.\n Will be errored out if used in HTTP/1.1 connection.\n\n The caller has a hold on the object and must call aws_http_message_release() when they are done with it."] pub fn aws_http2_message_new_request (allocator : * mut aws_allocator) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Create a new HTTP/2 response message.\n pseudo headers need to be set from aws_http2_headers_set_response_status to the headers of the aws_http_message.\n Will be errored out if used in HTTP/1.1 connection.\n\n The caller has a hold on the object and must call aws_http_message_release() when they are done with it."] pub fn aws_http2_message_new_response (allocator : * mut aws_allocator) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Create an HTTP/2 message from HTTP/1.1 message.\n pseudo headers will be created from the context and added to the headers of new message.\n Normal headers will be copied to the headers of new message.\n Note:\n  - if `host` exist, it will be removed and `:authority` will be added using the information.\n  - `:scheme` always defaults to \"https\". To use a different scheme create the HTTP/2 message directly"] pub fn aws_http2_message_new_from_http1 (alloc : * mut aws_allocator , http1_msg : * const aws_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Acquire a hold on the object, preventing it from being deleted until\n aws_http_message_release() is called by all those with a hold on it.\n\n This function returns the passed in message (possibly NULL) so that acquire-and-assign can be done with a single\n statement."] pub fn aws_http_message_acquire (message : * mut aws_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Release a hold on the object.\n The object is deleted when all holds on it are released.\n\n This function always returns NULL so that release-and-assign-NULL can be done with a single statement."] pub fn aws_http_message_release (message : * mut aws_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Deprecated. This is equivalent to aws_http_message_release()."] pub fn aws_http_message_destroy (message : * mut aws_http_message) ; } unsafe extern "C" { pub fn aws_http_message_is_request (message : * const aws_http_message) -> bool ; } unsafe extern "C" { pub fn aws_http_message_is_response (message : * const aws_http_message) -> bool ; } unsafe extern "C" { # [doc = " Get the protocol version of the http message."] pub fn aws_http_message_get_protocol_version (message : * const aws_http_message) -> aws_http_version ; } unsafe extern "C" { # [doc = " Get the method (request messages only)."] pub fn aws_http_message_get_request_method (request_message : * const aws_http_message , out_method : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set the method (request messages only).\n The request makes its own copy of the underlying string."] pub fn aws_http_message_set_request_method (request_message : * mut aws_http_message , method : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http_message_get_request_path (request_message : * const aws_http_message , out_path : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set the path-and-query value (request messages only).\n The request makes its own copy of the underlying string."] pub fn aws_http_message_set_request_path (request_message : * mut aws_http_message , path : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the status code (response messages only).\n If no status is set, AWS_ERROR_HTTP_DATA_NOT_AVAILABLE is raised."] pub fn aws_http_message_get_response_status (response_message : * const aws_http_message , out_status_code : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set the status code (response messages only)."] pub fn aws_http_message_set_response_status (response_message : * mut aws_http_message , status_code : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the body stream.\n Returns NULL if no body stream is set."] pub fn aws_http_message_get_body_stream (message : * const aws_http_message) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Set the body stream.\n NULL is an acceptable value for messages with no body.\n Note: The message does NOT take ownership of the body stream.\n The stream must not be destroyed until the message is complete."] pub fn aws_http_message_set_body_stream (message : * mut aws_http_message , body_stream : * mut aws_input_stream) ; } # [doc = " aws_future<aws_http_message*>"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_http_message { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_new (alloc : * mut aws_allocator) -> * mut aws_future_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_set_result_by_move (future : * mut aws_future_http_message , pointer_address : * mut * mut aws_http_message) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_get_result_by_move (future : * mut aws_future_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_peek_result (future : * const aws_future_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_acquire (future : * mut aws_future_http_message) -> * mut aws_future_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_release (future : * mut aws_future_http_message) -> * mut aws_future_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_set_error (future : * mut aws_future_http_message , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_is_done (future : * const aws_future_http_message) -> bool ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_get_error (future : * const aws_future_http_message) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_register_callback (future : * mut aws_future_http_message , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_register_callback_if_not_done (future : * mut aws_future_http_message , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_register_event_loop_callback (future : * mut aws_future_http_message , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_register_channel_callback (future : * mut aws_future_http_message , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_wait (future : * mut aws_future_http_message , timeout_ns : u64) -> bool ; } unsafe extern "C" { # [doc = " Submit a chunk of data to be sent on an HTTP/1.1 stream.\n The stream must have specified \"chunked\" in a \"transfer-encoding\" header,\n and the aws_http_message must NOT have any body stream set.\n For client streams, activate() must be called before any chunks are submitted.\n For server streams, the response must be submitted before any chunks.\n A final chunk with size 0 must be submitted to successfully complete the HTTP-stream.\n\n Returns AWS_OP_SUCCESS if the chunk has been submitted. The chunk's completion\n callback will be invoked when the HTTP-stream is done with the chunk data,\n whether or not it was successfully sent (see `aws_http1_stream_write_chunk_complete_fn`).\n The chunk data must remain valid until the completion callback is invoked.\n\n Returns AWS_OP_ERR and raises an error if the chunk could not be submitted.\n In this case, the chunk's completion callback will never be invoked.\n Note that it is always possible for the HTTP-stream to terminate unexpectedly\n prior to this call being made, in which case the error raised is\n AWS_ERROR_HTTP_STREAM_HAS_COMPLETED."] pub fn aws_http1_stream_write_chunk (http1_stream : * mut aws_http_stream , options : * const aws_http1_chunk_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " The stream must have specified `http2_use_manual_data_writes` during request creation.\n For client streams, activate() must be called before any frames are submitted.\n For server streams, the response headers must be submitted before any frames.\n A write with options that has end_stream set to be true will end the stream and prevent any further write.\n\n @return AWS_OP_SUCCESS if the write was queued\n         AWS_OP_ERROR indicating the attempt raised an error code.\n              AWS_ERROR_INVALID_STATE will be raised for invalid usage.\n              AWS_ERROR_HTTP_STREAM_HAS_COMPLETED will be raised if the stream ended for reasons behind the scenes.\n\n Typical usage will be something like:\n options.http2_use_manual_data_writes = true;\n stream = aws_http_connection_make_request(connection, &options);\n aws_http_stream_activate(stream);\n ...\n struct aws_http2_stream_write_data_options write;\n aws_http2_stream_write_data(stream, &write);\n ...\n struct aws_http2_stream_write_data_options last_write;\n last_write.end_stream = true;\n aws_http2_stream_write_data(stream, &write);\n ...\n aws_http_stream_release(stream);"] pub fn aws_http2_stream_write_data (http2_stream : * mut aws_http_stream , options : * const aws_http2_stream_write_data_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add a list of headers to be added as trailing headers sent after the last chunk is sent.\n a \"Trailer\" header field which indicates the fields present in the trailer.\n\n Certain headers are forbidden in the trailer (e.g., Transfer-Encoding, Content-Length, Host). See RFC-7541\n Section 4.1.2 for more details.\n\n For client streams, activate() must be called before any chunks are submitted.\n\n For server streams, the response must be submitted before the trailer can be added\n\n aws_http1_stream_add_chunked_trailer must be called before the final size 0 chunk, and at the moment can only\n be called once, though this could change if need be.\n\n Returns AWS_OP_SUCCESS if the chunk has been submitted."] pub fn aws_http1_stream_add_chunked_trailer (http1_stream : * mut aws_http_stream , trailing_headers : * const aws_http_headers) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " This datastructure has more functions for inspecting and modifying headers than\n are available on the aws_http_message datastructure."] pub fn aws_http_message_get_headers (message : * const aws_http_message) -> * mut aws_http_headers ; } unsafe extern "C" { # [doc = " Get the message's const aws_http_headers."] pub fn aws_http_message_get_const_headers (message : * const aws_http_message) -> * const aws_http_headers ; } unsafe extern "C" { # [doc = " Get the number of headers."] pub fn aws_http_message_get_header_count (message : * const aws_http_message) -> usize ; } unsafe extern "C" { # [doc = " Get the header at the specified index.\n This function cannot fail if a valid index is provided.\n Otherwise, AWS_ERROR_INVALID_INDEX will be raised.\n\n The underlying strings are stored within the message."] pub fn aws_http_message_get_header (message : * const aws_http_message , out_header : * mut aws_http_header , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add a header to the end of the array.\n The message makes its own copy of the underlying strings."] pub fn aws_http_message_add_header (message : * mut aws_http_message , header : aws_http_header) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add an array of headers to the end of the header array.\n The message makes its own copy of the underlying strings.\n\n This is a helper function useful when it's easier to define headers as a stack array, rather than calling add_header\n repeatedly."] pub fn aws_http_message_add_header_array (message : * mut aws_http_message , headers : * const aws_http_header , num_headers : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Remove the header at the specified index.\n Headers after this index are all shifted back one position.\n\n This function cannot fail if a valid index is provided.\n Otherwise, AWS_ERROR_INVALID_INDEX will be raised."] pub fn aws_http_message_erase_header (message : * mut aws_http_message , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Create a stream, with a client connection sending a request.\n The request does not start sending automatically once the stream is created. You must call\n aws_http_stream_activate to begin execution of the request.\n\n The `options` are copied during this call.\n\n Tip for language bindings: Do not bind the `options` struct. Use something more natural for your language,\n such as Builder Pattern in Java, or Python's ability to take many optional arguments by name.\n\n Note: The header of the request will be sent as it is when the message to send protocol matches the protocol of the\n connection.\n  - No `user-agent` will be added.\n  - No security check will be enforced. eg: `referer` header privacy should be enforced by the user-agent who adds the\n      header\n  - When HTTP/1 message sent on HTTP/2 connection, `aws_http2_message_new_from_http1` will be applied under the hood.\n  - When HTTP/2 message sent on HTTP/1 connection, no change will be made."] pub fn aws_http_connection_make_request (client_connection : * mut aws_http_connection , options : * const aws_http_make_request_options) -> * mut aws_http_stream ; } unsafe extern "C" { # [doc = " Create a stream, with a server connection receiving and responding to a request.\n This function can only be called from the `aws_http_on_incoming_request_fn` callback.\n aws_http_stream_send_response() should be used to send a response."] pub fn aws_http_stream_new_server_request_handler (options : * const aws_http_request_handler_options) -> * mut aws_http_stream ; } unsafe extern "C" { # [doc = " Acquire refcount on the stream to prevent it from being cleaned up until it is released."] pub fn aws_http_stream_acquire (stream : * mut aws_http_stream) -> * mut aws_http_stream ; } unsafe extern "C" { # [doc = " Users must release the stream when they are done with it, or its memory will never be cleaned up.\n This will not cancel the stream, its callbacks will still fire if the stream is still in progress.\n\n Tips for language bindings:\n - Invoke this from the wrapper class's finalizer/destructor.\n - Do not let the wrapper class be destroyed until on_complete() has fired."] pub fn aws_http_stream_release (stream : * mut aws_http_stream) ; } unsafe extern "C" { # [doc = " Only used for client initiated streams (immediately following a call to aws_http_connection_make_request).\n\n Activates the request's outgoing stream processing."] pub fn aws_http_stream_activate (stream : * mut aws_http_stream) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http_stream_get_connection (stream : * const aws_http_stream) -> * mut aws_http_connection ; } unsafe extern "C" { pub fn aws_http_stream_get_incoming_response_status (stream : * const aws_http_stream , out_status : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http_stream_get_incoming_request_method (stream : * const aws_http_stream , out_method : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http_stream_get_incoming_request_uri (stream : * const aws_http_stream , out_uri : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Send response (only callable from \"request handler\" streams)\n The response object must stay alive at least until the stream's on_complete is called."] pub fn aws_http_stream_send_response (stream : * mut aws_http_stream , response : * mut aws_http_message) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Increment the stream's flow-control window to keep data flowing.\n\n If the connection was created with `manual_window_management` set true,\n the flow-control window of each stream will shrink as body data is received\n (headers, padding, and other metadata do not affect the window).\n The connection's `initial_window_size` determines the starting size of each stream's window.\n If a stream's flow-control window reaches 0, no further data will be received.\n\n If `manual_window_management` is false, this call will have no effect.\n The connection maintains its flow-control windows such that\n no back-pressure is applied and data arrives as fast as possible.\n\n For HTTP/2, the client control exactly when the WINDOW_UPDATE frame sent.\n And client will make sure the WINDOW_UPDATE frame to be valid.\n Check `stream_window_size_threshold_to_send_update` for details."] pub fn aws_http_stream_update_window (stream : * mut aws_http_stream , increment_size : usize) ; } unsafe extern "C" { # [doc = " Gets the HTTP/2 id associated with a stream.  Even h1 streams have an id (using the same allocation procedure\n as http/2) for easier tracking purposes. For client streams, this will only be non-zero after a successful call\n to aws_http_stream_activate()"] pub fn aws_http_stream_get_id (stream : * const aws_http_stream) -> u32 ; } unsafe extern "C" { # [doc = " Cancel the stream in flight.\n For HTTP/1.1 streams, it's equivalent to closing the connection.\n For HTTP/2 streams, it's equivalent to calling reset on the stream with `AWS_HTTP2_ERR_CANCEL`.\n\n the stream will complete with the error code provided, unless the stream is\n already completing for other reasons, or the stream is not activated,\n in which case this call will have no impact."] pub fn aws_http_stream_cancel (stream : * mut aws_http_stream , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " Reset the HTTP/2 stream (HTTP/2 only).\n Note that if the stream closes before this async call is fully processed, the RST_STREAM frame will not be sent.\n\n @param http2_stream HTTP/2 stream.\n @param http2_error aws_http2_error_code. Reason to reset the stream."] pub fn aws_http2_stream_reset (http2_stream : * mut aws_http_stream , http2_error : u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the error code received in rst_stream.\n Only valid if the stream has completed, and an RST_STREAM frame has received.\n\n @param http2_stream HTTP/2 stream.\n @param out_http2_error Gets to set to HTTP/2 error code received in rst_stream."] pub fn aws_http2_stream_get_received_reset_error_code (http2_stream : * mut aws_http_stream , out_http2_error : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the HTTP/2 error code sent in the RST_STREAM frame (HTTP/2 only).\n Only valid if the stream has completed, and has sent an RST_STREAM frame.\n\n @param http2_stream HTTP/2 stream.\n @param out_http2_error Gets to set to HTTP/2 error code sent in rst_stream."] pub fn aws_http2_stream_get_sent_reset_error_code (http2_stream : * mut aws_http_stream , out_http2_error : * mut u32) -> :: libc :: c_int ; } # [repr (i32)] # [non_exhaustive] # [doc = " Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n SPDX-License-Identifier: Apache-2.0."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_status_code { AWS_HTTP_STATUS_CODE_UNKNOWN = - 1 , AWS_HTTP_STATUS_CODE_100_CONTINUE = 100 , AWS_HTTP_STATUS_CODE_101_SWITCHING_PROTOCOLS = 101 , AWS_HTTP_STATUS_CODE_102_PROCESSING = 102 , AWS_HTTP_STATUS_CODE_103_EARLY_HINTS = 103 , AWS_HTTP_STATUS_CODE_200_OK = 200 , AWS_HTTP_STATUS_CODE_201_CREATED = 201 , AWS_HTTP_STATUS_CODE_202_ACCEPTED = 202 , AWS_HTTP_STATUS_CODE_203_NON_AUTHORITATIVE_INFORMATION = 203 , AWS_HTTP_STATUS_CODE_204_NO_CONTENT = 204 , AWS_HTTP_STATUS_CODE_205_RESET_CONTENT = 205 , AWS_HTTP_STATUS_CODE_206_PARTIAL_CONTENT = 206 , AWS_HTTP_STATUS_CODE_207_MULTI_STATUS = 207 , AWS_HTTP_STATUS_CODE_208_ALREADY_REPORTED = 208 , AWS_HTTP_STATUS_CODE_226_IM_USED = 226 , AWS_HTTP_STATUS_CODE_300_MULTIPLE_CHOICES = 300 , AWS_HTTP_STATUS_CODE_301_MOVED_PERMANENTLY = 301 , AWS_HTTP_STATUS_CODE_302_FOUND = 302 , AWS_HTTP_STATUS_CODE_303_SEE_OTHER = 303 , AWS_HTTP_STATUS_CODE_304_NOT_MODIFIED = 304 , AWS_HTTP_STATUS_CODE_305_USE_PROXY = 305 , AWS_HTTP_STATUS_CODE_307_TEMPORARY_REDIRECT = 307 , AWS_HTTP_STATUS_CODE_308_PERMANENT_REDIRECT = 308 , AWS_HTTP_STATUS_CODE_400_BAD_REQUEST = 400 , AWS_HTTP_STATUS_CODE_401_UNAUTHORIZED = 401 , AWS_HTTP_STATUS_CODE_402_PAYMENT_REQUIRED = 402 , AWS_HTTP_STATUS_CODE_403_FORBIDDEN = 403 , AWS_HTTP_STATUS_CODE_404_NOT_FOUND = 404 , AWS_HTTP_STATUS_CODE_405_METHOD_NOT_ALLOWED = 405 , AWS_HTTP_STATUS_CODE_406_NOT_ACCEPTABLE = 406 , AWS_HTTP_STATUS_CODE_407_PROXY_AUTHENTICATION_REQUIRED = 407 , AWS_HTTP_STATUS_CODE_408_REQUEST_TIMEOUT = 408 , AWS_HTTP_STATUS_CODE_409_CONFLICT = 409 , AWS_HTTP_STATUS_CODE_410_GONE = 410 , AWS_HTTP_STATUS_CODE_411_LENGTH_REQUIRED = 411 , AWS_HTTP_STATUS_CODE_412_PRECONDITION_FAILED = 412 , AWS_HTTP_STATUS_CODE_413_REQUEST_ENTITY_TOO_LARGE = 413 , AWS_HTTP_STATUS_CODE_414_REQUEST_URI_TOO_LONG = 414 , AWS_HTTP_STATUS_CODE_415_UNSUPPORTED_MEDIA_TYPE = 415 , AWS_HTTP_STATUS_CODE_416_REQUESTED_RANGE_NOT_SATISFIABLE = 416 , AWS_HTTP_STATUS_CODE_417_EXPECTATION_FAILED = 417 , AWS_HTTP_STATUS_CODE_421_MISDIRECTED_REQUEST = 421 , AWS_HTTP_STATUS_CODE_422_UNPROCESSABLE_ENTITY = 422 , AWS_HTTP_STATUS_CODE_423_LOCKED = 423 , AWS_HTTP_STATUS_CODE_424_FAILED_DEPENDENCY = 424 , AWS_HTTP_STATUS_CODE_425_TOO_EARLY = 425 , AWS_HTTP_STATUS_CODE_426_UPGRADE_REQUIRED = 426 , AWS_HTTP_STATUS_CODE_428_PRECONDITION_REQUIRED = 428 , AWS_HTTP_STATUS_CODE_429_TOO_MANY_REQUESTS = 429 , AWS_HTTP_STATUS_CODE_431_REQUEST_HEADER_FIELDS_TOO_LARGE = 431 , AWS_HTTP_STATUS_CODE_451_UNAVAILABLE_FOR_LEGAL_REASON = 451 , AWS_HTTP_STATUS_CODE_500_INTERNAL_SERVER_ERROR = 500 , AWS_HTTP_STATUS_CODE_501_NOT_IMPLEMENTED = 501 , AWS_HTTP_STATUS_CODE_502_BAD_GATEWAY = 502 , AWS_HTTP_STATUS_CODE_503_SERVICE_UNAVAILABLE = 503 , AWS_HTTP_STATUS_CODE_504_GATEWAY_TIMEOUT = 504 , AWS_HTTP_STATUS_CODE_505_HTTP_VERSION_NOT_SUPPORTED = 505 , AWS_HTTP_STATUS_CODE_506_VARIANT_ALSO_NEGOTIATES = 506 , AWS_HTTP_STATUS_CODE_507_INSUFFICIENT_STORAGE = 507 , AWS_HTTP_STATUS_CODE_508_LOOP_DETECTED = 508 , AWS_HTTP_STATUS_CODE_510_NOT_EXTENDED = 510 , AWS_HTTP_STATUS_CODE_511_NETWORK_AUTHENTICATION_REQUIRED = 511 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_proxy_config { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [doc = " @Deprecated - Supported proxy authentication modes.  Superceded by proxy strategy."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_proxy_authentication_type { AWS_HPAT_NONE = 0 , AWS_HPAT_BASIC = 1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_proxy_env_var_type { # [doc = " Default.\n Disable reading from environment variable for proxy."] AWS_HPEV_DISABLE = 0 , # [doc = " Enable get proxy URL from environment variable, when the manual proxy options of connection manager is not set.\n env HTTPS_PROXY/https_proxy will be checked when the main connection use tls.\n env HTTP_PROXY/http_proxy will be checked when the main connection NOT use tls.\n env NO_PROXY/no_proxy will be checked to bypass proxy if the host match the pattern.\n      Check `aws_http_host_matches_no_proxy` for detail. This function can also be used with a direct no_proxy\n parameter. The lower case version has precedence."] AWS_HPEV_ENABLE = 1 , } # [repr (u32)] # [non_exhaustive] # [doc = " Supported proxy connection types"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_proxy_connection_type { # [doc = " Deprecated, but 0-valued for backwards compatibility\n\n If tls options are provided (for the main connection) then treat the proxy as a tunneling proxy\n If tls options are not provided (for the main connection), then treat the proxy as a forwarding proxy"] AWS_HPCT_HTTP_LEGACY = 0 , # [doc = " Use the proxy to forward http requests.  Attempting to use both this mode and TLS on the tunnel destination\n is a configuration error."] AWS_HPCT_HTTP_FORWARD = 1 , # [doc = " Use the proxy to establish a connection to a remote endpoint via a CONNECT request through the proxy.\n Works for both plaintext and tls connections."] AWS_HPCT_HTTP_TUNNEL = 2 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct proxy_env_var_settings { pub env_var_type : aws_http_proxy_env_var_type , pub connection_type : aws_http_proxy_connection_type , pub tls_options : * const aws_tls_connection_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of proxy_env_var_settings"] [:: std :: mem :: size_of :: < proxy_env_var_settings > () - 16usize] ; ["Alignment of proxy_env_var_settings"] [:: std :: mem :: align_of :: < proxy_env_var_settings > () - 8usize] ; ["Offset of field: proxy_env_var_settings::env_var_type"] [:: std :: mem :: offset_of ! (proxy_env_var_settings , env_var_type) - 0usize] ; ["Offset of field: proxy_env_var_settings::connection_type"] [:: std :: mem :: offset_of ! (proxy_env_var_settings , connection_type) - 4usize] ; ["Offset of field: proxy_env_var_settings::tls_options"] [:: std :: mem :: offset_of ! (proxy_env_var_settings , tls_options) - 8usize] ; } ; impl Default for proxy_env_var_settings { 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 http proxy server usage"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_proxy_options { # [doc = " Type of proxy connection to make"] pub connection_type : aws_http_proxy_connection_type , # [doc = " Proxy host to connect to"] pub host : aws_byte_cursor , # [doc = " Port to make the proxy connection to"] pub port : u32 , # [doc = " Optional.\n TLS configuration for the Local <-> Proxy connection\n Must be distinct from the the TLS options in the parent aws_http_connection_options struct"] pub tls_options : * const aws_tls_connection_options , # [doc = " Optional\n Advanced option that allows the user to create a custom strategy that gives low-level control of\n certain logical flows within the proxy logic.\n\n For tunneling proxies it allows custom retry and adaptive negotiation of CONNECT requests.\n For forwarding proxies it allows custom request transformations."] pub proxy_strategy : * mut aws_http_proxy_strategy , # [doc = " @Deprecated - What type of proxy authentication to use, if any.\n Replaced by instantiating a proxy_strategy"] pub auth_type : aws_http_proxy_authentication_type , # [doc = " @Deprecated - Optional user name to use for basic authentication\n Replaced by instantiating a proxy_strategy via aws_http_proxy_strategy_new_basic_auth()"] pub auth_username : aws_byte_cursor , # [doc = " @Deprecated - Optional password to use for basic authentication\n Replaced by instantiating a proxy_strategy via aws_http_proxy_strategy_new_basic_auth()"] pub auth_password : aws_byte_cursor , # [doc = " Optional\n No proxy hosts - Comma seperated list of hosts for which not to use a proxy, if one is specified."] pub no_proxy_hosts : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_options"] [:: std :: mem :: size_of :: < aws_http_proxy_options > () - 104usize] ; ["Alignment of aws_http_proxy_options"] [:: std :: mem :: align_of :: < aws_http_proxy_options > () - 8usize] ; ["Offset of field: aws_http_proxy_options::connection_type"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , connection_type) - 0usize] ; ["Offset of field: aws_http_proxy_options::host"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , host) - 8usize] ; ["Offset of field: aws_http_proxy_options::port"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , port) - 24usize] ; ["Offset of field: aws_http_proxy_options::tls_options"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , tls_options) - 32usize] ; ["Offset of field: aws_http_proxy_options::proxy_strategy"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , proxy_strategy) - 40usize] ; ["Offset of field: aws_http_proxy_options::auth_type"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , auth_type) - 48usize] ; ["Offset of field: aws_http_proxy_options::auth_username"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , auth_username) - 56usize] ; ["Offset of field: aws_http_proxy_options::auth_password"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , auth_password) - 72usize] ; ["Offset of field: aws_http_proxy_options::no_proxy_hosts"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , no_proxy_hosts) - 88usize] ; } ; impl Default for aws_http_proxy_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 () } } } # [doc = " Synchronous (for now) callback function to fetch a token used in modifying CONNECT requests"] pub type aws_http_proxy_negotiation_get_token_sync_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void , out_error_code : * mut :: libc :: c_int) -> * mut aws_string > ; # [doc = " Synchronous (for now) callback function to fetch a token used in modifying CONNECT request.  Includes a (byte string)\n context intended to be used as part of a challenge-response flow."] pub type aws_http_proxy_negotiation_get_challenge_token_sync_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void , challenge_context : * const aws_byte_cursor , out_error_code : * mut :: libc :: c_int) -> * mut aws_string > ; # [doc = " Proxy negotiation logic must call this function to indicate an unsuccessful outcome"] pub type aws_http_proxy_negotiation_terminate_fn = :: std :: option :: Option < unsafe extern "C" fn (message : * mut aws_http_message , error_code : :: libc :: c_int , internal_proxy_user_data : * mut :: libc :: c_void) > ; # [doc = " Proxy negotiation logic must call this function to forward the potentially-mutated request back to the proxy\n connection logic."] pub type aws_http_proxy_negotiation_http_request_forward_fn = :: std :: option :: Option < unsafe extern "C" fn (message : * mut aws_http_message , internal_proxy_user_data : * mut :: libc :: c_void) > ; # [doc = " User-supplied transform callback which implements the proxy request flow and ultimately, across all execution\n pathways, invokes either the terminate function or the forward function appropriately.\n\n For tunneling proxy connections, this request flow transform only applies to the CONNECT stage of proxy\n connection establishment.\n\n For forwarding proxy connections, this request flow transform applies to every single http request that goes\n out on the connection.\n\n Forwarding proxy connections cannot yet support a truly async request transform without major surgery on http\n stream creation, so for now, we split into an async version (for tunneling proxies) and a separate\n synchronous version for forwarding proxies.  Also forwarding proxies are a kind of legacy dead-end in some\n sense.\n"] pub type aws_http_proxy_negotiation_http_request_transform_async_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , message : * mut aws_http_message , negotiation_termination_callback : aws_http_proxy_negotiation_terminate_fn , negotiation_http_request_forward_callback : aws_http_proxy_negotiation_http_request_forward_fn , internal_proxy_user_data : * mut :: libc :: c_void) > ; pub type aws_http_proxy_negotiation_http_request_transform_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , message : * mut aws_http_message) -> :: libc :: c_int > ; # [doc = " Tunneling proxy connections only.  A callback that lets the negotiator examine the headers in the\n response to the most recent CONNECT request as they arrive."] pub type aws_http_proxy_negotiation_connect_on_incoming_headers_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , header_block : aws_http_header_block , header_array : * const aws_http_header , num_headers : usize) -> :: libc :: c_int > ; # [doc = " Tunneling proxy connections only.  A callback that lets the negotiator examine the status code of the\n response to the most recent CONNECT request."] pub type aws_http_proxy_negotiator_connect_status_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , status_code : aws_http_status_code) -> :: libc :: c_int > ; # [doc = " Tunneling proxy connections only.  A callback that lets the negotiator examine the body of the response\n to the most recent CONNECT request."] pub type aws_http_proxy_negotiator_connect_on_incoming_body_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , data : * const aws_byte_cursor) -> :: libc :: c_int > ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_proxy_negotiation_retry_directive { AWS_HPNRD_STOP = 0 , AWS_HPNRD_NEW_CONNECTION = 1 , AWS_HPNRD_CURRENT_CONNECTION = 2 , } pub type aws_http_proxy_negotiator_get_retry_directive_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator) -> aws_http_proxy_negotiation_retry_directive > ; # [doc = " Vtable for forwarding-based proxy negotiators"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_proxy_negotiator_forwarding_vtable { pub forward_request_transform : aws_http_proxy_negotiation_http_request_transform_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_negotiator_forwarding_vtable"] [:: std :: mem :: size_of :: < aws_http_proxy_negotiator_forwarding_vtable > () - 8usize] ; ["Alignment of aws_http_proxy_negotiator_forwarding_vtable"] [:: std :: mem :: align_of :: < aws_http_proxy_negotiator_forwarding_vtable > () - 8usize] ; ["Offset of field: aws_http_proxy_negotiator_forwarding_vtable::forward_request_transform"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_forwarding_vtable , forward_request_transform) - 0usize] ; } ; # [doc = " Vtable for tunneling-based proxy negotiators"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_proxy_negotiator_tunnelling_vtable { pub connect_request_transform : aws_http_proxy_negotiation_http_request_transform_async_fn , pub on_incoming_headers_callback : aws_http_proxy_negotiation_connect_on_incoming_headers_fn , pub on_status_callback : aws_http_proxy_negotiator_connect_status_fn , pub on_incoming_body_callback : aws_http_proxy_negotiator_connect_on_incoming_body_fn , pub get_retry_directive : aws_http_proxy_negotiator_get_retry_directive_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_negotiator_tunnelling_vtable"] [:: std :: mem :: size_of :: < aws_http_proxy_negotiator_tunnelling_vtable > () - 40usize] ; ["Alignment of aws_http_proxy_negotiator_tunnelling_vtable"] [:: std :: mem :: align_of :: < aws_http_proxy_negotiator_tunnelling_vtable > () - 8usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::connect_request_transform"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , connect_request_transform) - 0usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::on_incoming_headers_callback"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , on_incoming_headers_callback) - 8usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::on_status_callback"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , on_status_callback) - 16usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::on_incoming_body_callback"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , on_incoming_body_callback) - 24usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::get_retry_directive"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , get_retry_directive) - 32usize] ; } ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_http_proxy_negotiator { pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , pub strategy_vtable : aws_http_proxy_negotiator__bindgen_ty_1 , } # [repr (C)] # [derive (Copy , Clone)] pub union aws_http_proxy_negotiator__bindgen_ty_1 { pub forwarding_vtable : * mut aws_http_proxy_negotiator_forwarding_vtable , pub tunnelling_vtable : * mut aws_http_proxy_negotiator_tunnelling_vtable , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_negotiator__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_http_proxy_negotiator__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_http_proxy_negotiator__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_http_proxy_negotiator__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_http_proxy_negotiator__bindgen_ty_1::forwarding_vtable"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator__bindgen_ty_1 , forwarding_vtable) - 0usize] ; ["Offset of field: aws_http_proxy_negotiator__bindgen_ty_1::tunnelling_vtable"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator__bindgen_ty_1 , tunnelling_vtable) - 0usize] ; } ; impl Default for aws_http_proxy_negotiator__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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_negotiator"] [:: std :: mem :: size_of :: < aws_http_proxy_negotiator > () - 40usize] ; ["Alignment of aws_http_proxy_negotiator"] [:: std :: mem :: align_of :: < aws_http_proxy_negotiator > () - 8usize] ; ["Offset of field: aws_http_proxy_negotiator::ref_count"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator , ref_count) - 0usize] ; ["Offset of field: aws_http_proxy_negotiator::impl_"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator , impl_) - 24usize] ; ["Offset of field: aws_http_proxy_negotiator::strategy_vtable"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator , strategy_vtable) - 32usize] ; } ; impl Default for aws_http_proxy_negotiator { 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_http_proxy_strategy_create_negotiator_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_strategy : * mut aws_http_proxy_strategy , allocator : * mut aws_allocator) -> * mut aws_http_proxy_negotiator > ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_proxy_strategy_vtable { pub create_negotiator : aws_http_proxy_strategy_create_negotiator_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_vtable"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_vtable > () - 8usize] ; ["Alignment of aws_http_proxy_strategy_vtable"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_vtable > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_vtable::create_negotiator"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_vtable , create_negotiator) - 0usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_proxy_strategy { pub ref_count : aws_ref_count , pub vtable : * mut aws_http_proxy_strategy_vtable , pub impl_ : * mut :: libc :: c_void , pub proxy_connection_type : aws_http_proxy_connection_type , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy > () - 48usize] ; ["Alignment of aws_http_proxy_strategy"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy::ref_count"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy , ref_count) - 0usize] ; ["Offset of field: aws_http_proxy_strategy::vtable"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy , vtable) - 24usize] ; ["Offset of field: aws_http_proxy_strategy::impl_"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy , impl_) - 32usize] ; ["Offset of field: aws_http_proxy_strategy::proxy_connection_type"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy , proxy_connection_type) - 40usize] ; } ; impl Default for aws_http_proxy_strategy { 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)] pub struct aws_http_proxy_strategy_basic_auth_options { pub proxy_connection_type : aws_http_proxy_connection_type , pub user_name : aws_byte_cursor , pub password : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_basic_auth_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_basic_auth_options > () - 40usize] ; ["Alignment of aws_http_proxy_strategy_basic_auth_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_basic_auth_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_basic_auth_options::proxy_connection_type"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_basic_auth_options , proxy_connection_type) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_basic_auth_options::user_name"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_basic_auth_options , user_name) - 8usize] ; ["Offset of field: aws_http_proxy_strategy_basic_auth_options::password"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_basic_auth_options , password) - 24usize] ; } ; impl Default for aws_http_proxy_strategy_basic_auth_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)] pub struct aws_http_proxy_strategy_tunneling_kerberos_options { pub get_token : aws_http_proxy_negotiation_get_token_sync_fn , pub get_token_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_tunneling_kerberos_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_tunneling_kerberos_options > () - 16usize] ; ["Alignment of aws_http_proxy_strategy_tunneling_kerberos_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_tunneling_kerberos_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_kerberos_options::get_token"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_kerberos_options , get_token) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_kerberos_options::get_token_user_data"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_kerberos_options , get_token_user_data) - 8usize] ; } ; impl Default for aws_http_proxy_strategy_tunneling_kerberos_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)] pub struct aws_http_proxy_strategy_tunneling_ntlm_options { pub get_token : aws_http_proxy_negotiation_get_token_sync_fn , pub get_challenge_token : aws_http_proxy_negotiation_get_challenge_token_sync_fn , pub get_challenge_token_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_tunneling_ntlm_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_tunneling_ntlm_options > () - 24usize] ; ["Alignment of aws_http_proxy_strategy_tunneling_ntlm_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_tunneling_ntlm_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_ntlm_options::get_token"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_ntlm_options , get_token) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_ntlm_options::get_challenge_token"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_ntlm_options , get_challenge_token) - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_ntlm_options::get_challenge_token_user_data"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_ntlm_options , get_challenge_token_user_data) - 16usize] ; } ; impl Default for aws_http_proxy_strategy_tunneling_ntlm_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)] pub struct aws_http_proxy_strategy_tunneling_adaptive_options { pub kerberos_options : * mut aws_http_proxy_strategy_tunneling_kerberos_options , pub ntlm_options : * mut aws_http_proxy_strategy_tunneling_ntlm_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_tunneling_adaptive_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_tunneling_adaptive_options > () - 16usize] ; ["Alignment of aws_http_proxy_strategy_tunneling_adaptive_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_tunneling_adaptive_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_adaptive_options::kerberos_options"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_adaptive_options , kerberos_options) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_adaptive_options::ntlm_options"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_adaptive_options , ntlm_options) - 8usize] ; } ; impl Default for aws_http_proxy_strategy_tunneling_adaptive_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)] pub struct aws_http_proxy_strategy_tunneling_sequence_options { pub strategies : * mut * mut aws_http_proxy_strategy , pub strategy_count : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_tunneling_sequence_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_tunneling_sequence_options > () - 16usize] ; ["Alignment of aws_http_proxy_strategy_tunneling_sequence_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_tunneling_sequence_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_sequence_options::strategies"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_sequence_options , strategies) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_sequence_options::strategy_count"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_sequence_options , strategy_count) - 8usize] ; } ; impl Default for aws_http_proxy_strategy_tunneling_sequence_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 () } } } unsafe extern "C" { # [doc = " Take a reference to an http proxy negotiator\n @param proxy_negotiator negotiator to take a reference to\n @return the strategy"] pub fn aws_http_proxy_negotiator_acquire (proxy_negotiator : * mut aws_http_proxy_negotiator) -> * mut aws_http_proxy_negotiator ; } unsafe extern "C" { # [doc = " Release a reference to an http proxy negotiator\n @param proxy_negotiator negotiator to release a reference to"] pub fn aws_http_proxy_negotiator_release (proxy_negotiator : * mut aws_http_proxy_negotiator) ; } unsafe extern "C" { # [doc = " Creates a new proxy negotiator from a proxy strategy\n @param allocator memory allocator to use\n @param strategy strategy to creation a new negotiator for\n @return a new proxy negotiator if successful, otherwise NULL"] pub fn aws_http_proxy_strategy_create_negotiator (strategy : * mut aws_http_proxy_strategy , allocator : * mut aws_allocator) -> * mut aws_http_proxy_negotiator ; } unsafe extern "C" { # [doc = " Take a reference to an http proxy strategy\n @param proxy_strategy strategy to take a reference to\n @return the strategy"] pub fn aws_http_proxy_strategy_acquire (proxy_strategy : * mut aws_http_proxy_strategy) -> * mut aws_http_proxy_strategy ; } unsafe extern "C" { # [doc = " Release a reference to an http proxy strategy\n @param proxy_strategy strategy to release a reference to"] pub fn aws_http_proxy_strategy_release (proxy_strategy : * mut aws_http_proxy_strategy) ; } unsafe extern "C" { # [doc = " A constructor for a proxy strategy that performs basic authentication by adding the appropriate\n header and header value to requests or CONNECT requests.\n\n @param allocator memory allocator to use\n @param config basic authentication configuration info\n @return a new proxy strategy if successfully constructed, otherwise NULL"] pub fn aws_http_proxy_strategy_new_basic_auth (allocator : * mut aws_allocator , config : * mut aws_http_proxy_strategy_basic_auth_options) -> * mut aws_http_proxy_strategy ; } unsafe extern "C" { # [doc = " Constructor for an adaptive tunneling proxy strategy.  This strategy attempts a vanilla CONNECT and if that\n fails it may make followup CONNECT attempts using kerberos or ntlm tokens, based on configuration and proxy\n response properties.\n\n @param allocator memory allocator to use\n @param config configuration options for the strategy\n @return a new proxy strategy if successfully constructed, otherwise NULL"] pub fn aws_http_proxy_strategy_new_tunneling_adaptive (allocator : * mut aws_allocator , config : * mut aws_http_proxy_strategy_tunneling_adaptive_options) -> * mut aws_http_proxy_strategy ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from http connection options\n @param allocator memory allocator to use\n @param options http connection options to source proxy configuration from\n @return"] pub fn aws_http_proxy_config_new_from_connection_options (allocator : * mut aws_allocator , options : * const aws_http_client_connection_options) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from http connection manager options\n @param allocator memory allocator to use\n @param options http connection manager options to source proxy configuration from\n @return"] pub fn aws_http_proxy_config_new_from_manager_options (allocator : * mut aws_allocator , options : * const aws_http_connection_manager_options) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from non-persistent proxy options.  The resulting\n proxy configuration assumes a tunneling connection type.\n\n @param allocator memory allocator to use\n @param options http proxy options to source proxy configuration from\n @return"] pub fn aws_http_proxy_config_new_tunneling_from_proxy_options (allocator : * mut aws_allocator , options : * const aws_http_proxy_options) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from non-persistent proxy options.\n Legacy connection type of proxy options will be rejected.\n\n @param allocator memory allocator to use\n @param options http proxy options to source proxy configuration from\n @return"] pub fn aws_http_proxy_config_new_from_proxy_options (allocator : * mut aws_allocator , options : * const aws_http_proxy_options) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from non-persistent proxy options.\n\n @param allocator memory allocator to use\n @param options http proxy options to source proxy configuration from\n @param is_tls_connection tls connection info of the main connection to determine connection_type\n                          when the connection_type is legacy.\n @return"] pub fn aws_http_proxy_config_new_from_proxy_options_with_tls_info (allocator : * mut aws_allocator , proxy_options : * const aws_http_proxy_options , is_tls_connection : bool) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Clones an existing proxy configuration.  A refactor could remove this (do a \"move\" between the old and new user\n data in the one spot it's used) but that should wait until we have better test cases for the logic where this\n gets invoked (ntlm/kerberos chains).\n\n @param allocator memory allocator to use\n @param proxy_config http proxy configuration to clone\n @return"] pub fn aws_http_proxy_config_new_clone (allocator : * mut aws_allocator , proxy_config : * const aws_http_proxy_config) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Destroys an http proxy configuration\n @param config http proxy configuration to destroy"] pub fn aws_http_proxy_config_destroy (config : * mut aws_http_proxy_config) ; } unsafe extern "C" { # [doc = " Initializes non-persistent http proxy options from a persistent http proxy configuration\n @param options http proxy options to initialize\n @param config the http proxy config to use as an initialization source"] pub fn aws_http_proxy_options_init_from_config (options : * mut aws_http_proxy_options , config : * const aws_http_proxy_config) ; } unsafe extern "C" { # [doc = " Establish an arbitrary protocol connection through an http proxy via tunneling CONNECT.  Alpn is\n not required for this connection process to succeed, but we encourage its use if available.\n\n @param channel_options configuration options for the socket level connection\n @param proxy_options configuration options for the proxy connection\n\n @return AWS_OP_SUCCESS if the asynchronous channel kickoff succeeded, AWS_OP_ERR otherwise"] pub fn aws_http_proxy_new_socket_channel (channel_options : * mut aws_socket_channel_bootstrap_options , proxy_options : * const aws_http_proxy_options) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_auth_http_system_vtable { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_ecc_key_pair { _unused : [u8 ; 0] , } unsafe extern "C" { pub static aws_sts_assume_role_default_duration_secs : u16 ; } pub type aws_on_get_credentials_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (credentials : * mut aws_credentials , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_credentials_provider_get_credentials_fn = :: std :: option :: Option < unsafe extern "C" fn (provider : * mut aws_credentials_provider , callback : aws_on_get_credentials_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; pub type aws_credentials_provider_destroy_fn = :: std :: option :: Option < unsafe extern "C" fn (provider : * mut aws_credentials_provider) > ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_credentials_provider_vtable { pub get_credentials : aws_credentials_provider_get_credentials_fn , pub destroy : aws_credentials_provider_destroy_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_vtable"] [:: std :: mem :: size_of :: < aws_credentials_provider_vtable > () - 16usize] ; ["Alignment of aws_credentials_provider_vtable"] [:: std :: mem :: align_of :: < aws_credentials_provider_vtable > () - 8usize] ; ["Offset of field: aws_credentials_provider_vtable::get_credentials"] [:: std :: mem :: offset_of ! (aws_credentials_provider_vtable , get_credentials) - 0usize] ; ["Offset of field: aws_credentials_provider_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_credentials_provider_vtable , destroy) - 8usize] ; } ; pub type aws_credentials_provider_shutdown_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_shutdown_options { pub shutdown_callback : aws_credentials_provider_shutdown_completed_fn , pub shutdown_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_shutdown_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_shutdown_options > () - 16usize] ; ["Alignment of aws_credentials_provider_shutdown_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_shutdown_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_shutdown_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_credentials_provider_shutdown_options , shutdown_callback) - 0usize] ; ["Offset of field: aws_credentials_provider_shutdown_options::shutdown_user_data"] [:: std :: mem :: offset_of ! (aws_credentials_provider_shutdown_options , shutdown_user_data) - 8usize] ; } ; impl Default for aws_credentials_provider_shutdown_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 () } } } # [doc = " A baseclass for credentials providers.  A credentials provider is an object that has an asynchronous\n query function for retrieving AWS credentials.\n\n Ref-counted.  Thread-safe."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider { pub vtable : * mut aws_credentials_provider_vtable , pub allocator : * mut aws_allocator , pub shutdown_options : aws_credentials_provider_shutdown_options , pub impl_ : * mut :: libc :: c_void , pub ref_count : aws_atomic_var , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider"] [:: std :: mem :: size_of :: < aws_credentials_provider > () - 48usize] ; ["Alignment of aws_credentials_provider"] [:: std :: mem :: align_of :: < aws_credentials_provider > () - 8usize] ; ["Offset of field: aws_credentials_provider::vtable"] [:: std :: mem :: offset_of ! (aws_credentials_provider , vtable) - 0usize] ; ["Offset of field: aws_credentials_provider::allocator"] [:: std :: mem :: offset_of ! (aws_credentials_provider , allocator) - 8usize] ; ["Offset of field: aws_credentials_provider::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider , shutdown_options) - 16usize] ; ["Offset of field: aws_credentials_provider::impl_"] [:: std :: mem :: offset_of ! (aws_credentials_provider , impl_) - 32usize] ; ["Offset of field: aws_credentials_provider::ref_count"] [:: std :: mem :: offset_of ! (aws_credentials_provider , ref_count) - 40usize] ; } ; impl Default for aws_credentials_provider { 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 = " Configuration options for a provider that returns a fixed set of credentials"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_static_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub access_key_id : aws_byte_cursor , pub secret_access_key : aws_byte_cursor , pub session_token : aws_byte_cursor , pub account_id : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_static_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_static_options > () - 80usize] ; ["Alignment of aws_credentials_provider_static_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_static_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_static_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_static_options::access_key_id"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , access_key_id) - 16usize] ; ["Offset of field: aws_credentials_provider_static_options::secret_access_key"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , secret_access_key) - 32usize] ; ["Offset of field: aws_credentials_provider_static_options::session_token"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , session_token) - 48usize] ; ["Offset of field: aws_credentials_provider_static_options::account_id"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , account_id) - 64usize] ; } ; impl Default for aws_credentials_provider_static_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 () } } } # [doc = " Configuration options for a provider that returns credentials based on environment variable values"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_environment_options { pub shutdown_options : aws_credentials_provider_shutdown_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_environment_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_environment_options > () - 16usize] ; ["Alignment of aws_credentials_provider_environment_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_environment_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_environment_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_environment_options , shutdown_options) - 0usize] ; } ; impl Default for aws_credentials_provider_environment_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 () } } } # [doc = " Configuration options for a provider that sources credentials from the aws config and credentials files\n (by default ~/.aws/config and ~/.aws/credentials)"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_profile_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub profile_name_override : aws_byte_cursor , pub config_file_name_override : aws_byte_cursor , pub credentials_file_name_override : aws_byte_cursor , # [doc = " (Optional)\n Use a cached merged profile collection. A merge collection has both config file\n (~/.aws/config) and credentials file based profile collection (~/.aws/credentials) using\n `aws_profile_collection_new_from_merge`.\n If this option is provided, `config_file_name_override` and `credentials_file_name_override` will be ignored."] pub profile_collection_cached : * mut aws_profile_collection , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub function_table : * mut aws_auth_http_system_vtable , pub proxy_ev_settings : * mut proxy_env_var_settings , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_profile_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_profile_options > () - 104usize] ; ["Alignment of aws_credentials_provider_profile_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_profile_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_profile_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_profile_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , profile_name_override) - 16usize] ; ["Offset of field: aws_credentials_provider_profile_options::config_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , config_file_name_override) - 32usize] ; ["Offset of field: aws_credentials_provider_profile_options::credentials_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , credentials_file_name_override) - 48usize] ; ["Offset of field: aws_credentials_provider_profile_options::profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , profile_collection_cached) - 64usize] ; ["Offset of field: aws_credentials_provider_profile_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , bootstrap) - 72usize] ; ["Offset of field: aws_credentials_provider_profile_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , tls_ctx) - 80usize] ; ["Offset of field: aws_credentials_provider_profile_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , function_table) - 88usize] ; ["Offset of field: aws_credentials_provider_profile_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , proxy_ev_settings) - 96usize] ; } ; impl Default for aws_credentials_provider_profile_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 () } } } # [doc = " Configuration options for a provider that functions as a caching decorator.  Credentials sourced through this\n provider will be cached within it until their expiration time.  When the cached credentials expire, new\n credentials will be fetched when next queried."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_cached_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub source : * mut aws_credentials_provider , pub refresh_time_in_milliseconds : u64 , pub high_res_clock_fn : aws_io_clock_fn , pub system_clock_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_cached_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_cached_options > () - 48usize] ; ["Alignment of aws_credentials_provider_cached_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_cached_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_cached_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_cached_options::source"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , source) - 16usize] ; ["Offset of field: aws_credentials_provider_cached_options::refresh_time_in_milliseconds"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , refresh_time_in_milliseconds) - 24usize] ; ["Offset of field: aws_credentials_provider_cached_options::high_res_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , high_res_clock_fn) - 32usize] ; ["Offset of field: aws_credentials_provider_cached_options::system_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , system_clock_fn) - 40usize] ; } ; impl Default for aws_credentials_provider_cached_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 () } } } # [doc = " Configuration options for a provider that queries, in order, a list of providers.  This provider uses the\n first set of credentials successfully queried.  Providers are queried one at a time; a provider is not queried\n until the preceding provider has failed to source credentials."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_chain_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub providers : * mut * mut aws_credentials_provider , pub provider_count : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_chain_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_chain_options > () - 32usize] ; ["Alignment of aws_credentials_provider_chain_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_chain_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_chain_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_chain_options::providers"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_options , providers) - 16usize] ; ["Offset of field: aws_credentials_provider_chain_options::provider_count"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_options , provider_count) - 24usize] ; } ; impl Default for aws_credentials_provider_chain_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 (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_imds_protocol_version { # [doc = " Defaults to IMDS_PROTOCOL_V2. It can be set to either one and IMDS Client\n will figure out (by looking at response code) which protocol an instance\n is using. But a more clear setting will reduce unnecessary network request."] IMDS_PROTOCOL_V2 = 0 , # [doc = " Defaults to IMDS_PROTOCOL_V2. It can be set to either one and IMDS Client\n will figure out (by looking at response code) which protocol an instance\n is using. But a more clear setting will reduce unnecessary network request."] IMDS_PROTOCOL_V1 = 1 , } # [doc = " Configuration options for the provider that sources credentials from ec2 instance metadata"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_imds_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub imds_version : aws_imds_protocol_version , pub ec2_metadata_v1_disabled : bool , pub function_table : * mut aws_auth_http_system_vtable , pub proxy_ev_settings : * const proxy_env_var_settings , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_imds_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_imds_options > () - 48usize] ; ["Alignment of aws_credentials_provider_imds_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_imds_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_imds_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_imds_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_imds_options::imds_version"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , imds_version) - 24usize] ; ["Offset of field: aws_credentials_provider_imds_options::ec2_metadata_v1_disabled"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , ec2_metadata_v1_disabled) - 28usize] ; ["Offset of field: aws_credentials_provider_imds_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , function_table) - 32usize] ; ["Offset of field: aws_credentials_provider_imds_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , proxy_ev_settings) - 40usize] ; } ; impl Default for aws_credentials_provider_imds_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)] pub struct aws_credentials_provider_ecs_environment_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_ecs_environment_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_ecs_environment_options > () - 48usize] ; ["Alignment of aws_credentials_provider_ecs_environment_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_ecs_environment_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , tls_ctx) - 24usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , proxy_ev_settings) - 32usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , function_table) - 40usize] ; } ; impl Default for aws_credentials_provider_ecs_environment_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)] pub struct aws_credentials_provider_ecs_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub host : aws_byte_cursor , pub path_and_query : aws_byte_cursor , pub auth_token_file_path : aws_byte_cursor , pub auth_token : aws_byte_cursor , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , pub port : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_ecs_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_ecs_options > () - 120usize] ; ["Alignment of aws_credentials_provider_ecs_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_ecs_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_ecs_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_ecs_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_ecs_options::host"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , host) - 24usize] ; ["Offset of field: aws_credentials_provider_ecs_options::path_and_query"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , path_and_query) - 40usize] ; ["Offset of field: aws_credentials_provider_ecs_options::auth_token_file_path"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , auth_token_file_path) - 56usize] ; ["Offset of field: aws_credentials_provider_ecs_options::auth_token"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , auth_token) - 72usize] ; ["Offset of field: aws_credentials_provider_ecs_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , tls_ctx) - 88usize] ; ["Offset of field: aws_credentials_provider_ecs_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , proxy_ev_settings) - 96usize] ; ["Offset of field: aws_credentials_provider_ecs_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , function_table) - 104usize] ; ["Offset of field: aws_credentials_provider_ecs_options::port"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , port) - 112usize] ; } ; impl Default for aws_credentials_provider_ecs_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 () } } } # [doc = " Configuration options for the X509 credentials provider\n\n The x509 credentials provider sources temporary credentials from AWS IoT Core using TLS mutual authentication.\n See details: https://docs.aws.amazon.com/iot/latest/developerguide/authorizing-direct-aws.html\n An end to end demo with detailed steps can be found here:\n https://aws.amazon.com/blogs/security/how-to-eliminate-the-need-for-hardcoded-aws-credentials-in-devices-by-using-the-aws-iot-credentials-provider/"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_x509_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub tls_connection_options : * const aws_tls_connection_options , pub thing_name : aws_byte_cursor , pub role_alias : aws_byte_cursor , # [doc = " Per-account X509 credentials sourcing endpoint."] pub endpoint : aws_byte_cursor , # [doc = " (Optional) Http proxy configuration for the http request that fetches credentials"] pub proxy_options : * const aws_http_proxy_options , # [doc = " (Optional) Settings propagated down to http connection manager to choose proxy options from environment. Read\n aws_http_credentials_provider.h for more information."] pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_x509_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_x509_options > () - 104usize] ; ["Alignment of aws_credentials_provider_x509_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_x509_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_x509_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_x509_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_x509_options::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , tls_connection_options) - 24usize] ; ["Offset of field: aws_credentials_provider_x509_options::thing_name"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , thing_name) - 32usize] ; ["Offset of field: aws_credentials_provider_x509_options::role_alias"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , role_alias) - 48usize] ; ["Offset of field: aws_credentials_provider_x509_options::endpoint"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , endpoint) - 64usize] ; ["Offset of field: aws_credentials_provider_x509_options::proxy_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , proxy_options) - 80usize] ; ["Offset of field: aws_credentials_provider_x509_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , proxy_ev_settings) - 88usize] ; ["Offset of field: aws_credentials_provider_x509_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , function_table) - 96usize] ; } ; impl Default for aws_credentials_provider_x509_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 () } } } # [doc = " Configuration options for the STS web identity provider\n\n Sts with web identity credentials provider sources a set of temporary security credentials for users who have been\n authenticated in a mobile or web application with a web identity provider.\n Example providers include Amazon Cognito, Login with Amazon, Facebook, Google, or any OpenID Connect-compatible\n identity provider like Elastic Kubernetes Service\n https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoleWithWebIdentity.html\n The required parameters used in the request (region, roleArn, sessionName, tokenFilePath) are automatically resolved\n by SDK from envrionment variables or config file if not set.\n---------------------------------------------------------------------------------\n| Parameter           | Environment Variable Name    | Config File Property Name |\n----------------------------------------------------------------------------------\n| region              | AWS_REGION/AWS_DEFAULT_REGION| region                    |\n| role_arn            | AWS_ROLE_ARN                 | role_arn                  |\n| role_session_name   | AWS_ROLE_SESSION_NAME        | role_session_name         |\n| token_file_path     | AWS_WEB_IDENTITY_TOKEN_FILE  | web_identity_token_file   |\n|--------------------------------------------------------------------------------|\n The order of resolution is the following\n 1. Parameters\n 2. Environment Variables (in case of region, the AWS_REGION is preferred over the AWS_DEFAULT_REGION)\n 3. Config File"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_sts_web_identity_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , # [doc = " (Optional)\n Use a cached config profile collection. You can also pass a merged collection."] pub config_profile_collection_cached : * mut aws_profile_collection , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , pub profile_name_override : aws_byte_cursor , pub region : aws_byte_cursor , pub role_arn : aws_byte_cursor , pub role_session_name : aws_byte_cursor , pub token_file_path : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_sts_web_identity_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_sts_web_identity_options > () - 136usize] ; ["Alignment of aws_credentials_provider_sts_web_identity_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_sts_web_identity_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::config_profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , config_profile_collection_cached) - 24usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , tls_ctx) - 32usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , proxy_ev_settings) - 40usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , function_table) - 48usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , profile_name_override) - 56usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::region"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , region) - 72usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::role_arn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , role_arn) - 88usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::role_session_name"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , role_session_name) - 104usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::token_file_path"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , token_file_path) - 120usize] ; } ; impl Default for aws_credentials_provider_sts_web_identity_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)] pub struct aws_credentials_provider_sso_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub profile_name_override : aws_byte_cursor , pub config_file_name_override : aws_byte_cursor , # [doc = " (Optional)\n Use a cached config profile collection. You can also pass a merged collection.\n config_file_name_override will be ignored if this option is provided."] pub config_file_cached : * mut aws_profile_collection , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , pub system_clock_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_sso_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_sso_options > () - 96usize] ; ["Alignment of aws_credentials_provider_sso_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_sso_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_sso_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_sso_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , profile_name_override) - 16usize] ; ["Offset of field: aws_credentials_provider_sso_options::config_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , config_file_name_override) - 32usize] ; ["Offset of field: aws_credentials_provider_sso_options::config_file_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , config_file_cached) - 48usize] ; ["Offset of field: aws_credentials_provider_sso_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , bootstrap) - 56usize] ; ["Offset of field: aws_credentials_provider_sso_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , tls_ctx) - 64usize] ; ["Offset of field: aws_credentials_provider_sso_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , proxy_ev_settings) - 72usize] ; ["Offset of field: aws_credentials_provider_sso_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , function_table) - 80usize] ; ["Offset of field: aws_credentials_provider_sso_options::system_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , system_clock_fn) - 88usize] ; } ; impl Default for aws_credentials_provider_sso_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 () } } } # [doc = " Configuration options for the STS credentials provider.\n STS Credentials Provider will try to automatically resolve the region and use a regional STS endpoint if successful.\n The region resolution order is the following:\n 1. AWS_REGION environment variable\n 2. AWS_DEFAULT_REGION environment variable\n 3. The region property in the config file."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_sts_options { pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub creds_provider : * mut aws_credentials_provider , pub role_arn : aws_byte_cursor , pub session_name : aws_byte_cursor , pub external_id : aws_byte_cursor , pub duration_seconds : u16 , # [doc = " (Optional) Http proxy configuration for the AssumeRole http request that fetches credentials"] pub http_proxy_options : * const aws_http_proxy_options , # [doc = " (Optional) Settings propagated down to http connection manager to choose proxy options from environment. Read\n aws_http_credentials_provider.h for more information."] pub proxy_ev_settings : * const proxy_env_var_settings , # [doc = " (Optional)\n Uses a cached config file profile collection (~/.aws/config). You can also pass a merged profile collection,\n which contains both a config file and a credentials file.\n If provided, config_file_name_override is ignored."] pub profile_collection_cached : * mut aws_profile_collection , pub profile_name_override : aws_byte_cursor , pub config_file_name_override : aws_byte_cursor , pub shutdown_options : aws_credentials_provider_shutdown_options , pub function_table : * mut aws_auth_http_system_vtable , pub system_clock_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_sts_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_sts_options > () - 168usize] ; ["Alignment of aws_credentials_provider_sts_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_sts_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_sts_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , bootstrap) - 0usize] ; ["Offset of field: aws_credentials_provider_sts_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , tls_ctx) - 8usize] ; ["Offset of field: aws_credentials_provider_sts_options::creds_provider"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , creds_provider) - 16usize] ; ["Offset of field: aws_credentials_provider_sts_options::role_arn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , role_arn) - 24usize] ; ["Offset of field: aws_credentials_provider_sts_options::session_name"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , session_name) - 40usize] ; ["Offset of field: aws_credentials_provider_sts_options::external_id"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , external_id) - 56usize] ; ["Offset of field: aws_credentials_provider_sts_options::duration_seconds"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , duration_seconds) - 72usize] ; ["Offset of field: aws_credentials_provider_sts_options::http_proxy_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , http_proxy_options) - 80usize] ; ["Offset of field: aws_credentials_provider_sts_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , proxy_ev_settings) - 88usize] ; ["Offset of field: aws_credentials_provider_sts_options::profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , profile_collection_cached) - 96usize] ; ["Offset of field: aws_credentials_provider_sts_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , profile_name_override) - 104usize] ; ["Offset of field: aws_credentials_provider_sts_options::config_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , config_file_name_override) - 120usize] ; ["Offset of field: aws_credentials_provider_sts_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , shutdown_options) - 136usize] ; ["Offset of field: aws_credentials_provider_sts_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , function_table) - 152usize] ; ["Offset of field: aws_credentials_provider_sts_options::system_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , system_clock_fn) - 160usize] ; } ; impl Default for aws_credentials_provider_sts_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 () } } } # [doc = " Configuration options for the process credentials provider\n\n The process credentials provider sources credentials from running a command or process.\n The command to run is sourced from a profile in the AWS config file, using the standard\n profile selection rules. The profile key the command is read from is \"credential_process.\"\n E.g.:\n  [default]\n  credential_process=/opt/amazon/bin/my-credential-fetcher --argsA=abc\n On successfully running the command, the output should be a json data with the following\n format:\n {\n\"Version\": 1,\n\"AccessKeyId\": \"accesskey\",\n\"SecretAccessKey\": \"secretAccessKey\"\n\"SessionToken\": \"....\",\n\"Expiration\": \"2019-05-29T00:21:43Z\"\n}\n Version here identifies the command output format version."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_process_options { pub shutdown_options : aws_credentials_provider_shutdown_options , # [doc = " In which profile name to look for credential_process,\n if not provided, we will try environment variable: AWS_PROFILE."] pub profile_to_use : aws_byte_cursor , # [doc = " (Optional)\n Use a cached config profile collection. You can also pass a merged collection."] pub config_profile_collection_cached : * mut aws_profile_collection , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_process_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_process_options > () - 40usize] ; ["Alignment of aws_credentials_provider_process_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_process_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_process_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_process_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_process_options::profile_to_use"] [:: std :: mem :: offset_of ! (aws_credentials_provider_process_options , profile_to_use) - 16usize] ; ["Offset of field: aws_credentials_provider_process_options::config_profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_process_options , config_profile_collection_cached) - 32usize] ; } ; impl Default for aws_credentials_provider_process_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 () } } } # [doc = " Configuration options for the default credentials provider chain."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_chain_default_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , # [doc = " (Optional)\n Use a cached merged profile collection. A merge collection has both config file\n (~/.aws/config) and credentials file based profile collection (~/.aws/credentials) using\n `aws_profile_collection_new_from_merge`."] pub profile_collection_cached : * mut aws_profile_collection , pub profile_name_override : aws_byte_cursor , pub skip_environment_credentials_provider : bool , pub proxy_ev_settings : * const proxy_env_var_settings , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_chain_default_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_chain_default_options > () - 72usize] ; ["Alignment of aws_credentials_provider_chain_default_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_chain_default_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , tls_ctx) - 24usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , profile_collection_cached) - 32usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , profile_name_override) - 40usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::skip_environment_credentials_provider"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , skip_environment_credentials_provider) - 56usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , proxy_ev_settings) - 64usize] ; } ; impl Default for aws_credentials_provider_chain_default_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_credentials_provider_delegate_get_credentials_fn = :: std :: option :: Option < unsafe extern "C" fn (delegate_user_data : * mut :: libc :: c_void , callback : aws_on_get_credentials_callback_fn , callback_user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Configuration options for the delegate credentials provider."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_delegate_options { pub shutdown_options : aws_credentials_provider_shutdown_options , # [doc = " Delegated get_credentials() callback."] pub get_credentials : aws_credentials_provider_delegate_get_credentials_fn , # [doc = " User data for delegated callbacks."] pub delegate_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_delegate_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_delegate_options > () - 32usize] ; ["Alignment of aws_credentials_provider_delegate_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_delegate_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_delegate_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_delegate_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_delegate_options::get_credentials"] [:: std :: mem :: offset_of ! (aws_credentials_provider_delegate_options , get_credentials) - 16usize] ; ["Offset of field: aws_credentials_provider_delegate_options::delegate_user_data"] [:: std :: mem :: offset_of ! (aws_credentials_provider_delegate_options , delegate_user_data) - 24usize] ; } ; impl Default for aws_credentials_provider_delegate_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 () } } } # [doc = " A (string) pair defining an identity provider and a valid login token sourced from it."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_cognito_identity_provider_token_pair { # [doc = " Name of an identity provider"] pub identity_provider_name : aws_byte_cursor , # [doc = " Valid login token source from the identity provider"] pub identity_provider_token : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_cognito_identity_provider_token_pair"] [:: std :: mem :: size_of :: < aws_cognito_identity_provider_token_pair > () - 32usize] ; ["Alignment of aws_cognito_identity_provider_token_pair"] [:: std :: mem :: align_of :: < aws_cognito_identity_provider_token_pair > () - 8usize] ; ["Offset of field: aws_cognito_identity_provider_token_pair::identity_provider_name"] [:: std :: mem :: offset_of ! (aws_cognito_identity_provider_token_pair , identity_provider_name) - 0usize] ; ["Offset of field: aws_cognito_identity_provider_token_pair::identity_provider_token"] [:: std :: mem :: offset_of ! (aws_cognito_identity_provider_token_pair , identity_provider_token) - 16usize] ; } ; impl Default for aws_cognito_identity_provider_token_pair { 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_credentials_provider_cognito_get_token_pairs_completion_fn = :: std :: option :: Option < unsafe extern "C" fn (logins : * mut aws_cognito_identity_provider_token_pair , login_count : usize , error_code : :: libc :: c_int , completion_user_data : * mut :: libc :: c_void) > ; pub type aws_credentials_provider_cognito_get_token_pairs_async_fn = :: std :: option :: Option < unsafe extern "C" fn (get_token_pairs_user_data : * mut :: libc :: c_void , completion_callback : aws_credentials_provider_cognito_get_token_pairs_completion_fn , completion_user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Configuration options needed to create a Cognito-based Credentials Provider"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_cognito_options { pub shutdown_options : aws_credentials_provider_shutdown_options , # [doc = " Cognito service regional endpoint to source credentials from."] pub endpoint : aws_byte_cursor , # [doc = " Cognito identity to fetch credentials relative to."] pub identity : aws_byte_cursor , # [doc = " Optional set of identity provider token pairs to allow for authenticated identity access."] pub logins : * mut aws_cognito_identity_provider_token_pair , pub login_count : usize , # [doc = " Optional ARN of the role to be assumed when multiple roles were received in the token from the identity provider."] pub custom_role_arn : * mut aws_byte_cursor , # [doc = " Connection bootstrap to use for network connections made while sourcing credentials"] pub bootstrap : * mut aws_client_bootstrap , # [doc = " Client TLS context to use when querying cognito credentials.\n Required."] pub tls_ctx : * mut aws_tls_ctx , # [doc = " (Optional) Http proxy configuration for the http request that fetches credentials"] pub http_proxy_options : * const aws_http_proxy_options , # [doc = " (Optional) Settings propagated down to http connection manager to choose proxy options from environment. Read\n aws_http_credentials_provider.h for more information."] pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , # [doc = " Optional async function to allow for dynamic augmentation of the token pair set on a per-request basis."] pub get_token_pairs : aws_credentials_provider_cognito_get_token_pairs_async_fn , # [doc = " User data that should be passed in to the get_token_pairs function as the first parameter.  In practice, this\n will be a reference to a CRT binding object."] pub get_token_pairs_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_cognito_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_cognito_options > () - 128usize] ; ["Alignment of aws_credentials_provider_cognito_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_cognito_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_cognito_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_cognito_options::endpoint"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , endpoint) - 16usize] ; ["Offset of field: aws_credentials_provider_cognito_options::identity"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , identity) - 32usize] ; ["Offset of field: aws_credentials_provider_cognito_options::logins"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , logins) - 48usize] ; ["Offset of field: aws_credentials_provider_cognito_options::login_count"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , login_count) - 56usize] ; ["Offset of field: aws_credentials_provider_cognito_options::custom_role_arn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , custom_role_arn) - 64usize] ; ["Offset of field: aws_credentials_provider_cognito_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , bootstrap) - 72usize] ; ["Offset of field: aws_credentials_provider_cognito_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , tls_ctx) - 80usize] ; ["Offset of field: aws_credentials_provider_cognito_options::http_proxy_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , http_proxy_options) - 88usize] ; ["Offset of field: aws_credentials_provider_cognito_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , proxy_ev_settings) - 96usize] ; ["Offset of field: aws_credentials_provider_cognito_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , function_table) - 104usize] ; ["Offset of field: aws_credentials_provider_cognito_options::get_token_pairs"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , get_token_pairs) - 112usize] ; ["Offset of field: aws_credentials_provider_cognito_options::get_token_pairs_user_data"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , get_token_pairs_user_data) - 120usize] ; } ; impl Default for aws_credentials_provider_cognito_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)] pub struct aws_credentials_provider_login_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub login_session : aws_byte_cursor , pub login_region : aws_byte_cursor , pub login_cache_directory_override : aws_byte_cursor , pub profile_name_override : aws_byte_cursor , pub config_file_name_override : aws_byte_cursor , pub config_file_cached : * mut aws_profile_collection , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , pub system_clock_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_login_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_login_options > () - 144usize] ; ["Alignment of aws_credentials_provider_login_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_login_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_login_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_login_options::login_session"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , login_session) - 16usize] ; ["Offset of field: aws_credentials_provider_login_options::login_region"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , login_region) - 32usize] ; ["Offset of field: aws_credentials_provider_login_options::login_cache_directory_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , login_cache_directory_override) - 48usize] ; ["Offset of field: aws_credentials_provider_login_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , profile_name_override) - 64usize] ; ["Offset of field: aws_credentials_provider_login_options::config_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , config_file_name_override) - 80usize] ; ["Offset of field: aws_credentials_provider_login_options::config_file_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , config_file_cached) - 96usize] ; ["Offset of field: aws_credentials_provider_login_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , bootstrap) - 104usize] ; ["Offset of field: aws_credentials_provider_login_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , tls_ctx) - 112usize] ; ["Offset of field: aws_credentials_provider_login_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , proxy_ev_settings) - 120usize] ; ["Offset of field: aws_credentials_provider_login_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , function_table) - 128usize] ; ["Offset of field: aws_credentials_provider_login_options::system_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , system_clock_fn) - 136usize] ; } ; impl Default for aws_credentials_provider_login_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 () } } } # [doc = " Configuration options for `aws_credentials_new_with_options`"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_options { pub access_key_id_cursor : aws_byte_cursor , pub secret_access_key_cursor : aws_byte_cursor , pub session_token_cursor : aws_byte_cursor , pub account_id_cursor : aws_byte_cursor , pub expiration_timepoint_seconds : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_options"] [:: std :: mem :: size_of :: < aws_credentials_options > () - 72usize] ; ["Alignment of aws_credentials_options"] [:: std :: mem :: align_of :: < aws_credentials_options > () - 8usize] ; ["Offset of field: aws_credentials_options::access_key_id_cursor"] [:: std :: mem :: offset_of ! (aws_credentials_options , access_key_id_cursor) - 0usize] ; ["Offset of field: aws_credentials_options::secret_access_key_cursor"] [:: std :: mem :: offset_of ! (aws_credentials_options , secret_access_key_cursor) - 16usize] ; ["Offset of field: aws_credentials_options::session_token_cursor"] [:: std :: mem :: offset_of ! (aws_credentials_options , session_token_cursor) - 32usize] ; ["Offset of field: aws_credentials_options::account_id_cursor"] [:: std :: mem :: offset_of ! (aws_credentials_options , account_id_cursor) - 48usize] ; ["Offset of field: aws_credentials_options::expiration_timepoint_seconds"] [:: std :: mem :: offset_of ! (aws_credentials_options , expiration_timepoint_seconds) - 64usize] ; } ; impl Default for aws_credentials_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 () } } } unsafe extern "C" { # [doc = " Creates a new set of aws credentials\n\n @param allocator memory allocator to use\n @param access_key_id_cursor value for the aws access key id field\n @param secret_access_key_cursor value for the secret access key field\n @param session_token_cursor (optional) security token associated with the credentials\n @param expiration_timepoint_seconds timepoint, in seconds since epoch, that the credentials will no longer\n be valid past.  For credentials that do not expire, use UINT64_MAX\n\n @return a valid credentials object, or NULL"] pub fn aws_credentials_new (allocator : * mut aws_allocator , access_key_id_cursor : aws_byte_cursor , secret_access_key_cursor : aws_byte_cursor , session_token_cursor : aws_byte_cursor , expiration_timepoint_seconds : u64) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Creates a new set of aws credentials with account_id\n\n @param allocator memory allocator to use\n @param access_key_id_cursor value for the aws access key id field\n @param secret_access_key_cursor value for the secret access key field\n @param session_token_cursor (optional) security token associated with the credentials\n @param account_id (optional) value for the account_id field\n @param expiration_timepoint_seconds timepoint, in seconds since epoch, that the credentials will no longer\n be valid past.  For credentials that do not expire, use UINT64_MAX\n\n @return a valid credentials object, or NULL"] pub fn aws_credentials_new_with_options (allocator : * mut aws_allocator , options : * const aws_credentials_options) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Creates a new set of aws anonymous credentials.\n Use Anonymous credentials, when you want to skip the signing process.\n\n @param allocator memory allocator to use\n\n @return a valid credentials object, or NULL"] pub fn aws_credentials_new_anonymous (allocator : * mut aws_allocator) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Creates a new set of AWS credentials\n\n @param allocator memory allocator to use\n @param access_key_id  value for the aws access key id field\n @param secret_access_key value for the secret access key field\n @param session_token (optional) security token associated with the credentials\n @param expiration_timepoint_seconds timepoint, in seconds since epoch, that the credentials will no longer\n be valid past.  For credentials that do not expire, use UINT64_MAX\n\n @return a valid credentials object, or NULL"] pub fn aws_credentials_new_from_string (allocator : * mut aws_allocator , access_key_id : * const aws_string , secret_access_key : * const aws_string , session_token : * const aws_string , expiration_timepoint_seconds : u64) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Creates a set of AWS credentials that includes an ECC key pair.  These credentials do not have a value for\n the secret access key; the ecc key takes over that field's role in sigv4a signing.\n\n @param allocator memory allocator to use for all memory allocations\n @param access_key_id access key id for the credential set\n @param ecc_key ecc key to use during signing when using these credentials\n @param session_token (optional) session token associated with the credentials\n @param expiration_timepoint_in_seconds (optional) if session-based, time at which these credentials expire\n @return a new pair of AWS credentials, or NULL"] pub fn aws_credentials_new_ecc (allocator : * mut aws_allocator , access_key_id : aws_byte_cursor , ecc_key : * mut aws_ecc_key_pair , session_token : aws_byte_cursor , expiration_timepoint_in_seconds : u64) -> * mut aws_credentials ; } unsafe extern "C" { pub fn aws_credentials_new_ecc_from_aws_credentials (allocator : * mut aws_allocator , credentials : * const aws_credentials) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Add a reference to some credentials\n\n @param credentials credentials to increment the ref count on"] pub fn aws_credentials_acquire (credentials : * const aws_credentials) ; } unsafe extern "C" { # [doc = " Remove a reference to some credentials\n\n @param credentials credentials to decrement the ref count on"] pub fn aws_credentials_release (credentials : * const aws_credentials) ; } unsafe extern "C" { # [doc = " Get the AWS access key id from a set of credentials\n\n @param credentials credentials to get the access key id from\n @return a byte cursor to the access key id"] pub fn aws_credentials_get_access_key_id (credentials : * const aws_credentials) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the AWS secret access key from a set of credentials\n\n @param credentials credentials to get the secret access key from\n @return a byte cursor to the secret access key"] pub fn aws_credentials_get_secret_access_key (credentials : * const aws_credentials) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the AWS session token from a set of credentials\n\n @param credentials credentials to get the session token from\n @return a byte cursor to the session token or an empty byte cursor if there is no session token"] pub fn aws_credentials_get_session_token (credentials : * const aws_credentials) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the AWS account id from a set of credentials\n\n @param credentials to get the account id from\n @return a byte cursor to the account id or an empty byte cursor if there is no account id"] pub fn aws_credentials_get_account_id (credentials : * const aws_credentials) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the expiration timepoint (in seconds since epoch) associated with a set of credentials\n\n @param credentials credentials to get the expiration timepoint for\n @return the time, in seconds since epoch, the credentials will expire; UINT64_MAX for credentials\n without a specific expiration time"] pub fn aws_credentials_get_expiration_timepoint_seconds (credentials : * const aws_credentials) -> u64 ; } unsafe extern "C" { # [doc = " Get the elliptic curve key associated with this set of credentials\n @param credentials credentials to get the the elliptic curve key for\n @return the elliptic curve key associated with the credentials, or NULL if no key is associated with\n these credentials"] pub fn aws_credentials_get_ecc_key_pair (credentials : * const aws_credentials) -> * mut aws_ecc_key_pair ; } unsafe extern "C" { # [doc = " If credentials are anonymous, then the signing process is skipped.\n\n @param credentials credentials to check\n\n @return true if the credentials are anonymous; false otherwise."] pub fn aws_credentials_is_anonymous (credentials : * const aws_credentials) -> bool ; } unsafe extern "C" { # [doc = " Derives an ecc key pair (based on the nist P256 curve) from the access key id and secret access key components\n of a set of AWS credentials using an internal key derivation specification.  Used to perform sigv4a signing in\n the hybrid mode based on AWS credentials.\n\n @param allocator memory allocator to use for all memory allocations\n @param credentials AWS credentials to derive the ECC key from using the AWS sigv4a key derivation specification\n @return a new ecc key pair or NULL on failure"] pub fn aws_ecc_key_pair_new_ecdsa_p256_key_from_aws_credentials (allocator : * mut aws_allocator , credentials : * const aws_credentials) -> * mut aws_ecc_key_pair ; } unsafe extern "C" { # [doc = " Release a reference to a credentials provider\n\n @param provider provider to decrement the ref count on"] pub fn aws_credentials_provider_release (provider : * mut aws_credentials_provider) -> * mut aws_credentials_provider ; } unsafe extern "C" { pub fn aws_credentials_provider_acquire (provider : * mut aws_credentials_provider) -> * mut aws_credentials_provider ; } unsafe extern "C" { pub fn aws_credentials_provider_get_credentials (provider : * mut aws_credentials_provider , callback : aws_on_get_credentials_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Creates a simple provider that just returns a fixed set of credentials\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_static (allocator : * mut aws_allocator , options : * const aws_credentials_provider_static_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a simple anonymous credentials provider\n\n @param allocator memory allocator to use for all memory allocation\n @param shutdown_options an optional shutdown callback that gets\n invoked when the resources used by the provider are no longer in use.\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_anonymous (allocator : * mut aws_allocator , shutdown_options : * const aws_credentials_provider_shutdown_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that returns credentials sourced from the environment variables:\n\n AWS_ACCESS_KEY_ID\n AWS_SECRET_ACCESS_KEY\n AWS_SESSION_TOKEN\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_environment (allocator : * mut aws_allocator , options : * const aws_credentials_provider_environment_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that functions as a caching decorating of another provider.\n\n For example, the default chain is implemented as:\n\n CachedProvider -> ProviderChain(EnvironmentProvider -> ProfileProvider -> ECS/EC2IMD etc...)\n\n A reference is taken on the target provider\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_cached (allocator : * mut aws_allocator , options : * const aws_credentials_provider_cached_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from key-value profiles loaded from the aws credentials\n file (\"~/.aws/credentials\" by default) and the aws config file (\"~/.aws/config\" by\n default)\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_profile (allocator : * mut aws_allocator , options : * const aws_credentials_provider_profile_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that assumes an IAM role via. STS AssumeRole() API. This provider will fetch new credentials\n upon each call to aws_credentials_provider_get_credentials().\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_sts (allocator : * mut aws_allocator , options : * const aws_credentials_provider_sts_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from an ordered sequence of providers, with the overall result\n being from the first provider to return a valid set of credentials\n\n References are taken on all supplied providers\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_chain (allocator : * mut aws_allocator , options : * const aws_credentials_provider_chain_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from the ec2 instance metadata service\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_imds (allocator : * mut aws_allocator , options : * const aws_credentials_provider_imds_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from the ecs role credentials service and reads the required params from\n environment variables\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_ecs_from_environment (allocator : * mut aws_allocator , options : * const aws_credentials_provider_ecs_environment_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from the ecs role credentials service\n This function doesn't read anything from the environment and requires everything to be explicitly passed in.\n If you need to read properties from the environment, use the `aws_credentials_provider_new_ecs_from_environment`.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_ecs (allocator : * mut aws_allocator , options : * const aws_credentials_provider_ecs_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from IoT Core\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_x509 (allocator : * mut aws_allocator , options : * const aws_credentials_provider_x509_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from STS using AssumeRoleWithWebIdentity\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_sts_web_identity (allocator : * mut aws_allocator , options : * const aws_credentials_provider_sts_web_identity_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from SSO using a SSOToken.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_sso (allocator : * mut aws_allocator , options : * const aws_credentials_provider_sso_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { pub fn aws_credentials_provider_new_process (allocator : * mut aws_allocator , options : * const aws_credentials_provider_process_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Create a credentials provider depends on provided vtable to fetch the credentials.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_delegate (allocator : * mut aws_allocator , options : * const aws_credentials_provider_delegate_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from the Cognito-Identity service via an\n invocation of the GetCredentialsForIdentity API call.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_cognito (allocator : * mut aws_allocator , options : * const aws_credentials_provider_cognito_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a cognito-based provider that has a caching layer wrapped around it\n\n @param allocator memory allocator to use for all memory allocation\n @param options cognito-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_cognito_caching (allocator : * mut aws_allocator , options : * const aws_credentials_provider_cognito_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from AWS Login.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_login (allocator : * mut aws_allocator , options : * const aws_credentials_provider_login_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates the default provider chain used by most AWS SDKs.\n\n Generally:\n\n (1) Environment\n (2) Profile\n    - STSCredentialsProvider\n    - ProcessCredentialsProvider\n    - ProfileCredentialsProvider\n (3) STS web identity\n (4) (conditional, off by default) ECS\n (5) (conditional, on by default) EC2 Instance Metadata\n\n Support for environmental control of the default provider chain is not yet\n implemented.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_chain_default (allocator : * mut aws_allocator , options : * const aws_credentials_provider_chain_default_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { pub static mut g_aws_credentials_provider_http_function_table : * const aws_auth_http_system_vtable ; } pub const AWS_DATE_TIME_STR_MAX_LEN : _bindgen_ty_21 = _bindgen_ty_21 :: AWS_DATE_TIME_STR_MAX_LEN ; pub const AWS_DATE_TIME_STR_MAX_BASIC_LEN : _bindgen_ty_21 = _bindgen_ty_21 :: AWS_DATE_TIME_STR_MAX_BASIC_LEN ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_21 { AWS_DATE_TIME_STR_MAX_LEN = 100 , AWS_DATE_TIME_STR_MAX_BASIC_LEN = 20 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_date_format { AWS_DATE_FORMAT_RFC822 = 0 , AWS_DATE_FORMAT_ISO_8601 = 1 , AWS_DATE_FORMAT_ISO_8601_BASIC = 2 , AWS_DATE_FORMAT_AUTO_DETECT = 3 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_date_month { AWS_DATE_MONTH_JANUARY = 0 , AWS_DATE_MONTH_FEBRUARY = 1 , AWS_DATE_MONTH_MARCH = 2 , AWS_DATE_MONTH_APRIL = 3 , AWS_DATE_MONTH_MAY = 4 , AWS_DATE_MONTH_JUNE = 5 , AWS_DATE_MONTH_JULY = 6 , AWS_DATE_MONTH_AUGUST = 7 , AWS_DATE_MONTH_SEPTEMBER = 8 , AWS_DATE_MONTH_OCTOBER = 9 , AWS_DATE_MONTH_NOVEMBER = 10 , AWS_DATE_MONTH_DECEMBER = 11 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_date_day_of_week { AWS_DATE_DAY_OF_WEEK_SUNDAY = 0 , AWS_DATE_DAY_OF_WEEK_MONDAY = 1 , AWS_DATE_DAY_OF_WEEK_TUESDAY = 2 , AWS_DATE_DAY_OF_WEEK_WEDNESDAY = 3 , AWS_DATE_DAY_OF_WEEK_THURSDAY = 4 , AWS_DATE_DAY_OF_WEEK_FRIDAY = 5 , AWS_DATE_DAY_OF_WEEK_SATURDAY = 6 , } # [repr (C)] pub struct aws_date_time { pub timestamp : time_t , pub milliseconds : u16 , pub tz : [:: libc :: c_char ; 6usize] , pub gmt_time : tm , pub local_time : tm , pub utc_assumed : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_date_time"] [:: std :: mem :: size_of :: < aws_date_time > () - 136usize] ; ["Alignment of aws_date_time"] [:: std :: mem :: align_of :: < aws_date_time > () - 8usize] ; ["Offset of field: aws_date_time::timestamp"] [:: std :: mem :: offset_of ! (aws_date_time , timestamp) - 0usize] ; ["Offset of field: aws_date_time::milliseconds"] [:: std :: mem :: offset_of ! (aws_date_time , milliseconds) - 8usize] ; ["Offset of field: aws_date_time::tz"] [:: std :: mem :: offset_of ! (aws_date_time , tz) - 10usize] ; ["Offset of field: aws_date_time::gmt_time"] [:: std :: mem :: offset_of ! (aws_date_time , gmt_time) - 16usize] ; ["Offset of field: aws_date_time::local_time"] [:: std :: mem :: offset_of ! (aws_date_time , local_time) - 72usize] ; ["Offset of field: aws_date_time::utc_assumed"] [:: std :: mem :: offset_of ! (aws_date_time , utc_assumed) - 128usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Initializes dt to be the current system time."] pub fn aws_date_time_init_now (dt : * mut aws_date_time) ; } unsafe 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) ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Initializes dt to be the time represented by date_str in format 'fmt'. Returns AWS_OP_SUCCESS if the\n string was successfully parsed, returns  AWS_OP_ERR if parsing failed.\n\n The parser is lenient regarding AWS_DATE_FORMAT_ISO_8601 vs AWS_DATE_FORMAT_ISO_8601_BASIC.\n Regardless of which you pass in, both \"2002-10-02T08:05:09Z\" and \"20021002T080509Z\" would be accepted.\n\n Notes for AWS_DATE_FORMAT_RFC822:\n If no time zone information is provided, it is assumed to be local time (please don't do this).\n\n Only time zones indicating Universal Time (e.g. Z, UT, UTC, or GMT),\n or offsets from UTC (e.g. +0100, -0700), are accepted.\n\n 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) -> :: libc :: c_int ; } unsafe 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) -> :: libc :: c_int ; } unsafe 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\n return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not\n 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) -> :: libc :: c_int ; } unsafe 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\n return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not\n 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) -> :: libc :: c_int ; } unsafe 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\n will return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not\n 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) -> :: libc :: c_int ; } unsafe 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\n return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not\n 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) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_date_time_as_epoch_secs (dt : * const aws_date_time) -> f64 ; } unsafe extern "C" { pub fn aws_date_time_as_nanos (dt : * const aws_date_time) -> u64 ; } unsafe extern "C" { pub fn aws_date_time_as_millis (dt : * const aws_date_time) -> u64 ; } unsafe extern "C" { pub fn aws_date_time_year (dt : * const aws_date_time , local_time : bool) -> u16 ; } unsafe extern "C" { pub fn aws_date_time_month (dt : * const aws_date_time , local_time : bool) -> aws_date_month ; } unsafe extern "C" { pub fn aws_date_time_month_day (dt : * const aws_date_time , local_time : bool) -> u8 ; } unsafe extern "C" { pub fn aws_date_time_day_of_week (dt : * const aws_date_time , local_time : bool) -> aws_date_day_of_week ; } unsafe extern "C" { pub fn aws_date_time_hour (dt : * const aws_date_time , local_time : bool) -> u8 ; } unsafe extern "C" { pub fn aws_date_time_minute (dt : * const aws_date_time , local_time : bool) -> u8 ; } unsafe extern "C" { pub fn aws_date_time_second (dt : * const aws_date_time , local_time : bool) -> u8 ; } unsafe extern "C" { pub fn aws_date_time_dst (dt : * const aws_date_time , local_time : bool) -> bool ; } unsafe 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 ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_connection_manager { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_socket_options { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_tls_connection_options { _unused : [u8 ; 0] , } pub type aws_http_connection_manager_on_connection_setup_fn = :: std :: option :: Option < unsafe extern "C" fn (connection : * mut aws_http_connection , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_http_connection_manager_shutdown_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " Metrics for logging and debugging purpose."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_manager_metrics { # [doc = " The number of additional concurrent requests that can be supported by the HTTP manager without needing to\n establish additional connections to the target server.\n\n For connection manager, it equals to connections that's idle.\n For stream manager, it equals to the number of streams that are possible to be made without creating new\n connection, although the implementation can create new connection without fully filling it."] pub available_concurrency : usize , pub pending_concurrency_acquires : usize , pub leased_concurrency : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_manager_metrics"] [:: std :: mem :: size_of :: < aws_http_manager_metrics > () - 24usize] ; ["Alignment of aws_http_manager_metrics"] [:: std :: mem :: align_of :: < aws_http_manager_metrics > () - 8usize] ; ["Offset of field: aws_http_manager_metrics::available_concurrency"] [:: std :: mem :: offset_of ! (aws_http_manager_metrics , available_concurrency) - 0usize] ; ["Offset of field: aws_http_manager_metrics::pending_concurrency_acquires"] [:: std :: mem :: offset_of ! (aws_http_manager_metrics , pending_concurrency_acquires) - 8usize] ; ["Offset of field: aws_http_manager_metrics::leased_concurrency"] [:: std :: mem :: offset_of ! (aws_http_manager_metrics , leased_concurrency) - 16usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_connection_manager_options { pub bootstrap : * mut aws_client_bootstrap , pub initial_window_size : usize , pub socket_options : * const aws_socket_options , # [doc = " Optional (ignored if 0).\n After a request is fully sent, if the server does not begin responding within N milliseconds,\n then fail with AWS_ERROR_HTTP_RESPONSE_FIRST_BYTE_TIMEOUT.\n This can be overridden per-request by aws_http_make_request_options.response_first_byte_timeout_ms.\n TODO: Only supported in HTTP/1.1 now, support it in HTTP/2"] pub response_first_byte_timeout_ms : u64 , # [doc = " Options to create secure (HTTPS) connections.\n For secure connections, set \"h2\" in the ALPN string for HTTP/2, otherwise HTTP/1.1 is used.\n\n Leave NULL to create cleartext (HTTP) connections.\n For cleartext connections, use `http2_prior_knowledge` (RFC-7540 3.4)\n to control whether that are treated as HTTP/1.1 or HTTP/2."] pub tls_connection_options : * const aws_tls_connection_options , # [doc = " Specify whether you have prior knowledge that cleartext (HTTP) connections are HTTP/2 (RFC-7540 3.4).\n If false, then cleartext connections are treated as HTTP/1.1.\n It is illegal to set this true when secure connections are being used.\n Note that upgrading from HTTP/1.1 to HTTP/2 is not supported (RFC-7540 3.2)."] pub http2_prior_knowledge : bool , pub monitoring_options : * const aws_http_connection_monitoring_options , pub host : aws_byte_cursor , pub port : u32 , # [doc = " Optional.\n HTTP/2 specific configuration. Check `struct aws_http2_connection_options` for details of each config"] pub initial_settings_array : * const aws_http2_setting , pub num_initial_settings : usize , pub max_closed_streams : usize , pub http2_conn_manual_window_management : bool , pub proxy_options : * const aws_http_proxy_options , pub proxy_ev_settings : * const proxy_env_var_settings , pub max_connections : usize , pub shutdown_complete_user_data : * mut :: libc :: c_void , pub shutdown_complete_callback : aws_http_connection_manager_shutdown_complete_fn , # [doc = " If set to true, the read back pressure mechanism will be enabled."] pub enable_read_back_pressure : bool , # [doc = " If set to a non-zero value, then connections that stay in the pool longer than the specified\n timeout will be closed automatically."] pub max_connection_idle_in_milliseconds : u64 , # [doc = " If set to a non-zero value, aws_http_connection_manager_acquire_connection() calls\n will give up after waiting this long for a connection from the pool,\n failing with error AWS_ERROR_HTTP_CONNECTION_MANAGER_ACQUISITION_TIMEOUT."] pub connection_acquisition_timeout_ms : u64 , pub max_pending_connection_acquisitions : u64 , # [doc = " THIS IS AN EXPERIMENTAL AND UNSTABLE API\n (Optional)\n An array of network interface names. The manager will distribute the\n connections across network interface names provided in this array. If any interface name is invalid, goes down,\n or has any issues like network access, you will see connection failures. If\n `socket_options.network_interface_name` is also set, an `AWS_ERROR_INVALID_ARGUMENT` error will be raised.\n\n This option is only supported on Linux, MacOS, and platforms that have either SO_BINDTODEVICE or IP_BOUND_IF. It\n is not supported on Windows. `AWS_ERROR_PLATFORM_NOT_SUPPORTED` will be raised on unsupported platforms."] pub network_interface_names_array : * const aws_byte_cursor , pub num_network_interface_names : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_connection_manager_options"] [:: std :: mem :: size_of :: < aws_http_connection_manager_options > () - 200usize] ; ["Alignment of aws_http_connection_manager_options"] [:: std :: mem :: align_of :: < aws_http_connection_manager_options > () - 8usize] ; ["Offset of field: aws_http_connection_manager_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , bootstrap) - 0usize] ; ["Offset of field: aws_http_connection_manager_options::initial_window_size"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , initial_window_size) - 8usize] ; ["Offset of field: aws_http_connection_manager_options::socket_options"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , socket_options) - 16usize] ; ["Offset of field: aws_http_connection_manager_options::response_first_byte_timeout_ms"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , response_first_byte_timeout_ms) - 24usize] ; ["Offset of field: aws_http_connection_manager_options::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , tls_connection_options) - 32usize] ; ["Offset of field: aws_http_connection_manager_options::http2_prior_knowledge"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , http2_prior_knowledge) - 40usize] ; ["Offset of field: aws_http_connection_manager_options::monitoring_options"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , monitoring_options) - 48usize] ; ["Offset of field: aws_http_connection_manager_options::host"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , host) - 56usize] ; ["Offset of field: aws_http_connection_manager_options::port"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , port) - 72usize] ; ["Offset of field: aws_http_connection_manager_options::initial_settings_array"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , initial_settings_array) - 80usize] ; ["Offset of field: aws_http_connection_manager_options::num_initial_settings"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , num_initial_settings) - 88usize] ; ["Offset of field: aws_http_connection_manager_options::max_closed_streams"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , max_closed_streams) - 96usize] ; ["Offset of field: aws_http_connection_manager_options::http2_conn_manual_window_management"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , http2_conn_manual_window_management) - 104usize] ; ["Offset of field: aws_http_connection_manager_options::proxy_options"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , proxy_options) - 112usize] ; ["Offset of field: aws_http_connection_manager_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , proxy_ev_settings) - 120usize] ; ["Offset of field: aws_http_connection_manager_options::max_connections"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , max_connections) - 128usize] ; ["Offset of field: aws_http_connection_manager_options::shutdown_complete_user_data"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , shutdown_complete_user_data) - 136usize] ; ["Offset of field: aws_http_connection_manager_options::shutdown_complete_callback"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , shutdown_complete_callback) - 144usize] ; ["Offset of field: aws_http_connection_manager_options::enable_read_back_pressure"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , enable_read_back_pressure) - 152usize] ; ["Offset of field: aws_http_connection_manager_options::max_connection_idle_in_milliseconds"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , max_connection_idle_in_milliseconds) - 160usize] ; ["Offset of field: aws_http_connection_manager_options::connection_acquisition_timeout_ms"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , connection_acquisition_timeout_ms) - 168usize] ; ["Offset of field: aws_http_connection_manager_options::max_pending_connection_acquisitions"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , max_pending_connection_acquisitions) - 176usize] ; ["Offset of field: aws_http_connection_manager_options::network_interface_names_array"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , network_interface_names_array) - 184usize] ; ["Offset of field: aws_http_connection_manager_options::num_network_interface_names"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , num_network_interface_names) - 192usize] ; } ; impl Default for aws_http_connection_manager_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 () } } } unsafe extern "C" { pub fn aws_http_connection_manager_acquire (manager : * mut aws_http_connection_manager) ; } unsafe extern "C" { pub fn aws_http_connection_manager_release (manager : * mut aws_http_connection_manager) ; } unsafe extern "C" { pub fn aws_http_connection_manager_new (allocator : * mut aws_allocator , options : * const aws_http_connection_manager_options) -> * mut aws_http_connection_manager ; } unsafe extern "C" { pub fn aws_http_connection_manager_acquire_connection (manager : * mut aws_http_connection_manager , callback : aws_http_connection_manager_on_connection_setup_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_http_connection_manager_release_connection (manager : * mut aws_http_connection_manager , connection : * mut aws_http_connection) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Fetch the current manager metrics from connection manager."] pub fn aws_http_connection_manager_fetch_metrics (manager : * const aws_http_connection_manager , out_metrics : * mut aws_http_manager_metrics) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop_group { _unused : [u8 ; 0] , } # [doc = " Invoked upon the acquisition, or failure to acquire a retry token. This function will always be invoked if and only\n if aws_retry_strategy_acquire_retry_token() returns AWS_OP_SUCCESS. It will never be invoked synchronously from\n aws_retry_strategy_acquire_retry_token(). Token will always be NULL if error_code is non-zero, and vice-versa. If\n token is non-null, it will have a reference count of 1, and you must call aws_retry_token_release() on it later. See\n the comments for aws_retry_strategy_on_retry_ready_fn for more info."] pub type aws_retry_strategy_on_retry_token_acquired_fn = :: std :: option :: Option < unsafe extern "C" fn (retry_strategy : * mut aws_retry_strategy , error_code : :: libc :: c_int , token : * mut aws_retry_token , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked after a successful call to aws_retry_strategy_schedule_retry(). This function will always be invoked if and\n only if aws_retry_strategy_schedule_retry() returns AWS_OP_SUCCESS. It will never be invoked synchronously from\n aws_retry_strategy_schedule_retry(). After attempting the operation, either call aws_retry_strategy_schedule_retry()\n with an aws_retry_error_type or call aws_retry_token_record_success() and then release the token via.\n aws_retry_token_release()."] pub type aws_retry_strategy_on_retry_ready_fn = :: std :: option :: Option < unsafe extern "C" fn (token : * mut aws_retry_token , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Optional function to supply your own generate random implementation"] pub type aws_generate_random_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) -> u64 > ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_retry_error_type { # [doc = " This is a connection level error such as a socket timeout, socket connect error, tls negotiation timeout etc...\n Typically these should never be applied for non-idempotent request types since in this scenario, it's impossible\n to know whether the operation had a side effect on the server."] AWS_RETRY_ERROR_TYPE_TRANSIENT = 0 , # [doc = " This is an error where the server explicitly told the client to back off, such as a 429 or 503 Http error."] AWS_RETRY_ERROR_TYPE_THROTTLING = 1 , # [doc = " This is a server error that isn't explicitly throttling but is considered by the client\n to be something that should be retried."] AWS_RETRY_ERROR_TYPE_SERVER_ERROR = 2 , # [doc = " Doesn't count against any budgets. This could be something like a 401 challenge in Http."] AWS_RETRY_ERROR_TYPE_CLIENT_ERROR = 3 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_retry_strategy_vtable { pub destroy : :: std :: option :: Option < unsafe extern "C" fn (retry_strategy : * mut aws_retry_strategy) > , pub acquire_token : :: std :: option :: Option < unsafe extern "C" fn (retry_strategy : * mut aws_retry_strategy , partition_id : * const aws_byte_cursor , on_acquired : aws_retry_strategy_on_retry_token_acquired_fn , user_data : * mut :: libc :: c_void , timeout_ms : u64) -> :: libc :: c_int > , pub schedule_retry : :: std :: option :: Option < unsafe extern "C" fn (token : * mut aws_retry_token , error_type : aws_retry_error_type , retry_ready : aws_retry_strategy_on_retry_ready_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > , pub record_success : :: std :: option :: Option < unsafe extern "C" fn (token : * mut aws_retry_token) -> :: libc :: c_int > , pub release_token : :: std :: option :: Option < unsafe extern "C" fn (token : * mut aws_retry_token) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_retry_strategy_vtable"] [:: std :: mem :: size_of :: < aws_retry_strategy_vtable > () - 40usize] ; ["Alignment of aws_retry_strategy_vtable"] [:: std :: mem :: align_of :: < aws_retry_strategy_vtable > () - 8usize] ; ["Offset of field: aws_retry_strategy_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , destroy) - 0usize] ; ["Offset of field: aws_retry_strategy_vtable::acquire_token"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , acquire_token) - 8usize] ; ["Offset of field: aws_retry_strategy_vtable::schedule_retry"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , schedule_retry) - 16usize] ; ["Offset of field: aws_retry_strategy_vtable::record_success"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , record_success) - 24usize] ; ["Offset of field: aws_retry_strategy_vtable::release_token"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , release_token) - 32usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_retry_strategy { pub allocator : * mut aws_allocator , pub vtable : * mut aws_retry_strategy_vtable , pub ref_count : aws_atomic_var , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_retry_strategy"] [:: std :: mem :: size_of :: < aws_retry_strategy > () - 32usize] ; ["Alignment of aws_retry_strategy"] [:: std :: mem :: align_of :: < aws_retry_strategy > () - 8usize] ; ["Offset of field: aws_retry_strategy::allocator"] [:: std :: mem :: offset_of ! (aws_retry_strategy , allocator) - 0usize] ; ["Offset of field: aws_retry_strategy::vtable"] [:: std :: mem :: offset_of ! (aws_retry_strategy , vtable) - 8usize] ; ["Offset of field: aws_retry_strategy::ref_count"] [:: std :: mem :: offset_of ! (aws_retry_strategy , ref_count) - 16usize] ; ["Offset of field: aws_retry_strategy::impl_"] [:: std :: mem :: offset_of ! (aws_retry_strategy , impl_) - 24usize] ; } ; impl Default for aws_retry_strategy { 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)] pub struct aws_retry_token { pub allocator : * mut aws_allocator , pub retry_strategy : * mut aws_retry_strategy , pub ref_count : aws_atomic_var , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_retry_token"] [:: std :: mem :: size_of :: < aws_retry_token > () - 32usize] ; ["Alignment of aws_retry_token"] [:: std :: mem :: align_of :: < aws_retry_token > () - 8usize] ; ["Offset of field: aws_retry_token::allocator"] [:: std :: mem :: offset_of ! (aws_retry_token , allocator) - 0usize] ; ["Offset of field: aws_retry_token::retry_strategy"] [:: std :: mem :: offset_of ! (aws_retry_token , retry_strategy) - 8usize] ; ["Offset of field: aws_retry_token::ref_count"] [:: std :: mem :: offset_of ! (aws_retry_token , ref_count) - 16usize] ; ["Offset of field: aws_retry_token::impl_"] [:: std :: mem :: offset_of ! (aws_retry_token , impl_) - 24usize] ; } ; impl Default for aws_retry_token { 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 (u32)] # [non_exhaustive] # [doc = " Jitter mode for exponential backoff.\n\n For a great writeup on these options see:\n https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_exponential_backoff_jitter_mode { AWS_EXPONENTIAL_BACKOFF_JITTER_DEFAULT = 0 , AWS_EXPONENTIAL_BACKOFF_JITTER_NONE = 1 , AWS_EXPONENTIAL_BACKOFF_JITTER_FULL = 2 , AWS_EXPONENTIAL_BACKOFF_JITTER_DECORRELATED = 3 , } # [doc = " Options for exponential backoff retry strategy. el_group must be set, any other option, if set to 0 will signify\n \"use defaults\""] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_exponential_backoff_retry_options { pub el_group : * mut aws_event_loop_group , pub max_retries : usize , pub backoff_scale_factor_ms : u32 , pub max_backoff_secs : u32 , # [doc = " Jitter mode to use, see comments for aws_exponential_backoff_jitter_mode.\n Default is AWS_EXPONENTIAL_BACKOFF_JITTER_DEFAULT"] pub jitter_mode : aws_exponential_backoff_jitter_mode , # [doc = " Deprecated. Use generate_random_impl instead\n By default this will be set to use aws_device_random. If you want something else, set it here."] pub generate_random : :: std :: option :: Option < unsafe extern "C" fn () -> u64 > , pub generate_random_impl : aws_generate_random_fn , # [doc = " Optional user data for the generate random generate_random_impl."] pub generate_random_user_data : * mut :: libc :: c_void , # [doc = " Optional shutdown callback that gets invoked, with appropriate user data,\n when the resources used by the retry_strategy are no longer in use."] pub shutdown_options : * const aws_shutdown_callback_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_exponential_backoff_retry_options"] [:: std :: mem :: size_of :: < aws_exponential_backoff_retry_options > () - 64usize] ; ["Alignment of aws_exponential_backoff_retry_options"] [:: std :: mem :: align_of :: < aws_exponential_backoff_retry_options > () - 8usize] ; ["Offset of field: aws_exponential_backoff_retry_options::el_group"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , el_group) - 0usize] ; ["Offset of field: aws_exponential_backoff_retry_options::max_retries"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , max_retries) - 8usize] ; ["Offset of field: aws_exponential_backoff_retry_options::backoff_scale_factor_ms"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , backoff_scale_factor_ms) - 16usize] ; ["Offset of field: aws_exponential_backoff_retry_options::max_backoff_secs"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , max_backoff_secs) - 20usize] ; ["Offset of field: aws_exponential_backoff_retry_options::jitter_mode"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , jitter_mode) - 24usize] ; ["Offset of field: aws_exponential_backoff_retry_options::generate_random"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , generate_random) - 32usize] ; ["Offset of field: aws_exponential_backoff_retry_options::generate_random_impl"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , generate_random_impl) - 40usize] ; ["Offset of field: aws_exponential_backoff_retry_options::generate_random_user_data"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , generate_random_user_data) - 48usize] ; ["Offset of field: aws_exponential_backoff_retry_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , shutdown_options) - 56usize] ; } ; impl Default for aws_exponential_backoff_retry_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)] pub struct aws_no_retry_options { # [doc = " Optional shutdown callback that gets invoked, with appropriate user data,\n when the resources used by the retry_strategy are no longer in use."] pub shutdown_options : * const aws_shutdown_callback_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_no_retry_options"] [:: std :: mem :: size_of :: < aws_no_retry_options > () - 8usize] ; ["Alignment of aws_no_retry_options"] [:: std :: mem :: align_of :: < aws_no_retry_options > () - 8usize] ; ["Offset of field: aws_no_retry_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_no_retry_options , shutdown_options) - 0usize] ; } ; impl Default for aws_no_retry_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)] pub struct aws_standard_retry_options { pub backoff_retry_options : aws_exponential_backoff_retry_options , # [doc = " capacity for partitions. Defaults to 500"] pub initial_bucket_capacity : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_standard_retry_options"] [:: std :: mem :: size_of :: < aws_standard_retry_options > () - 72usize] ; ["Alignment of aws_standard_retry_options"] [:: std :: mem :: align_of :: < aws_standard_retry_options > () - 8usize] ; ["Offset of field: aws_standard_retry_options::backoff_retry_options"] [:: std :: mem :: offset_of ! (aws_standard_retry_options , backoff_retry_options) - 0usize] ; ["Offset of field: aws_standard_retry_options::initial_bucket_capacity"] [:: std :: mem :: offset_of ! (aws_standard_retry_options , initial_bucket_capacity) - 64usize] ; } ; impl Default for aws_standard_retry_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 () } } } unsafe extern "C" { # [doc = " Acquire a reference count on retry_strategy."] pub fn aws_retry_strategy_acquire (retry_strategy : * mut aws_retry_strategy) ; } unsafe extern "C" { # [doc = " Releases a reference count on retry_strategy."] pub fn aws_retry_strategy_release (retry_strategy : * mut aws_retry_strategy) ; } unsafe extern "C" { # [doc = " Attempts to acquire a retry token for use with retries. On success, on_acquired will be invoked when a token is\n available, or an error will be returned if the timeout expires. partition_id identifies operations that should be\n grouped together. This allows for more sophisticated strategies such as AIMD and circuit breaker patterns. Pass NULL\n to use the global partition."] pub fn aws_retry_strategy_acquire_retry_token (retry_strategy : * mut aws_retry_strategy , partition_id : * const aws_byte_cursor , on_acquired : aws_retry_strategy_on_retry_token_acquired_fn , user_data : * mut :: libc :: c_void , timeout_ms : u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Schedules a retry based on the backoff and token based strategies. retry_ready is invoked when the retry is either\n ready for execution or if it has been canceled due to application shutdown.\n\n This function can return an error to reject the retry attempt if, for example, a circuit breaker has opened. If this\n occurs users should fail their calls back to their callers.\n\n error_type is used for book keeping. See the comments above for aws_retry_error_type."] pub fn aws_retry_strategy_schedule_retry (token : * mut aws_retry_token , error_type : aws_retry_error_type , retry_ready : aws_retry_strategy_on_retry_ready_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Records a successful retry. This is used for making future decisions to open up token buckets, AIMD breakers etc...\n some strategies such as exponential backoff will ignore this, but you should always call it after a successful\n operation or your system will never recover during an outage."] pub fn aws_retry_token_record_success (token : * mut aws_retry_token) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Increments reference count for token. This should be called any time you seat the token to a pointer you own."] pub fn aws_retry_token_acquire (token : * mut aws_retry_token) ; } unsafe extern "C" { # [doc = " Releases the reference count for token. This should always be invoked after either calling\n aws_retry_strategy_schedule_retry() and failing, or after calling aws_retry_token_record_success()."] pub fn aws_retry_token_release (token : * mut aws_retry_token) ; } unsafe extern "C" { # [doc = " Creates a retry strategy using exponential backoff. This strategy does not perform any bookkeeping on error types and\n success. There is no circuit breaker functionality in here. See the comments above for\n aws_exponential_backoff_retry_options."] pub fn aws_retry_strategy_new_exponential_backoff (allocator : * mut aws_allocator , config : * const aws_exponential_backoff_retry_options) -> * mut aws_retry_strategy ; } unsafe extern "C" { # [doc = " This is a retry implementation that cuts off traffic if it's\n detected that an endpoint partition is having availability\n problems. This is necessary to keep from making outages worse\n by scheduling work that's unlikely to succeed yet increases\n load on an already ailing system.\n\n We do this by creating a bucket for each partition. A partition\n is an arbitrary specifier. It can be anything: a region, a service,\n a combination of region and service, a literal dns name.... doesn't matter.\n\n Each bucket has a budget for maximum allowed retries. Different types of events\n carry different weights. Things that indicate an unhealthy partition such as\n transient errors (timeouts, unhealthy connection etc...) cost more.\n A retry for any other reason (service sending a 5xx response code) cost a bit less.\n When a retry is attempted this capacity is leased out to the retry. On success it is\n released back to the capacity pool. On failure, it remains leased.\n Operations that succeed without a retry slowly restore the capacity pool.\n\n If a partition runs out of capacity it is assumed unhealthy and retries will be blocked\n until capacity returns to the pool. To prevent a partition from staying unhealthy after\n an outage has recovered, new requests that succeed without a retry will increase the capacity\n slowly ( a new request gets a payback lease of 1, but the lease is never actually deducted from the capacity pool)."] pub fn aws_retry_strategy_new_standard (allocator : * mut aws_allocator , config : * const aws_standard_retry_options) -> * mut aws_retry_strategy ; } unsafe extern "C" { # [doc = " This retry strategy is used to disable retries. Passed config can be null.\n Calling `aws_retry_strategy_acquire_retry_token` will raise error `AWS_IO_RETRY_PERMISSION_DENIED`.\n Calling any function apart from the `aws_retry_strategy_acquire_retry_token` and `aws_retry_strategy_release` will\n result in a fatal error."] pub fn aws_retry_strategy_new_no_retry (allocator : * mut aws_allocator , config : * const aws_no_retry_options) -> * mut aws_retry_strategy ; } pub type aws_imds_client_shutdown_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " Optional callback and user data to be invoked when an imds client has fully shut down"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_imds_client_shutdown_options { pub shutdown_callback : aws_imds_client_shutdown_completed_fn , pub shutdown_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_imds_client_shutdown_options"] [:: std :: mem :: size_of :: < aws_imds_client_shutdown_options > () - 16usize] ; ["Alignment of aws_imds_client_shutdown_options"] [:: std :: mem :: align_of :: < aws_imds_client_shutdown_options > () - 8usize] ; ["Offset of field: aws_imds_client_shutdown_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_imds_client_shutdown_options , shutdown_callback) - 0usize] ; ["Offset of field: aws_imds_client_shutdown_options::shutdown_user_data"] [:: std :: mem :: offset_of ! (aws_imds_client_shutdown_options , shutdown_user_data) - 8usize] ; } ; impl Default for aws_imds_client_shutdown_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 () } } } # [doc = " Configuration options when creating an imds client"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_imds_client_options { pub shutdown_options : aws_imds_client_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub retry_strategy : * mut aws_retry_strategy , pub proxy_ev_settings : * const proxy_env_var_settings , pub imds_version : aws_imds_protocol_version , pub ec2_metadata_v1_disabled : bool , pub function_table : * mut aws_auth_http_system_vtable , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_imds_client_options"] [:: std :: mem :: size_of :: < aws_imds_client_options > () - 56usize] ; ["Alignment of aws_imds_client_options"] [:: std :: mem :: align_of :: < aws_imds_client_options > () - 8usize] ; ["Offset of field: aws_imds_client_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_imds_client_options , shutdown_options) - 0usize] ; ["Offset of field: aws_imds_client_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_imds_client_options , bootstrap) - 16usize] ; ["Offset of field: aws_imds_client_options::retry_strategy"] [:: std :: mem :: offset_of ! (aws_imds_client_options , retry_strategy) - 24usize] ; ["Offset of field: aws_imds_client_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_imds_client_options , proxy_ev_settings) - 32usize] ; ["Offset of field: aws_imds_client_options::imds_version"] [:: std :: mem :: offset_of ! (aws_imds_client_options , imds_version) - 40usize] ; ["Offset of field: aws_imds_client_options::ec2_metadata_v1_disabled"] [:: std :: mem :: offset_of ! (aws_imds_client_options , ec2_metadata_v1_disabled) - 44usize] ; ["Offset of field: aws_imds_client_options::function_table"] [:: std :: mem :: offset_of ! (aws_imds_client_options , function_table) - 48usize] ; } ; impl Default for aws_imds_client_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_imds_client_on_get_resource_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (resource : * const aws_byte_buf , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-categories.html"] # [repr (C)] pub struct aws_imds_iam_profile { pub last_updated : aws_date_time , pub instance_profile_arn : aws_byte_cursor , pub instance_profile_id : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_imds_iam_profile"] [:: std :: mem :: size_of :: < aws_imds_iam_profile > () - 168usize] ; ["Alignment of aws_imds_iam_profile"] [:: std :: mem :: align_of :: < aws_imds_iam_profile > () - 8usize] ; ["Offset of field: aws_imds_iam_profile::last_updated"] [:: std :: mem :: offset_of ! (aws_imds_iam_profile , last_updated) - 0usize] ; ["Offset of field: aws_imds_iam_profile::instance_profile_arn"] [:: std :: mem :: offset_of ! (aws_imds_iam_profile , instance_profile_arn) - 136usize] ; ["Offset of field: aws_imds_iam_profile::instance_profile_id"] [:: std :: mem :: offset_of ! (aws_imds_iam_profile , instance_profile_id) - 152usize] ; } ; impl Default for aws_imds_iam_profile { 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 = " Block of per-instance EC2-specific data\n\n https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html"] # [repr (C)] pub struct aws_imds_instance_info { pub marketplace_product_codes : aws_array_list , pub availability_zone : aws_byte_cursor , pub private_ip : aws_byte_cursor , pub version : aws_byte_cursor , pub instance_id : aws_byte_cursor , pub billing_products : aws_array_list , pub instance_type : aws_byte_cursor , pub account_id : aws_byte_cursor , pub image_id : aws_byte_cursor , pub pending_time : aws_date_time , pub architecture : aws_byte_cursor , pub kernel_id : aws_byte_cursor , pub ramdisk_id : aws_byte_cursor , pub region : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_imds_instance_info"] [:: std :: mem :: size_of :: < aws_imds_instance_info > () - 392usize] ; ["Alignment of aws_imds_instance_info"] [:: std :: mem :: align_of :: < aws_imds_instance_info > () - 8usize] ; ["Offset of field: aws_imds_instance_info::marketplace_product_codes"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , marketplace_product_codes) - 0usize] ; ["Offset of field: aws_imds_instance_info::availability_zone"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , availability_zone) - 40usize] ; ["Offset of field: aws_imds_instance_info::private_ip"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , private_ip) - 56usize] ; ["Offset of field: aws_imds_instance_info::version"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , version) - 72usize] ; ["Offset of field: aws_imds_instance_info::instance_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , instance_id) - 88usize] ; ["Offset of field: aws_imds_instance_info::billing_products"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , billing_products) - 104usize] ; ["Offset of field: aws_imds_instance_info::instance_type"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , instance_type) - 144usize] ; ["Offset of field: aws_imds_instance_info::account_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , account_id) - 160usize] ; ["Offset of field: aws_imds_instance_info::image_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , image_id) - 176usize] ; ["Offset of field: aws_imds_instance_info::pending_time"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , pending_time) - 192usize] ; ["Offset of field: aws_imds_instance_info::architecture"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , architecture) - 328usize] ; ["Offset of field: aws_imds_instance_info::kernel_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , kernel_id) - 344usize] ; ["Offset of field: aws_imds_instance_info::ramdisk_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , ramdisk_id) - 360usize] ; ["Offset of field: aws_imds_instance_info::region"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , region) - 376usize] ; } ; impl Default for aws_imds_instance_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 () } } } pub type aws_imds_client_on_get_array_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (array : * const aws_array_list , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_imds_client_on_get_credentials_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (credentials : * const aws_credentials , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_imds_client_on_get_iam_profile_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (iam_profile_info : * const aws_imds_iam_profile , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_imds_client_on_get_instance_info_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (instance_info : * const aws_imds_instance_info , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " AWS EC2 Metadata Client is used to retrieve AWS EC2 Instance Metadata info."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_imds_client { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " Creates a new imds client\n\n @param allocator memory allocator to use for creation and queries\n @param options configuration options for the imds client\n\n @return a newly-constructed imds client, or NULL on failure"] pub fn aws_imds_client_new (allocator : * mut aws_allocator , options : * const aws_imds_client_options) -> * mut aws_imds_client ; } unsafe extern "C" { # [doc = " Increments the ref count on the client\n\n @param client imds client to acquire a reference to"] pub fn aws_imds_client_acquire (client : * mut aws_imds_client) ; } unsafe extern "C" { # [doc = " Decrements the ref count on the client\n\n @param client imds client to release a reference to"] pub fn aws_imds_client_release (client : * mut aws_imds_client) ; } unsafe extern "C" { # [doc = " Queries a generic resource (string) from the ec2 instance metadata document\n\n @param client imds client to use for the query\n @param resource_path path of the resource to query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_resource_async (client : * mut aws_imds_client , resource_path : aws_byte_cursor , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the ami id of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ami_id (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the ami launch index of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ami_launch_index (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the ami manifest path of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ami_manifest_path (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the list of ancestor ami ids of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ancestor_ami_ids (client : * mut aws_imds_client , callback : aws_imds_client_on_get_array_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the instance-action of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_action (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the instance id of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_id (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the instance type of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_type (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the mac address of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_mac_address (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the private ip address of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_private_ip_address (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the availability zone of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_availability_zone (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the product codes of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_product_codes (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the public key of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_public_key (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the ramdisk id of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ramdisk_id (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the reservation id of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_reservation_id (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the list of the security groups of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_security_groups (client : * mut aws_imds_client , callback : aws_imds_client_on_get_array_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the list of block device mappings of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_block_device_mapping (client : * mut aws_imds_client , callback : aws_imds_client_on_get_array_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the attached iam role of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_attached_iam_role (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets temporary credentials based on the attached iam role of the ec2 instance\n\n @param client imds client to use for the query\n @param iam_role_name iam role name to get temporary credentials through\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_credentials (client : * mut aws_imds_client , iam_role_name : aws_byte_cursor , callback : aws_imds_client_on_get_credentials_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the iam profile information of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_iam_profile (client : * mut aws_imds_client , callback : aws_imds_client_on_get_iam_profile_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the user data of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_user_data (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the signature of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_signature (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the instance information data block of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_info (client : * mut aws_imds_client , callback : aws_imds_client_on_get_instance_info_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_hash_vtable { pub alg_name : * const :: libc :: c_char , pub provider : * const :: libc :: c_char , pub destroy : :: std :: option :: Option < unsafe extern "C" fn (hash : * mut aws_hash) > , pub update : :: std :: option :: Option < unsafe extern "C" fn (hash : * mut aws_hash , buf : * const aws_byte_cursor) -> :: libc :: c_int > , pub finalize : :: std :: option :: Option < unsafe extern "C" fn (hash : * mut aws_hash , out : * mut aws_byte_buf) -> :: libc :: c_int > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash_vtable"] [:: std :: mem :: size_of :: < aws_hash_vtable > () - 40usize] ; ["Alignment of aws_hash_vtable"] [:: std :: mem :: align_of :: < aws_hash_vtable > () - 8usize] ; ["Offset of field: aws_hash_vtable::alg_name"] [:: std :: mem :: offset_of ! (aws_hash_vtable , alg_name) - 0usize] ; ["Offset of field: aws_hash_vtable::provider"] [:: std :: mem :: offset_of ! (aws_hash_vtable , provider) - 8usize] ; ["Offset of field: aws_hash_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_hash_vtable , destroy) - 16usize] ; ["Offset of field: aws_hash_vtable::update"] [:: std :: mem :: offset_of ! (aws_hash_vtable , update) - 24usize] ; ["Offset of field: aws_hash_vtable::finalize"] [:: std :: mem :: offset_of ! (aws_hash_vtable , finalize) - 32usize] ; } ; impl Default for aws_hash_vtable { 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)] pub struct aws_hash { pub allocator : * mut aws_allocator , pub vtable : * mut aws_hash_vtable , pub digest_size : usize , pub good : bool , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash"] [:: std :: mem :: size_of :: < aws_hash > () - 40usize] ; ["Alignment of aws_hash"] [:: std :: mem :: align_of :: < aws_hash > () - 8usize] ; ["Offset of field: aws_hash::allocator"] [:: std :: mem :: offset_of ! (aws_hash , allocator) - 0usize] ; ["Offset of field: aws_hash::vtable"] [:: std :: mem :: offset_of ! (aws_hash , vtable) - 8usize] ; ["Offset of field: aws_hash::digest_size"] [:: std :: mem :: offset_of ! (aws_hash , digest_size) - 16usize] ; ["Offset of field: aws_hash::good"] [:: std :: mem :: offset_of ! (aws_hash , good) - 24usize] ; ["Offset of field: aws_hash::impl_"] [:: std :: mem :: offset_of ! (aws_hash , impl_) - 32usize] ; } ; impl Default for aws_hash { 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_hash_new_fn = :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator) -> * mut aws_hash > ; unsafe extern "C" { # [doc = " Allocates and initializes a sha512 hash instance."] pub fn aws_sha512_new (allocator : * mut aws_allocator) -> * mut aws_hash ; } unsafe extern "C" { # [doc = " Allocates and initializes a sha256 hash instance."] pub fn aws_sha256_new (allocator : * mut aws_allocator) -> * mut aws_hash ; } unsafe extern "C" { # [doc = " Allocates and initializes a sha1 hash instance."] pub fn aws_sha1_new (allocator : * mut aws_allocator) -> * mut aws_hash ; } unsafe extern "C" { # [doc = " Allocates and initializes an md5 hash instance."] pub fn aws_md5_new (allocator : * mut aws_allocator) -> * mut aws_hash ; } unsafe extern "C" { # [doc = " Cleans up and deallocates hash."] pub fn aws_hash_destroy (hash : * mut aws_hash) ; } unsafe extern "C" { # [doc = " Updates the running hash with to_hash. this can be called multiple times."] pub fn aws_hash_update (hash : * mut aws_hash , to_hash : * const aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Completes the hash computation and writes the final digest to output.\n Allocation of output is the caller's responsibility. If you specify\n truncate_to to something other than 0, the output will be truncated to that\n number of bytes. For example, if you want a SHA256 digest as the first 16\n bytes, set truncate_to to 16. If you want the full digest size, just set this\n to 0."] pub fn aws_hash_finalize (hash : * mut aws_hash , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Computes the md5 hash over input and writes the digest output to 'output'.\n Use this if you don't need to stream the data you're hashing and you can load\n the entire input to hash into memory."] pub fn aws_md5_compute (allocator : * mut aws_allocator , input : * const aws_byte_cursor , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Computes the sha512 hash over input and writes the digest output to 'output'.\n Use this if you don't need to stream the data you're hashing and you can load\n the entire input to hash into memory. If you specify truncate_to to something\n other than 0, the output will be truncated to that number of bytes. For\n example, if you want a SHA512 digest as the first 16 bytes, set truncate_to\n to 16. If you want the full digest size, just set this to 0."] pub fn aws_sha512_compute (allocator : * mut aws_allocator , input : * const aws_byte_cursor , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Computes the sha256 hash over input and writes the digest output to 'output'.\n Use this if you don't need to stream the data you're hashing and you can load\n the entire input to hash into memory. If you specify truncate_to to something\n other than 0, the output will be truncated to that number of bytes. For\n example, if you want a SHA256 digest as the first 16 bytes, set truncate_to\n to 16. If you want the full digest size, just set this to 0."] pub fn aws_sha256_compute (allocator : * mut aws_allocator , input : * const aws_byte_cursor , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Computes the sha1 hash over input and writes the digest output to 'output'.\n Use this if you don't need to stream the data you're hashing and you can load\n the entire input to hash into memory. If you specify truncate_to to something\n other than 0, the output will be truncated to that number of bytes. For\n example, if you want a SHA1 digest as the first 16 bytes, set truncate_to\n to 16. If you want the full digest size, just set this to 0."] pub fn aws_sha1_compute (allocator : * mut aws_allocator , input : * const aws_byte_cursor , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set the implementation of md5 to use. If you compiled without BYO_CRYPTO,\n you do not need to call this. However, if use this, we will honor it,\n regardless of compile options. This may be useful for testing purposes. If\n you did set BYO_CRYPTO, and you do not call this function you will\n segfault."] pub fn aws_set_md5_new_fn (fn_ : aws_hash_new_fn) ; } unsafe extern "C" { # [doc = " Set the implementation of sha512 to use. If you compiled without\n BYO_CRYPTO, you do not need to call this. However, if use this, we will\n honor it, regardless of compile options. This may be useful for testing\n purposes. If you did set BYO_CRYPTO, and you do not call this function\n you will segfault."] pub fn aws_set_sha512_new_fn (fn_ : aws_hash_new_fn) ; } unsafe extern "C" { # [doc = " Set the implementation of sha256 to use. If you compiled without\n BYO_CRYPTO, you do not need to call this. However, if use this, we will\n honor it, regardless of compile options. This may be useful for testing\n purposes. If you did set BYO_CRYPTO, and you do not call this function\n you will segfault."] pub fn aws_set_sha256_new_fn (fn_ : aws_hash_new_fn) ; } unsafe extern "C" { # [doc = " Set the implementation of sha1 to use. If you compiled without\n BYO_CRYPTO, you do not need to call this. However, if use this, we will\n honor it, regardless of compile options. This may be useful for testing\n purposes. If you did set BYO_CRYPTO, and you do not call this function\n you will segfault."] pub fn aws_set_sha1_new_fn (fn_ : aws_hash_new_fn) ; } unsafe extern "C" { # [doc = " The entry point function to perform a CRC32 (Ethernet, gzip) computation.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc32 parameter as an initial value unless continuing\n to update a running crc in a subsequent call."] pub fn aws_checksums_crc32 (input : * const u8 , length : :: libc :: c_int , previous_crc32 : u32) -> u32 ; } unsafe extern "C" { # [doc = " The entry point function to perform a CRC32 (Ethernet, gzip) computation.\n Supports buffer lengths up to size_t max.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc32 parameter as an initial value unless continuing\n to update a running crc in a subsequent call."] pub fn aws_checksums_crc32_ex (input : * const u8 , length : usize , previous_crc32 : u32) -> u32 ; } unsafe extern "C" { # [doc = " The entry point function to perform a Castagnoli CRC32c (iSCSI) computation.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc32 parameter as an initial value unless continuing\n to update a running crc in a subsequent call."] pub fn aws_checksums_crc32c (input : * const u8 , length : :: libc :: c_int , previous_crc32c : u32) -> u32 ; } unsafe extern "C" { # [doc = " The entry point function to perform a Castagnoli CRC32c (iSCSI) computation.\n Supports buffer lengths up to size_t max.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc32 parameter as an initial value unless continuing\n to update a running crc in a subsequent call."] pub fn aws_checksums_crc32c_ex (input : * const u8 , length : usize , previous_crc32c : u32) -> u32 ; } unsafe extern "C" { # [doc = " The entry point function to perform a CRC64-NVME (a.k.a. CRC64-Rocksoft) computation.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc64 parameter as an initial value unless continuing\n to update a running crc in a subsequent call.\n There are many variants of CRC64 algorithms. This CRC64 variant is bit-reflected (based on\n the non bit-reflected polynomial 0xad93d23594c93659) and inverts the CRC input and output bits."] pub fn aws_checksums_crc64nvme (input : * const u8 , length : :: libc :: c_int , previous_crc64 : u64) -> u64 ; } unsafe extern "C" { # [doc = " The entry point function to perform a CRC64-NVME (a.k.a. CRC64-Rocksoft) computation.\n Supports buffer lengths up to size_t max.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc64 parameter as an initial value unless continuing\n to update a running crc in a subsequent call.\n There are many variants of CRC64 algorithms. This CRC64 variant is bit-reflected (based on\n the non bit-reflected polynomial 0xad93d23594c93659) and inverts the CRC input and output bits."] pub fn aws_checksums_crc64nvme_ex (input : * const u8 , length : usize , previous_crc64 : u64) -> u64 ; } unsafe extern "C" { # [doc = " Combines two CRC32 (Ethernet, gzip) checksums computed over separate data blocks.\n This is equivalent to computing the CRC32 of the concatenated data blocks without\n having to re-scan the data.\n\n Given:\n   crc1 = CRC32(data_block_A)\n   crc2 = CRC32(data_block_B)\n\n This function computes:\n   result = CRC32(data_block_A || data_block_B)\n\n @param crc1 The CRC32 checksum of the first data block\n @param crc2 The CRC32 checksum of the second data block\n @param len2 The length (in bytes) of the original data that produced crc2.\n             This is NOT the size of the checksum (which is always 4 bytes),\n             but rather the size of the data block that was checksummed.\n @return The combined CRC32 checksum as if computed over the concatenated data"] pub fn aws_checksums_crc32_combine (crc1 : u32 , crc2 : u32 , len2 : u64) -> u32 ; } unsafe extern "C" { # [doc = " Combines two CRC32C (Castagnoli, iSCSI) checksums computed over separate data blocks.\n This is equivalent to computing the CRC32C of the concatenated data blocks without\n having to re-scan the data.\n\n Given:\n   crc1 = CRC32C(data_block_A)\n   crc2 = CRC32C(data_block_B)\n\n This function computes:\n   result = CRC32C(data_block_A || data_block_B)\n\n @param crc1 The CRC32C checksum of the first data block\n @param crc2 The CRC32C checksum of the second data block\n @param len2 The length (in bytes) of the original data that produced crc2.\n             This is NOT the size of the checksum (which is always 4 bytes),\n             but rather the size of the data block that was checksummed.\n @return The combined CRC32C checksum as if computed over the concatenated data"] pub fn aws_checksums_crc32c_combine (crc1 : u32 , crc2 : u32 , len2 : u64) -> u32 ; } unsafe extern "C" { # [doc = " Combines two CRC64-NVME (CRC64-Rocksoft) checksums computed over separate data blocks.\n This is equivalent to computing the CRC64-NVME of the concatenated data blocks without\n having to re-scan the data.\n\n Given:\n   crc1 = CRC64_NVME(data_block_A)\n   crc2 = CRC64_NVME(data_block_B)\n\n This function computes:\n   result = CRC64_NVME(data_block_A || data_block_B)\n\n @param crc1 The CRC64-NVME checksum of the first data block\n @param crc2 The CRC64-NVME checksum of the second data block\n @param len2 The length (in bytes) of the original data that produced crc2.\n             This is NOT the size of the checksum (which is always 8 bytes),\n             but rather the size of the data block that was checksummed.\n @return The combined CRC64-NVME checksum as if computed over the concatenated data"] pub fn aws_checksums_crc64nvme_combine (crc1 : u64 , crc2 : u64 , len2 : u64) -> u64 ; } pub type aws_log_channel_send_fn = :: std :: option :: Option < unsafe extern "C" fn (channel : * mut aws_log_channel , output : * mut aws_string) -> :: libc :: 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)] pub struct aws_log_channel_vtable { pub send : aws_log_channel_send_fn , pub clean_up : aws_log_channel_clean_up_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_channel_vtable"] [:: std :: mem :: size_of :: < aws_log_channel_vtable > () - 16usize] ; ["Alignment of aws_log_channel_vtable"] [:: std :: mem :: align_of :: < aws_log_channel_vtable > () - 8usize] ; ["Offset of field: aws_log_channel_vtable::send"] [:: std :: mem :: offset_of ! (aws_log_channel_vtable , send) - 0usize] ; ["Offset of field: aws_log_channel_vtable::clean_up"] [:: std :: mem :: offset_of ! (aws_log_channel_vtable , clean_up) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] 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 :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_channel"] [:: std :: mem :: size_of :: < aws_log_channel > () - 32usize] ; ["Alignment of aws_log_channel"] [:: std :: mem :: align_of :: < aws_log_channel > () - 8usize] ; ["Offset of field: aws_log_channel::vtable"] [:: std :: mem :: offset_of ! (aws_log_channel , vtable) - 0usize] ; ["Offset of field: aws_log_channel::allocator"] [:: std :: mem :: offset_of ! (aws_log_channel , allocator) - 8usize] ; ["Offset of field: aws_log_channel::writer"] [:: std :: mem :: offset_of ! (aws_log_channel , writer) - 16usize] ; ["Offset of field: aws_log_channel::impl_"] [:: std :: mem :: offset_of ! (aws_log_channel , impl_) - 24usize] ; } ; 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 () } } } unsafe extern "C" { pub fn aws_log_channel_init_foreground (channel : * mut aws_log_channel , allocator : * mut aws_allocator , writer : * mut aws_log_writer) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_channel_init_background (channel : * mut aws_log_channel , allocator : * mut aws_allocator , writer : * mut aws_log_writer) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_channel_clean_up (channel : * mut aws_log_channel) ; } pub type aws_log_formatter_format_fn = :: std :: option :: Option < unsafe extern "C" fn (formatter : * mut aws_log_formatter , formatted_output : * mut * mut aws_string , level : aws_log_level :: Type , subject : aws_log_subject_t , format : * const :: libc :: c_char , args : * mut __va_list_tag) -> :: libc :: 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)] pub struct aws_log_formatter_vtable { pub format : aws_log_formatter_format_fn , pub clean_up : aws_log_formatter_clean_up_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_formatter_vtable"] [:: std :: mem :: size_of :: < aws_log_formatter_vtable > () - 16usize] ; ["Alignment of aws_log_formatter_vtable"] [:: std :: mem :: align_of :: < aws_log_formatter_vtable > () - 8usize] ; ["Offset of field: aws_log_formatter_vtable::format"] [:: std :: mem :: offset_of ! (aws_log_formatter_vtable , format) - 0usize] ; ["Offset of field: aws_log_formatter_vtable::clean_up"] [:: std :: mem :: offset_of ! (aws_log_formatter_vtable , clean_up) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_log_formatter { pub vtable : * mut aws_log_formatter_vtable , pub allocator : * mut aws_allocator , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_formatter"] [:: std :: mem :: size_of :: < aws_log_formatter > () - 24usize] ; ["Alignment of aws_log_formatter"] [:: std :: mem :: align_of :: < aws_log_formatter > () - 8usize] ; ["Offset of field: aws_log_formatter::vtable"] [:: std :: mem :: offset_of ! (aws_log_formatter , vtable) - 0usize] ; ["Offset of field: aws_log_formatter::allocator"] [:: std :: mem :: offset_of ! (aws_log_formatter , allocator) - 8usize] ; ["Offset of field: aws_log_formatter::impl_"] [:: std :: mem :: offset_of ! (aws_log_formatter , impl_) - 16usize] ; } ; 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)] pub struct aws_log_formatter_standard_options { pub date_format : aws_date_format , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_formatter_standard_options"] [:: std :: mem :: size_of :: < aws_log_formatter_standard_options > () - 4usize] ; ["Alignment of aws_log_formatter_standard_options"] [:: std :: mem :: align_of :: < aws_log_formatter_standard_options > () - 4usize] ; ["Offset of field: aws_log_formatter_standard_options::date_format"] [:: std :: mem :: offset_of ! (aws_log_formatter_standard_options , date_format) - 0usize] ; } ; 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)] pub struct aws_logging_standard_formatting_data { pub log_line_buffer : * mut :: libc :: c_char , pub total_length : usize , pub level : aws_log_level :: Type , pub subject_name : * const :: libc :: c_char , pub format : * const :: libc :: c_char , pub date_format : aws_date_format , pub allocator : * mut aws_allocator , pub amount_written : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logging_standard_formatting_data"] [:: std :: mem :: size_of :: < aws_logging_standard_formatting_data > () - 64usize] ; ["Alignment of aws_logging_standard_formatting_data"] [:: std :: mem :: align_of :: < aws_logging_standard_formatting_data > () - 8usize] ; ["Offset of field: aws_logging_standard_formatting_data::log_line_buffer"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , log_line_buffer) - 0usize] ; ["Offset of field: aws_logging_standard_formatting_data::total_length"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , total_length) - 8usize] ; ["Offset of field: aws_logging_standard_formatting_data::level"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , level) - 16usize] ; ["Offset of field: aws_logging_standard_formatting_data::subject_name"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , subject_name) - 24usize] ; ["Offset of field: aws_logging_standard_formatting_data::format"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , format) - 32usize] ; ["Offset of field: aws_logging_standard_formatting_data::date_format"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , date_format) - 40usize] ; ["Offset of field: aws_logging_standard_formatting_data::allocator"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , allocator) - 48usize] ; ["Offset of field: aws_logging_standard_formatting_data::amount_written"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , amount_written) - 56usize] ; } ; 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 () } } } unsafe 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) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_formatter_clean_up (formatter : * mut aws_log_formatter) ; } unsafe extern "C" { pub fn aws_format_standard_log_line (formatting_data : * mut aws_logging_standard_formatting_data , args : * mut __va_list_tag) -> :: libc :: 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) -> :: libc :: 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)] pub struct aws_log_writer_vtable { pub write : aws_log_writer_write_fn , pub clean_up : aws_log_writer_clean_up_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_writer_vtable"] [:: std :: mem :: size_of :: < aws_log_writer_vtable > () - 16usize] ; ["Alignment of aws_log_writer_vtable"] [:: std :: mem :: align_of :: < aws_log_writer_vtable > () - 8usize] ; ["Offset of field: aws_log_writer_vtable::write"] [:: std :: mem :: offset_of ! (aws_log_writer_vtable , write) - 0usize] ; ["Offset of field: aws_log_writer_vtable::clean_up"] [:: std :: mem :: offset_of ! (aws_log_writer_vtable , clean_up) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_log_writer { pub vtable : * mut aws_log_writer_vtable , pub allocator : * mut aws_allocator , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_writer"] [:: std :: mem :: size_of :: < aws_log_writer > () - 24usize] ; ["Alignment of aws_log_writer"] [:: std :: mem :: align_of :: < aws_log_writer > () - 8usize] ; ["Offset of field: aws_log_writer::vtable"] [:: std :: mem :: offset_of ! (aws_log_writer , vtable) - 0usize] ; ["Offset of field: aws_log_writer::allocator"] [:: std :: mem :: offset_of ! (aws_log_writer , allocator) - 8usize] ; ["Offset of field: aws_log_writer::impl_"] [:: std :: mem :: offset_of ! (aws_log_writer , impl_) - 16usize] ; } ; 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)] pub struct aws_log_writer_file_options { pub filename : * const :: libc :: c_char , pub file : * mut FILE , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_writer_file_options"] [:: std :: mem :: size_of :: < aws_log_writer_file_options > () - 16usize] ; ["Alignment of aws_log_writer_file_options"] [:: std :: mem :: align_of :: < aws_log_writer_file_options > () - 8usize] ; ["Offset of field: aws_log_writer_file_options::filename"] [:: std :: mem :: offset_of ! (aws_log_writer_file_options , filename) - 0usize] ; ["Offset of field: aws_log_writer_file_options::file"] [:: std :: mem :: offset_of ! (aws_log_writer_file_options , file) - 8usize] ; } ; 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 () } } } unsafe extern "C" { pub fn aws_log_writer_init_stdout (writer : * mut aws_log_writer , allocator : * mut aws_allocator) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_writer_init_stderr (writer : * mut aws_log_writer , allocator : * mut aws_allocator) -> :: libc :: c_int ; } unsafe 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) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_writer_clean_up (writer : * mut aws_log_writer) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_socket_endpoint { _unused : [u8 ; 0] , } # [doc = " Invoked when connect completes.\n\n If unsuccessful, error_code will be set, connection will be NULL,\n and the on_shutdown callback will never be invoked.\n\n If successful, error_code will be 0 and connection will be valid.\n The user is now responsible for the connection and must\n call aws_http_connection_release() when they are done with it.\n\n The connection uses one event-loop thread to do all its work.\n The thread invoking this callback will be the same thread that invokes all\n future callbacks for this connection and its streams."] pub type aws_http_on_client_connection_setup_fn = :: std :: option :: Option < unsafe extern "C" fn (connection : * mut aws_http_connection , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when the connection has finished shutting down.\n Never invoked if on_setup failed.\n This is always invoked on connection's event-loop thread.\n Note that the connection is not completely done until on_shutdown has been invoked\n AND aws_http_connection_release() has been called."] pub type aws_http_on_client_connection_shutdown_fn = :: std :: option :: Option < unsafe extern "C" fn (connection : * mut aws_http_connection , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when the HTTP/2 settings change is complete.\n If connection setup successfully this will always be invoked whether settings change successfully or unsuccessfully.\n If error_code is AWS_ERROR_SUCCESS (0), then the peer has acknowledged the settings and the change has been applied.\n If error_code is non-zero, then a connection error occurred before the settings could be fully acknowledged and\n applied. This is always invoked on the connection's event-loop thread."] pub type aws_http2_on_change_settings_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (http2_connection : * mut aws_http_connection , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when the HTTP/2 PING completes, whether peer has acknowledged it or not.\n If error_code is AWS_ERROR_SUCCESS (0), then the peer has acknowledged the PING and round_trip_time_ns will be the\n round trip time in nano seconds for the connection.\n If error_code is non-zero, then a connection error occurred before the PING get acknowledgment and round_trip_time_ns\n will be useless in this case."] pub type aws_http2_on_ping_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (http2_connection : * mut aws_http_connection , round_trip_time_ns : u64 , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when an HTTP/2 GOAWAY frame is received from peer.\n Implies that the peer has initiated shutdown, or encountered a serious error.\n Once a GOAWAY is received, no further streams may be created on this connection.\n\n @param http2_connection This HTTP/2 connection.\n @param last_stream_id ID of the last locally-initiated stream that peer will\n      process. Any locally-initiated streams with a higher ID are ignored by\n      peer, and are safe to retry on another connection.\n @param http2_error_code The HTTP/2 error code (RFC-7540 section 7) sent by peer.\n      `enum aws_http2_error_code` lists official codes.\n @param debug_data The debug data sent by peer. It can be empty. (NOTE: this data is only valid for the lifetime of\n      the callback. Make a deep copy if you wish to keep it longer.)\n @param user_data User-data passed to the callback."] pub type aws_http2_on_goaway_received_fn = :: std :: option :: Option < unsafe extern "C" fn (http2_connection : * mut aws_http_connection , last_stream_id : u32 , http2_error_code : u32 , debug_data : aws_byte_cursor , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when new HTTP/2 settings from peer have been applied.\n Settings_array is the array of aws_http2_settings that contains all the settings we just changed in the order we\n applied (the order settings arrived). Num_settings is the number of elements in that array."] pub type aws_http2_on_remote_settings_change_fn = :: std :: option :: Option < unsafe extern "C" fn (http2_connection : * mut aws_http_connection , settings_array : * const aws_http2_setting , num_settings : usize , user_data : * mut :: libc :: c_void) > ; # [doc = " Callback invoked on each statistics sample.\n\n connection_nonce is unique to each connection for disambiguation of each callback per connection."] pub type aws_http_statistics_observer_fn = :: std :: option :: Option < unsafe extern "C" fn (connection_nonce : usize , stats_list : * const aws_array_list , user_data : * mut :: libc :: c_void) > ; # [doc = " Configuration options for connection monitoring"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_connection_monitoring_options { # [doc = " minimum required throughput of the connection.  Throughput is only measured against the interval of time where\n there is actual io to perform.  Read and write throughput are measured and checked independently of one another."] pub minimum_throughput_bytes_per_second : u64 , pub allowable_throughput_failure_interval_seconds : u32 , # [doc = " invoked on each statistics publish by the underlying IO channel. Install this callback to receive the statistics\n for observation. This field is optional."] pub statistics_observer_fn : aws_http_statistics_observer_fn , # [doc = " user_data to be passed to statistics_observer_fn."] pub statistics_observer_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_connection_monitoring_options"] [:: std :: mem :: size_of :: < aws_http_connection_monitoring_options > () - 32usize] ; ["Alignment of aws_http_connection_monitoring_options"] [:: std :: mem :: align_of :: < aws_http_connection_monitoring_options > () - 8usize] ; ["Offset of field: aws_http_connection_monitoring_options::minimum_throughput_bytes_per_second"] [:: std :: mem :: offset_of ! (aws_http_connection_monitoring_options , minimum_throughput_bytes_per_second) - 0usize] ; ["Offset of field: aws_http_connection_monitoring_options::allowable_throughput_failure_interval_seconds"] [:: std :: mem :: offset_of ! (aws_http_connection_monitoring_options , allowable_throughput_failure_interval_seconds) - 8usize] ; ["Offset of field: aws_http_connection_monitoring_options::statistics_observer_fn"] [:: std :: mem :: offset_of ! (aws_http_connection_monitoring_options , statistics_observer_fn) - 16usize] ; ["Offset of field: aws_http_connection_monitoring_options::statistics_observer_user_data"] [:: std :: mem :: offset_of ! (aws_http_connection_monitoring_options , statistics_observer_user_data) - 24usize] ; } ; impl Default for aws_http_connection_monitoring_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 () } } } # [doc = " Options specific to HTTP/1.x connections."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http1_connection_options { # [doc = " Optional\n Capacity in bytes of the HTTP/1 connection's read buffer.\n The buffer grows if the flow-control window of the incoming HTTP-stream\n reaches zero. If the buffer reaches capacity, no further socket data is\n read until the HTTP-stream's window opens again, allowing data to resume flowing.\n\n Ignored if `manual_window_management` is false.\n If zero is specified (the default) then a default capacity is chosen.\n A capacity that is too small may hinder throughput.\n A capacity that is too big may waste memory without helping throughput."] pub read_buffer_capacity : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http1_connection_options"] [:: std :: mem :: size_of :: < aws_http1_connection_options > () - 8usize] ; ["Alignment of aws_http1_connection_options"] [:: std :: mem :: align_of :: < aws_http1_connection_options > () - 8usize] ; ["Offset of field: aws_http1_connection_options::read_buffer_capacity"] [:: std :: mem :: offset_of ! (aws_http1_connection_options , read_buffer_capacity) - 0usize] ; } ; # [doc = " Options specific to HTTP/2 connections."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http2_connection_options { # [doc = " Optional\n The data of settings to change for initial settings.\n Note: each setting has its boundary. If settings_array is not set, num_settings has to be 0 to send an empty\n SETTINGS frame."] pub initial_settings_array : * mut aws_http2_setting , # [doc = " Required\n The num of settings to change (Length of the initial_settings_array)."] pub num_initial_settings : usize , # [doc = " Optional.\n Invoked when the HTTP/2 initial settings change is complete.\n If failed to setup the connection, this will not be invoked.\n Otherwise, this will be invoked, whether settings change successfully or unsuccessfully.\n See `aws_http2_on_change_settings_complete_fn`."] pub on_initial_settings_completed : aws_http2_on_change_settings_complete_fn , # [doc = " Optional\n The max number of recently-closed streams to remember.\n Set it to zero to use the default setting, AWS_HTTP2_DEFAULT_MAX_CLOSED_STREAMS\n\n If the connection receives a frame for a closed stream,\n the frame will be ignored or cause a connection error,\n depending on the frame type and how the stream was closed.\n Remembering more streams reduces the chances that a late frame causes\n a connection error, but costs some memory."] pub max_closed_streams : usize , # [doc = " Optional.\n Invoked when a valid GOAWAY frame received.\n See `aws_http2_on_goaway_received_fn`."] pub on_goaway_received : aws_http2_on_goaway_received_fn , # [doc = " Optional.\n Invoked when new settings from peer have been applied.\n See `aws_http2_on_remote_settings_change_fn`."] pub on_remote_settings_change : aws_http2_on_remote_settings_change_fn , # [doc = " Optional.\n Set to true to manually manage the flow-control window of whole HTTP/2 connection.\n\n If false, the connection will maintain its flow-control windows such that\n no back-pressure is applied and data arrives as fast as possible.\n\n If true, the flow-control window of the whole connection will shrink as body data\n is received (headers, padding, and other metadata do not affect the window) for every streams\n created on this connection.\n The initial connection flow-control window is 65,535.\n Once the connection's flow-control window reaches to 0, all the streams on the connection stop receiving any\n further data.\n The user must call aws_http2_connection_update_window() to increment the connection's\n window and keep data flowing.\n Note: the padding of data frame counts to the flow-control window.\n But, the client will always automatically update the window for padding even for manual window update."] pub conn_manual_window_management : bool , # [doc = " Optional.\n The threshold to send out a window update frame for the connection.\n Ignored if `conn_manual_window_management` is false.\n When the window_size_self for the connection is larger than the threshold,\n client will batch the window update and not send it out until the window_size_self\n drops below the threshold.\n Default to half of the initial connection flow-control window size, which is 32767."] pub conn_window_size_threshold_to_send_update : u32 , # [doc = " Optional.\n The threshold to send out a window update frame for the streams.\n Ignored if `manual_window_management` is false.\n When the window_size_self for the stream is larger than the threshold,\n client will batch the window update and not send it out until the window_size_self\n drops below the threshold.\n Default to half of the `initial_window_size`."] pub stream_window_size_threshold_to_send_update : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http2_connection_options"] [:: std :: mem :: size_of :: < aws_http2_connection_options > () - 64usize] ; ["Alignment of aws_http2_connection_options"] [:: std :: mem :: align_of :: < aws_http2_connection_options > () - 8usize] ; ["Offset of field: aws_http2_connection_options::initial_settings_array"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , initial_settings_array) - 0usize] ; ["Offset of field: aws_http2_connection_options::num_initial_settings"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , num_initial_settings) - 8usize] ; ["Offset of field: aws_http2_connection_options::on_initial_settings_completed"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , on_initial_settings_completed) - 16usize] ; ["Offset of field: aws_http2_connection_options::max_closed_streams"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , max_closed_streams) - 24usize] ; ["Offset of field: aws_http2_connection_options::on_goaway_received"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , on_goaway_received) - 32usize] ; ["Offset of field: aws_http2_connection_options::on_remote_settings_change"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , on_remote_settings_change) - 40usize] ; ["Offset of field: aws_http2_connection_options::conn_manual_window_management"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , conn_manual_window_management) - 48usize] ; ["Offset of field: aws_http2_connection_options::conn_window_size_threshold_to_send_update"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , conn_window_size_threshold_to_send_update) - 52usize] ; ["Offset of field: aws_http2_connection_options::stream_window_size_threshold_to_send_update"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , stream_window_size_threshold_to_send_update) - 56usize] ; } ; impl Default for aws_http2_connection_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 () } } } # [doc = " Options for creating an HTTP client connection.\n Initialize with AWS_HTTP_CLIENT_CONNECTION_OPTIONS_INIT to set default values."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_client_connection_options { # [doc = " The sizeof() this struct, used for versioning.\n Set by AWS_HTTP_CLIENT_CONNECTION_OPTIONS_INIT."] pub self_size : usize , # [doc = " Required.\n Must outlive the connection."] pub allocator : * mut aws_allocator , # [doc = " Required.\n The connection keeps the bootstrap alive via ref-counting."] pub bootstrap : * mut aws_client_bootstrap , # [doc = " Required.\n aws_http_client_connect() makes a copy."] pub host_name : aws_byte_cursor , # [doc = " Required."] pub port : u32 , # [doc = " Required.\n aws_http_client_connect() makes a copy."] pub socket_options : * const aws_socket_options , # [doc = " Optional.\n aws_http_client_connect() deep-copies all contents,\n and keeps `aws_tls_ctx` alive via ref-counting."] pub tls_options : * const aws_tls_connection_options , # [doc = " Optional\n Configuration options related to http proxy usage.\n Relevant fields are copied internally."] pub proxy_options : * const aws_http_proxy_options , pub proxy_ev_settings : * const proxy_env_var_settings , # [doc = " Optional\n Configuration options related to connection health monitoring"] pub monitoring_options : * const aws_http_connection_monitoring_options , # [doc = " Optional (ignored if 0).\n After a request is fully sent, if the server does not begin responding within N milliseconds,\n then fail with AWS_ERROR_HTTP_RESPONSE_FIRST_BYTE_TIMEOUT.\n This can be overridden per-request by aws_http_make_request_options.response_first_byte_timeout_ms.\n TODO: Only supported in HTTP/1.1 now, support it in HTTP/2"] pub response_first_byte_timeout_ms : u64 , # [doc = " Set to true to manually manage the flow-control window of each stream.\n\n If false, the connection will maintain its flow-control windows such that\n no back-pressure is applied and data arrives as fast as possible.\n\n If true, the flow-control window of each stream will shrink as body data\n is received (headers, padding, and other metadata do not affect the window).\n `initial_window_size` determines the starting size of each stream's window.\n\n If a stream's flow-control window reaches 0, no further data will be received. The user must call\n aws_http_stream_update_window() to increment the stream's window and keep data flowing.\n\n If a HTTP/2 connection created, it will ONLY control the stream window management.\n Connection window management is controlled by `conn_manual_window_management`.\n `stream_window_size_threshold_to_send_update` controls when to send the WINDOW_UPDATE frame for the stream.\n Note: the padding of data frame counts to the flow-control window. But, the client will always automatically\n update the window for padding even for manual window update."] pub manual_window_management : bool , # [doc = " The starting size of each HTTP stream's flow-control window.\n Required if `manual_window_management` is true,\n ignored if `manual_window_management` is false.\n\n For HTTP/2 connection, this value will end up being one of the initial settings for the connection,\n `AWS_HTTP2_SETTINGS_INITIAL_WINDOW_SIZE`.\n The corresponding settings from `initial_settings_array` will override this value.\n Notes:\n  - the setting value has the limitation of 2^31-1, otherwise the connection will be failed to be established with\n      AWS_ERROR_INVALID_ARGUMENT.\n  - when this set to 0, the initial window size will be set to 0, when `manual_window_management` is true."] pub initial_window_size : usize , # [doc = " User data for callbacks\n Optional."] pub user_data : * mut :: libc :: c_void , # [doc = " Invoked when connect completes.\n Required.\n See `aws_http_on_client_connection_setup_fn`."] pub on_setup : aws_http_on_client_connection_setup_fn , # [doc = " Invoked when the connection has finished shutting down.\n Never invoked if setup failed.\n Optional.\n See `aws_http_on_client_connection_shutdown_fn`."] pub on_shutdown : aws_http_on_client_connection_shutdown_fn , # [doc = " Optional.\n When true, use prior knowledge to set up an HTTP/2 connection on a cleartext\n connection.\n When TLS is set and this is true, the connection will failed to be established,\n as prior knowledge only works for cleartext TLS.\n Refer to RFC7540 3.4"] pub prior_knowledge_http2 : bool , # [doc = " Optional.\n Pointer to the hash map containing the ALPN string to protocol to use.\n Hash from `struct aws_string *` to `enum aws_http_version`.\n If not set, only the predefined string `h2` and `http/1.1` will be recognized. Other negotiated ALPN string will\n result in a HTTP1/1 connection\n Note: Connection will keep a deep copy of the table and the strings."] pub alpn_string_map : * mut aws_hash_table , # [doc = " Options specific to HTTP/1.x connections.\n Optional.\n Ignored if connection is not HTTP/1.x.\n If connection is HTTP/1.x and options were not specified, default values are used."] pub http1_options : * const aws_http1_connection_options , # [doc = " Options specific to HTTP/2 connections.\n Optional.\n Ignored if connection is not HTTP/2.\n If connection is HTTP/2 and options were not specified, default values are used."] pub http2_options : * const aws_http2_connection_options , # [doc = " Optional.\n Requests the channel/connection be bound to a specific event loop rather than chosen sequentially from the\n event loop group associated with the client bootstrap."] pub requested_event_loop : * mut aws_event_loop , # [doc = " Optional\n Host resolution override that allows the user to override DNS behavior for this particular connection."] pub host_resolution_config : * const aws_host_resolution_config , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_client_connection_options"] [:: std :: mem :: size_of :: < aws_http_client_connection_options > () - 184usize] ; ["Alignment of aws_http_client_connection_options"] [:: std :: mem :: align_of :: < aws_http_client_connection_options > () - 8usize] ; ["Offset of field: aws_http_client_connection_options::self_size"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , self_size) - 0usize] ; ["Offset of field: aws_http_client_connection_options::allocator"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , allocator) - 8usize] ; ["Offset of field: aws_http_client_connection_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , bootstrap) - 16usize] ; ["Offset of field: aws_http_client_connection_options::host_name"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , host_name) - 24usize] ; ["Offset of field: aws_http_client_connection_options::port"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , port) - 40usize] ; ["Offset of field: aws_http_client_connection_options::socket_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , socket_options) - 48usize] ; ["Offset of field: aws_http_client_connection_options::tls_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , tls_options) - 56usize] ; ["Offset of field: aws_http_client_connection_options::proxy_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , proxy_options) - 64usize] ; ["Offset of field: aws_http_client_connection_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , proxy_ev_settings) - 72usize] ; ["Offset of field: aws_http_client_connection_options::monitoring_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , monitoring_options) - 80usize] ; ["Offset of field: aws_http_client_connection_options::response_first_byte_timeout_ms"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , response_first_byte_timeout_ms) - 88usize] ; ["Offset of field: aws_http_client_connection_options::manual_window_management"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , manual_window_management) - 96usize] ; ["Offset of field: aws_http_client_connection_options::initial_window_size"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , initial_window_size) - 104usize] ; ["Offset of field: aws_http_client_connection_options::user_data"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , user_data) - 112usize] ; ["Offset of field: aws_http_client_connection_options::on_setup"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , on_setup) - 120usize] ; ["Offset of field: aws_http_client_connection_options::on_shutdown"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , on_shutdown) - 128usize] ; ["Offset of field: aws_http_client_connection_options::prior_knowledge_http2"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , prior_knowledge_http2) - 136usize] ; ["Offset of field: aws_http_client_connection_options::alpn_string_map"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , alpn_string_map) - 144usize] ; ["Offset of field: aws_http_client_connection_options::http1_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , http1_options) - 152usize] ; ["Offset of field: aws_http_client_connection_options::http2_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , http2_options) - 160usize] ; ["Offset of field: aws_http_client_connection_options::requested_event_loop"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , requested_event_loop) - 168usize] ; ["Offset of field: aws_http_client_connection_options::host_resolution_config"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , host_resolution_config) - 176usize] ; } ; impl Default for aws_http_client_connection_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 () } } } impl aws_http2_settings_id { pub const AWS_HTTP2_SETTINGS_HEADER_TABLE_SIZE : aws_http2_settings_id = aws_http2_settings_id :: AWS_HTTP2_SETTINGS_BEGIN_RANGE ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http2_settings_id { AWS_HTTP2_SETTINGS_BEGIN_RANGE = 1 , AWS_HTTP2_SETTINGS_ENABLE_PUSH = 2 , AWS_HTTP2_SETTINGS_MAX_CONCURRENT_STREAMS = 3 , AWS_HTTP2_SETTINGS_INITIAL_WINDOW_SIZE = 4 , AWS_HTTP2_SETTINGS_MAX_FRAME_SIZE = 5 , AWS_HTTP2_SETTINGS_MAX_HEADER_LIST_SIZE = 6 , AWS_HTTP2_SETTINGS_END_RANGE = 7 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http2_setting { pub id : aws_http2_settings_id , pub value : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http2_setting"] [:: std :: mem :: size_of :: < aws_http2_setting > () - 8usize] ; ["Alignment of aws_http2_setting"] [:: std :: mem :: align_of :: < aws_http2_setting > () - 4usize] ; ["Offset of field: aws_http2_setting::id"] [:: std :: mem :: offset_of ! (aws_http2_setting , id) - 0usize] ; ["Offset of field: aws_http2_setting::value"] [:: std :: mem :: offset_of ! (aws_http2_setting , value) - 4usize] ; } ; impl Default for aws_http2_setting { 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 () } } } unsafe extern "C" { # [doc = " Asynchronously establish a client connection.\n The on_setup callback is invoked when the operation has created a connection or failed."] pub fn aws_http_client_connect (options : * const aws_http_client_connection_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Users must release the connection when they are done with it.\n The connection's memory cannot be reclaimed until this is done.\n If the connection was not already shutting down, it will be shut down.\n\n Users should always wait for the on_shutdown() callback to be called before releasing any data passed to the\n http_connection (Eg aws_tls_connection_options, aws_socket_options) otherwise there will be race conditions between\n http_connection shutdown tasks and memory release tasks, causing Segfaults."] pub fn aws_http_connection_release (connection : * mut aws_http_connection) ; } unsafe extern "C" { # [doc = " Begin shutdown sequence of the connection if it hasn't already started. This will schedule shutdown tasks on the\n EventLoop that may send HTTP/TLS/TCP shutdown messages to peers if necessary, and will eventually cause internal\n connection memory to stop being accessed and on_shutdown() callback to be called.\n\n It's safe to call this function regardless of the connection state as long as you hold a reference to the connection."] pub fn aws_http_connection_close (connection : * mut aws_http_connection) ; } unsafe extern "C" { # [doc = " Stop accepting new requests for the connection. It will NOT start the shutdown process for the connection. The\n requests that are already open can still wait to be completed, but new requests will fail to be created,"] pub fn aws_http_connection_stop_new_requests (connection : * mut aws_http_connection) ; } unsafe extern "C" { # [doc = " Returns true unless the connection is closed or closing."] pub fn aws_http_connection_is_open (connection : * const aws_http_connection) -> bool ; } unsafe extern "C" { # [doc = " Return whether the connection can make a new requests.\n If false, then a new connection must be established to make further requests."] pub fn aws_http_connection_new_requests_allowed (connection : * const aws_http_connection) -> bool ; } unsafe extern "C" { # [doc = " Returns true if this is a client connection."] pub fn aws_http_connection_is_client (connection : * const aws_http_connection) -> bool ; } unsafe extern "C" { pub fn aws_http_connection_get_version (connection : * const aws_http_connection) -> aws_http_version ; } unsafe extern "C" { # [doc = " Returns the channel hosting the HTTP connection.\n Do not expose this function to language bindings."] pub fn aws_http_connection_get_channel (connection : * mut aws_http_connection) -> * mut aws_channel ; } unsafe extern "C" { # [doc = " Returns the remote endpoint of the HTTP connection."] pub fn aws_http_connection_get_remote_endpoint (connection : * const aws_http_connection) -> * const aws_socket_endpoint ; } unsafe extern "C" { # [doc = " Initialize an map copied from the *src map, which maps `struct aws_string *` to `enum aws_http_version`."] pub fn aws_http_alpn_map_init_copy (allocator : * mut aws_allocator , dest : * mut aws_hash_table , src : * mut aws_hash_table) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initialize an empty hash-table that maps `struct aws_string *` to `enum aws_http_version`.\n This map can used in aws_http_client_connections_options.alpn_string_map."] pub fn aws_http_alpn_map_init (allocator : * mut aws_allocator , map : * mut aws_hash_table) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Checks http proxy options for correctness"] pub fn aws_http_options_validate_proxy_configuration (options : * const aws_http_client_connection_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Send a SETTINGS frame (HTTP/2 only).\n SETTINGS will be applied locally when SETTINGS ACK is received from peer.\n\n @param http2_connection HTTP/2 connection.\n @param settings_array The array of settings to change. Note: each setting has its boundary.\n @param num_settings The num of settings to change in settings_array.\n @param on_completed Optional callback, see `aws_http2_on_change_settings_complete_fn`.\n @param user_data User-data pass to on_completed callback."] pub fn aws_http2_connection_change_settings (http2_connection : * mut aws_http_connection , settings_array : * const aws_http2_setting , num_settings : usize , on_completed : aws_http2_on_change_settings_complete_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Send a PING frame (HTTP/2 only).\n Round-trip-time is calculated when PING ACK is received from peer.\n\n @param http2_connection HTTP/2 connection.\n @param optional_opaque_data Optional payload for PING frame.\n      Must be NULL, or exactly 8 bytes (AWS_HTTP2_PING_DATA_SIZE).\n      If NULL, the 8 byte payload will be all zeroes.\n @param on_completed Optional callback, invoked when PING ACK is received from peer,\n      or when a connection error prevents the PING ACK from being received.\n      Callback always fires on the connection's event-loop thread.\n @param user_data User-data pass to on_completed callback."] pub fn aws_http2_connection_ping (http2_connection : * mut aws_http_connection , optional_opaque_data : * const aws_byte_cursor , on_completed : aws_http2_on_ping_complete_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the local settings we are using to affect the decoding.\n\n @param http2_connection HTTP/2 connection.\n @param out_settings fixed size array of aws_http2_setting gets set to the local settings"] pub fn aws_http2_connection_get_local_settings (http2_connection : * const aws_http_connection , out_settings : * mut aws_http2_setting) ; } unsafe extern "C" { # [doc = " Get the settings received from remote peer, which we are using to restricts the message to send.\n\n @param http2_connection HTTP/2 connection.\n @param out_settings fixed size array of aws_http2_setting gets set to the remote settings"] pub fn aws_http2_connection_get_remote_settings (http2_connection : * const aws_http_connection , out_settings : * mut aws_http2_setting) ; } unsafe extern "C" { # [doc = " Send a custom GOAWAY frame (HTTP/2 only).\n\n Note that the connection automatically attempts to send a GOAWAY during\n shutdown (unless a GOAWAY with a valid Last-Stream-ID has already been sent).\n\n This call can be used to gracefully warn the peer of an impending shutdown\n (http2_error=0, allow_more_streams=true), or to customize the final GOAWAY\n frame that is sent by this connection.\n\n The other end may not receive the goaway, if the connection already closed.\n\n @param http2_connection HTTP/2 connection.\n @param http2_error The HTTP/2 error code (RFC-7540 section 7) to send.\n      `enum aws_http2_error_code` lists official codes.\n @param allow_more_streams If true, new peer-initiated streams will continue\n      to be acknowledged and the GOAWAY's Last-Stream-ID will be set to a max value.\n      If false, new peer-initiated streams will be ignored and the GOAWAY's\n      Last-Stream-ID will be set to the latest acknowledged stream.\n @param optional_debug_data Optional debug data to send. Size must not exceed 16KB."] pub fn aws_http2_connection_send_goaway (http2_connection : * mut aws_http_connection , http2_error : u32 , allow_more_streams : bool , optional_debug_data : * const aws_byte_cursor) ; } unsafe extern "C" { # [doc = " Get data about the latest GOAWAY frame sent to peer (HTTP/2 only).\n If no GOAWAY has been sent, AWS_ERROR_HTTP_DATA_NOT_AVAILABLE will be raised.\n Note that GOAWAY frames are typically sent automatically by the connection\n during shutdown.\n\n @param http2_connection HTTP/2 connection.\n @param out_http2_error Gets set to HTTP/2 error code sent in most recent GOAWAY.\n @param out_last_stream_id Gets set to Last-Stream-ID sent in most recent GOAWAY."] pub fn aws_http2_connection_get_sent_goaway (http2_connection : * mut aws_http_connection , out_http2_error : * mut u32 , out_last_stream_id : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get data about the latest GOAWAY frame received from peer (HTTP/2 only).\n If no GOAWAY has been received, or the GOAWAY payload is still in transmitting,\n AWS_ERROR_HTTP_DATA_NOT_AVAILABLE will be raised.\n\n @param http2_connection HTTP/2 connection.\n @param out_http2_error Gets set to HTTP/2 error code received in most recent GOAWAY.\n @param out_last_stream_id Gets set to Last-Stream-ID received in most recent GOAWAY."] pub fn aws_http2_connection_get_received_goaway (http2_connection : * mut aws_http_connection , out_http2_error : * mut u32 , out_last_stream_id : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Increment the connection's flow-control window to keep data flowing (HTTP/2 only).\n\n If the connection was created with `conn_manual_window_management` set true,\n the flow-control window of the connection will shrink as body data is received for all the streams created on it.\n (headers, padding, and other metadata do not affect the window).\n The initial connection flow-control window is 65,535.\n Once the connection's flow-control window reaches to 0, all the streams on the connection stop receiving any further\n data.\n\n If `conn_manual_window_management` is false, this call will have no effect.\n The connection maintains its flow-control windows such that\n no back-pressure is applied and data arrives as fast as possible.\n\n If you are not connected, this call will have no effect.\n\n Crashes when the connection is not http2 connection.\n The limit of the Maximum Size is 2**31 - 1.\n And client will make sure the WINDOW_UPDATE frame to be valid.\n\n The client control exactly when the WINDOW_UPDATE frame sent.\n Check `conn_window_size_threshold_to_send_update` for details.\n\n @param http2_connection HTTP/2 connection.\n @param increment_size The size to increment for the connection's flow control window"] pub fn aws_http2_connection_update_window (http2_connection : * mut aws_http_connection , increment_size : u32) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_async_input_stream { pub vtable : * const aws_async_input_stream_vtable , pub alloc : * mut aws_allocator , pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_async_input_stream"] [:: std :: mem :: size_of :: < aws_async_input_stream > () - 48usize] ; ["Alignment of aws_async_input_stream"] [:: std :: mem :: align_of :: < aws_async_input_stream > () - 8usize] ; ["Offset of field: aws_async_input_stream::vtable"] [:: std :: mem :: offset_of ! (aws_async_input_stream , vtable) - 0usize] ; ["Offset of field: aws_async_input_stream::alloc"] [:: std :: mem :: offset_of ! (aws_async_input_stream , alloc) - 8usize] ; ["Offset of field: aws_async_input_stream::ref_count"] [:: std :: mem :: offset_of ! (aws_async_input_stream , ref_count) - 16usize] ; ["Offset of field: aws_async_input_stream::impl_"] [:: std :: mem :: offset_of ! (aws_async_input_stream , impl_) - 40usize] ; } ; impl Default for aws_async_input_stream { 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)] pub struct aws_async_input_stream_vtable { # [doc = " Destroy the stream, its refcount has reached 0."] pub destroy : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_async_input_stream) > , # [doc = " Read once into the buffer.\n Complete the read when at least 1 byte is read, the buffer is full, or EOF is reached.\n Do not resize the buffer (do not use \"aws_byte_buf_xyz_dynamic()\" functions)\n Do not assume that buffer len starts at 0.\n You may assume that read() won't be called again until the current one completes.\n You may assume that the buffer has some space available.\n Return a future, which will contain an error code if something went wrong,\n or a result bool indicating whether EOF has been reached."] pub read : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_async_input_stream , dest : * mut aws_byte_buf) -> * mut aws_future_bool > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_async_input_stream_vtable"] [:: std :: mem :: size_of :: < aws_async_input_stream_vtable > () - 16usize] ; ["Alignment of aws_async_input_stream_vtable"] [:: std :: mem :: align_of :: < aws_async_input_stream_vtable > () - 8usize] ; ["Offset of field: aws_async_input_stream_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_async_input_stream_vtable , destroy) - 0usize] ; ["Offset of field: aws_async_input_stream_vtable::read"] [:: std :: mem :: offset_of ! (aws_async_input_stream_vtable , read) - 8usize] ; } ; unsafe extern "C" { # [doc = " Initialize aws_async_input_stream \"base class\""] pub fn aws_async_input_stream_init_base (stream : * mut aws_async_input_stream , alloc : * mut aws_allocator , vtable : * const aws_async_input_stream_vtable , impl_ : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Increment reference count.\n You may pass in NULL (has no effect).\n Returns whatever pointer was passed in."] pub fn aws_async_input_stream_acquire (stream : * mut aws_async_input_stream) -> * mut aws_async_input_stream ; } unsafe extern "C" { # [doc = " Decrement reference count.\n You may pass in NULL (has no effect).\n Always returns NULL."] pub fn aws_async_input_stream_release (stream : * mut aws_async_input_stream) -> * mut aws_async_input_stream ; } unsafe extern "C" { # [doc = " Read once from the async stream into the buffer.\n The read completes when at least 1 byte is read, the buffer is full, or EOF is reached.\n Depending on implementation, the read could complete at any time.\n It may complete synchronously. It may complete on another thread.\n Returns a future, which will contain an error code if something went wrong,\n or a result bool indicating whether EOF has been reached.\n\n WARNING: The buffer must have space available.\n WARNING: Do not read again until the previous read is complete."] pub fn aws_async_input_stream_read (stream : * mut aws_async_input_stream , dest : * mut aws_byte_buf) -> * mut aws_future_bool ; } unsafe extern "C" { # [doc = " Read repeatedly from the async stream until the buffer is full, or EOF is reached.\n Depending on implementation, this could complete at any time.\n It may complete synchronously. It may complete on another thread.\n Returns a future, which will contain an error code if something went wrong,\n or a result bool indicating whether EOF has been reached.\n\n WARNING: The buffer must have space available.\n WARNING: Do not read again until the previous read is complete."] pub fn aws_async_input_stream_read_to_fill (stream : * mut aws_async_input_stream , dest : * mut aws_byte_buf) -> * mut aws_future_bool ; } pub type aws_crt_statistics_category_t = u32 ; pub const AWS_CRT_STATISTICS_CATEGORY_STRIDE_BITS : _bindgen_ty_22 = _bindgen_ty_22 :: AWS_CRT_STATISTICS_CATEGORY_STRIDE_BITS ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_22 { AWS_CRT_STATISTICS_CATEGORY_STRIDE_BITS = 8 , } # [repr (u32)] # [non_exhaustive] # [doc = " The common-specific range of the aws_crt_statistics_category cross-library enum.\n\n This enum functions as an RTTI value that lets statistics handler's interpret (via cast) a\n specific statistics structure if the RTTI value is understood.\n\n Common doesn't have any statistics structures presently, so its range is essentially empty.\n"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_crt_common_statistics_category { AWSCRT_STAT_CAT_INVALID = 0 , } # [doc = " Pattern-struct that functions as a base \"class\" for all statistics structures.  To conform\n to the pattern, a statistics structure must have its first member be the category.  In that\n case it becomes \"safe\" to cast from aws_crt_statistics_base to the specific statistics structure\n based on the category value."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_crt_statistics_base { pub category : aws_crt_statistics_category_t , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_crt_statistics_base"] [:: std :: mem :: size_of :: < aws_crt_statistics_base > () - 4usize] ; ["Alignment of aws_crt_statistics_base"] [:: std :: mem :: align_of :: < aws_crt_statistics_base > () - 4usize] ; ["Offset of field: aws_crt_statistics_base::category"] [:: std :: mem :: offset_of ! (aws_crt_statistics_base , category) - 0usize] ; } ; # [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)] pub struct aws_crt_statistics_sample_interval { pub begin_time_ms : u64 , pub end_time_ms : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_crt_statistics_sample_interval"] [:: std :: mem :: size_of :: < aws_crt_statistics_sample_interval > () - 16usize] ; ["Alignment of aws_crt_statistics_sample_interval"] [:: std :: mem :: align_of :: < aws_crt_statistics_sample_interval > () - 8usize] ; ["Offset of field: aws_crt_statistics_sample_interval::begin_time_ms"] [:: std :: mem :: offset_of ! (aws_crt_statistics_sample_interval , begin_time_ms) - 0usize] ; ["Offset of field: aws_crt_statistics_sample_interval::end_time_ms"] [:: std :: mem :: offset_of ! (aws_crt_statistics_sample_interval , end_time_ms) - 8usize] ; } ; 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 :: libc :: 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_crt_statistics_handler_vtable"] [:: std :: mem :: size_of :: < aws_crt_statistics_handler_vtable > () - 24usize] ; ["Alignment of aws_crt_statistics_handler_vtable"] [:: std :: mem :: align_of :: < aws_crt_statistics_handler_vtable > () - 8usize] ; ["Offset of field: aws_crt_statistics_handler_vtable::process_statistics"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler_vtable , process_statistics) - 0usize] ; ["Offset of field: aws_crt_statistics_handler_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler_vtable , destroy) - 8usize] ; ["Offset of field: aws_crt_statistics_handler_vtable::get_report_interval_ms"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler_vtable , get_report_interval_ms) - 16usize] ; } ; # [doc = " Base structure for all statistics handler implementations.\n\n A statistics handler is an object that listens to a stream of polymorphic (via the category RTTI enum) statistics\n structures emitted from some arbitrary source.  In the initial implementation, statistics handlers are primarily\n attached to channels, where they monitor IO throughput and state data (from channel handlers) to determine a\n connection's health.\n\n Statistics handlers are a generalization of the timeout and bandwidth filters that are often associated with\n SDK network connections.  Configurable, default implementations are defined at the protocol level (http, etc...)\n where they can be attached at connection (channel) creation time."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_crt_statistics_handler { pub vtable : * mut aws_crt_statistics_handler_vtable , pub allocator : * mut aws_allocator , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_crt_statistics_handler"] [:: std :: mem :: size_of :: < aws_crt_statistics_handler > () - 24usize] ; ["Alignment of aws_crt_statistics_handler"] [:: std :: mem :: align_of :: < aws_crt_statistics_handler > () - 8usize] ; ["Offset of field: aws_crt_statistics_handler::vtable"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler , vtable) - 0usize] ; ["Offset of field: aws_crt_statistics_handler::allocator"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler , allocator) - 8usize] ; ["Offset of field: aws_crt_statistics_handler::impl_"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler , impl_) - 16usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Submits a list of statistics objects to a statistics handler for processing\n\n handler - the statistics handler that will process the statistics objects\n interval - time period over which the statistics were gathered\n stats - list of pointers to structures that can be case to aws_crt_statistics_base (i.e. have category as a first\n   member)\n 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 :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Queries the frequency (via an interval in milliseconds) which a statistics handler would like to be informed\n of statistics."] pub fn aws_crt_statistics_handler_get_report_interval_ms (handler : * mut aws_crt_statistics_handler) -> u64 ; } unsafe extern "C" { # [doc = " completely destroys a statistics handler.  The handler's cleanup function must clean up the impl portion completely\n (including its allocation, if done separately)."] pub fn aws_crt_statistics_handler_destroy (handler : * mut aws_crt_statistics_handler) ; } pub type aws_priority_queue_compare_fn = :: std :: option :: Option < unsafe extern "C" fn (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> :: libc :: c_int > ; # [repr (C)] # [derive (Debug , Copy , Clone)] 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\n the first call to aws_priority_queue_push_bp is made, and is subsequently maintained\n through any heap node manipulations.\n\n Each element is a struct aws_priority_queue_node *, pointing to a backpointer field\n owned by the calling code, or a NULL. The backpointer field is continually updated\n with information needed to locate and remove a specific node later on."] pub backpointers : aws_array_list , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_priority_queue"] [:: std :: mem :: size_of :: < aws_priority_queue > () - 88usize] ; ["Alignment of aws_priority_queue"] [:: std :: mem :: align_of :: < aws_priority_queue > () - 8usize] ; ["Offset of field: aws_priority_queue::pred"] [:: std :: mem :: offset_of ! (aws_priority_queue , pred) - 0usize] ; ["Offset of field: aws_priority_queue::container"] [:: std :: mem :: offset_of ! (aws_priority_queue , container) - 8usize] ; ["Offset of field: aws_priority_queue::backpointers"] [:: std :: mem :: offset_of ! (aws_priority_queue , backpointers) - 48usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_priority_queue_node"] [:: std :: mem :: size_of :: < aws_priority_queue_node > () - 8usize] ; ["Alignment of aws_priority_queue_node"] [:: std :: mem :: align_of :: < aws_priority_queue_node > () - 8usize] ; ["Offset of field: aws_priority_queue_node::current_index"] [:: std :: mem :: offset_of ! (aws_priority_queue_node , current_index) - 0usize] ; } ; unsafe extern "C" { # [doc = " Initializes a priority queue struct for use. This mode will grow memory automatically (exponential model)\n Default size is the inital size of the queue\n item_size is the size of each element in bytes. Mixing items types is not supported by this API.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes a priority queue struct for use. This mode will not allocate any additional memory. When the heap fills\n new enqueue operations will fail with AWS_ERROR_PRIORITY_QUEUE_FULL.\n\n Heaps initialized using this call do not support the aws_priority_queue_push_ref call with a non-NULL backpointer\n parameter.\n\n heap is the raw memory allocated for this priority_queue\n item_count is the maximum number of elements the raw heap can contain\n item_size is the size of each element in bytes. Mixing items types is not supported by this API.\n 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 :: libc :: c_void , item_count : usize , item_size : usize , pred : aws_priority_queue_compare_fn) ; } unsafe extern "C" { # [doc = " Checks that the backpointer at a specific index of the queue is\n 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 ; } unsafe extern "C" { # [doc = " Checks that the backpointers of the priority queue are either NULL\n or correctly allocated to point at aws_priority_queue_nodes. This\n check is O(n), as it accesses every backpointer in a loop, and thus\n shouldn't be used carelessly."] pub fn aws_priority_queue_backpointers_valid_deep (queue : * const aws_priority_queue) -> bool ; } unsafe extern "C" { # [doc = " Checks that the backpointers of the priority queue satisfy validity\n constraints."] pub fn aws_priority_queue_backpointers_valid (queue : * const aws_priority_queue) -> bool ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies item into the queue and places it in the proper priority order. Complexity: O(log(n)).\n\n If the backpointer parameter is non-null, the heap will continually update the pointed-to field\n with information needed to remove the node later on. *backpointer must remain valid until the node\n is removed from the heap, and may be updated on any mutating operation on the priority queue.\n\n If the node is removed, the backpointer will be set to a sentinel value that indicates that the\n node has already been removed. It is safe (and a no-op) to call aws_priority_queue_remove with\n such a sentinel value."] pub fn aws_priority_queue_push_ref (queue : * mut aws_priority_queue , item : * mut :: libc :: c_void , backpointer : * mut aws_priority_queue_node) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the element of the highest priority, and removes it from the queue.. Complexity: O(log(n)).\n 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 :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes a specific node from the priority queue. Complexity: O(log(n))\n After removing a node (using either _remove or _pop), the backpointer set at push_ref time is set\n to a sentinel value. If this sentinel value is passed to aws_priority_queue_remove,\n AWS_ERROR_PRIORITY_QUEUE_BAD_NODE will be raised. Note, however, that passing uninitialized\n 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 :: libc :: c_void , node : * const aws_priority_queue_node) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Obtains a pointer to the element of the highest priority. Complexity: constant time.\n 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 :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes all elements from the queue, but does not free internal memory."] pub fn aws_priority_queue_clear (queue : * mut aws_priority_queue) ; } unsafe extern "C" { # [doc = " Current number of elements in the queue"] pub fn aws_priority_queue_size (queue : * const aws_priority_queue) -> usize ; } unsafe extern "C" { # [doc = " Current allocated capacity for the queue, in dynamic mode this grows over time, in static mode, this will never\n change."] pub fn aws_priority_queue_capacity (queue : * const aws_priority_queue) -> usize ; } unsafe extern "C" { # [doc = " Initializes a queue node to a default value that indicates the node is not in the queue.\n\n @param node priority queue node to initialize with a default value"] pub fn aws_priority_queue_node_init (node : * mut aws_priority_queue_node) ; } unsafe extern "C" { # [doc = " Checks if a priority queue node is currently in a priority queue.\n\n @param node priority queue node to check usage for\n\n @return true if the node is in a queue, false otherwise"] pub fn aws_priority_queue_node_is_in_queue (node : * const aws_priority_queue_node) -> bool ; } impl aws_task_status { pub const AWS_TASK_STATUS_RUN_READY : aws_task_status = aws_task_status (0) ; pub const AWS_TASK_STATUS_CANCELED : aws_task_status = aws_task_status (1) ; } # [repr (transparent)] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub struct aws_task_status (pub :: libc :: c_uint) ; # [doc = " A scheduled function."] pub type aws_task_fn = :: std :: option :: Option < unsafe extern "C" fn (task : * mut aws_task , arg : * mut :: libc :: c_void , arg1 : aws_task_status) > ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_task { pub fn_ : aws_task_fn , pub arg : * mut :: libc :: c_void , pub timestamp : u64 , pub node : aws_linked_list_node , pub priority_queue_node : aws_priority_queue_node , pub type_tag : * const :: libc :: 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_task__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_task__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_task__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_task__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_task__bindgen_ty_1::scheduled"] [:: std :: mem :: offset_of ! (aws_task__bindgen_ty_1 , scheduled) - 0usize] ; ["Offset of field: aws_task__bindgen_ty_1::reserved"] [:: std :: mem :: offset_of ! (aws_task__bindgen_ty_1 , reserved) - 0usize] ; } ; 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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_task"] [:: std :: mem :: size_of :: < aws_task > () - 64usize] ; ["Alignment of aws_task"] [:: std :: mem :: align_of :: < aws_task > () - 8usize] ; ["Offset of field: aws_task::fn_"] [:: std :: mem :: offset_of ! (aws_task , fn_) - 0usize] ; ["Offset of field: aws_task::arg"] [:: std :: mem :: offset_of ! (aws_task , arg) - 8usize] ; ["Offset of field: aws_task::timestamp"] [:: std :: mem :: offset_of ! (aws_task , timestamp) - 16usize] ; ["Offset of field: aws_task::node"] [:: std :: mem :: offset_of ! (aws_task , node) - 24usize] ; ["Offset of field: aws_task::priority_queue_node"] [:: std :: mem :: offset_of ! (aws_task , priority_queue_node) - 40usize] ; ["Offset of field: aws_task::type_tag"] [:: std :: mem :: offset_of ! (aws_task , type_tag) - 48usize] ; ["Offset of field: aws_task::abi_extension"] [:: std :: mem :: offset_of ! (aws_task , abi_extension) - 56usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_task_scheduler"] [:: std :: mem :: size_of :: < aws_task_scheduler > () - 160usize] ; ["Alignment of aws_task_scheduler"] [:: std :: mem :: align_of :: < aws_task_scheduler > () - 8usize] ; ["Offset of field: aws_task_scheduler::alloc"] [:: std :: mem :: offset_of ! (aws_task_scheduler , alloc) - 0usize] ; ["Offset of field: aws_task_scheduler::timed_queue"] [:: std :: mem :: offset_of ! (aws_task_scheduler , timed_queue) - 8usize] ; ["Offset of field: aws_task_scheduler::timed_list"] [:: std :: mem :: offset_of ! (aws_task_scheduler , timed_list) - 96usize] ; ["Offset of field: aws_task_scheduler::asap_list"] [:: std :: mem :: offset_of ! (aws_task_scheduler , asap_list) - 128usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Init an aws_task"] pub fn aws_task_init (task : * mut aws_task , fn_ : aws_task_fn , arg : * mut :: libc :: c_void , type_tag : * const :: libc :: c_char) ; } unsafe extern "C" { pub fn aws_task_run (task : * mut aws_task , status : aws_task_status) ; } unsafe extern "C" { # [doc = " Initializes a task scheduler instance."] pub fn aws_task_scheduler_init (scheduler : * mut aws_task_scheduler , alloc : * mut aws_allocator) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Empties and executes all queued tasks, passing the AWS_TASK_STATUS_CANCELED status to the task function.\n 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) ; } unsafe extern "C" { pub fn aws_task_scheduler_is_valid (scheduler : * const aws_task_scheduler) -> bool ; } unsafe extern "C" { # [doc = " Returns whether the scheduler has any scheduled tasks.\n next_task_time (optional) will be set to time of the next task, note that 0 will be set if tasks were\n 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 ; } unsafe extern "C" { # [doc = " Schedules a task to run immediately.\n 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) ; } unsafe extern "C" { # [doc = " Schedules a task to run at time_to_run.\n 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) ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Sequentially execute all tasks scheduled to run at, or before current_time.\n AWS_TASK_STATUS_RUN_READY will be passed to the task function as the task status.\n\n 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) ; } unsafe 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 :: libc :: c_char ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_channel_direction { AWS_CHANNEL_DIR_READ = 0 , AWS_CHANNEL_DIR_WRITE = 1 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop_local_object { _unused : [u8 ; 0] , } pub type aws_channel_on_setup_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (channel : * mut aws_channel , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_channel_on_shutdown_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (channel : * mut aws_channel , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_channel_slot { pub alloc : * mut aws_allocator , pub channel : * mut aws_channel , pub adj_left : * mut aws_channel_slot , pub adj_right : * mut aws_channel_slot , pub handler : * mut aws_channel_handler , pub window_size : usize , pub upstream_message_overhead : usize , pub current_window_update_batch_size : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_slot"] [:: std :: mem :: size_of :: < aws_channel_slot > () - 64usize] ; ["Alignment of aws_channel_slot"] [:: std :: mem :: align_of :: < aws_channel_slot > () - 8usize] ; ["Offset of field: aws_channel_slot::alloc"] [:: std :: mem :: offset_of ! (aws_channel_slot , alloc) - 0usize] ; ["Offset of field: aws_channel_slot::channel"] [:: std :: mem :: offset_of ! (aws_channel_slot , channel) - 8usize] ; ["Offset of field: aws_channel_slot::adj_left"] [:: std :: mem :: offset_of ! (aws_channel_slot , adj_left) - 16usize] ; ["Offset of field: aws_channel_slot::adj_right"] [:: std :: mem :: offset_of ! (aws_channel_slot , adj_right) - 24usize] ; ["Offset of field: aws_channel_slot::handler"] [:: std :: mem :: offset_of ! (aws_channel_slot , handler) - 32usize] ; ["Offset of field: aws_channel_slot::window_size"] [:: std :: mem :: offset_of ! (aws_channel_slot , window_size) - 40usize] ; ["Offset of field: aws_channel_slot::upstream_message_overhead"] [:: std :: mem :: offset_of ! (aws_channel_slot , upstream_message_overhead) - 48usize] ; ["Offset of field: aws_channel_slot::current_window_update_batch_size"] [:: std :: mem :: offset_of ! (aws_channel_slot , current_window_update_batch_size) - 56usize] ; } ; impl Default for aws_channel_slot { 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_channel_task_fn = :: std :: option :: Option < unsafe extern "C" fn (channel_task : * mut aws_channel_task , arg : * mut :: libc :: c_void , status : aws_task_status) > ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_channel_task { pub wrapper_task : aws_task , pub task_fn : aws_channel_task_fn , pub arg : * mut :: libc :: c_void , pub type_tag : * const :: libc :: c_char , pub node : aws_linked_list_node , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_task"] [:: std :: mem :: size_of :: < aws_channel_task > () - 104usize] ; ["Alignment of aws_channel_task"] [:: std :: mem :: align_of :: < aws_channel_task > () - 8usize] ; ["Offset of field: aws_channel_task::wrapper_task"] [:: std :: mem :: offset_of ! (aws_channel_task , wrapper_task) - 0usize] ; ["Offset of field: aws_channel_task::task_fn"] [:: std :: mem :: offset_of ! (aws_channel_task , task_fn) - 64usize] ; ["Offset of field: aws_channel_task::arg"] [:: std :: mem :: offset_of ! (aws_channel_task , arg) - 72usize] ; ["Offset of field: aws_channel_task::type_tag"] [:: std :: mem :: offset_of ! (aws_channel_task , type_tag) - 80usize] ; ["Offset of field: aws_channel_task::node"] [:: std :: mem :: offset_of ! (aws_channel_task , node) - 88usize] ; } ; impl Default for aws_channel_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 , Default , Copy , Clone)] pub struct aws_channel_handler_vtable { # [doc = " Called by the channel when a message is available for processing in the read direction. It is your\n responsibility to call aws_mem_release(message->allocator, message); on message when you are finished with it.\n You must only call `aws_mem_release(message->allocator, message);` if the `process_read_message`\n returns AWS_OP_SUCCESS. In case of an error, you must not clean up the message and should just raise the error.\n\n Also keep in mind that your slot's internal window has been decremented. You'll want to call\n aws_channel_slot_increment_read_window() at some point in the future if you want to keep receiving data."] pub process_read_message : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , message : * mut aws_io_message) -> :: libc :: c_int > , # [doc = " Called by the channel when a message is available for processing in the write direction. It is your\n responsibility to call aws_mem_release(message->allocator, message); on message when you are finished with it.\n You must only call `aws_mem_release(message->allocator, message);` if the `process_read_message`\n returns AWS_OP_SUCCESS. In case of an error, you must not clean up the message and should just raise the error."] pub process_write_message : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , message : * mut aws_io_message) -> :: libc :: c_int > , # [doc = " Called by the channel when a downstream handler has issued a window increment. You'll want to update your\n internal state and likely propagate a window increment message of your own by calling\n 'aws_channel_slot_increment_read_window()'"] pub increment_read_window : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , size : usize) -> :: libc :: c_int > , # [doc = " The channel calls shutdown on all handlers twice, once to shut down reading, and once to shut down writing.\n Shutdown always begins with the left-most handler, and proceeds to the right with dir set to\n AWS_CHANNEL_DIR_READ. Then shutdown is called on handlers from right to left with dir set to\n AWS_CHANNEL_DIR_WRITE.\n\n The shutdown process does not need to complete immediately and may rely on scheduled tasks.\n The handler must call aws_channel_slot_on_handler_shutdown_complete() when it is finished,\n which propagates shutdown to the next handler.  If 'free_scarce_resources_immediately' is true,\n then resources vulnerable to denial-of-service attacks (such as sockets and file handles)\n must be closed immediately before the shutdown() call returns."] pub shutdown : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , dir : aws_channel_direction , error_code : :: libc :: c_int , free_scarce_resources_immediately : bool) -> :: libc :: c_int > , # [doc = " Called by the channel when the handler is added to a slot, to get the initial window size."] pub initial_window_size : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) -> usize > , # [doc = " Called by the channel anytime a handler is added or removed, provides a hint for downstream\n handlers to avoid message fragmentation due to message overhead."] pub message_overhead : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) -> usize > , # [doc = " Clean up any resources and deallocate yourself. The shutdown process will already be completed before this\n function is called."] pub destroy : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) > , # [doc = " Directs the channel handler to reset all of the internal statistics it tracks about itself."] pub reset_statistics : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) > , # [doc = " Adds a pointer to the handler's internal statistics (if they exist) to a list of statistics structures\n associated with the channel's handler chain."] pub gather_statistics : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , stats_list : * mut aws_array_list) > , pub trigger_read : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_handler_vtable"] [:: std :: mem :: size_of :: < aws_channel_handler_vtable > () - 80usize] ; ["Alignment of aws_channel_handler_vtable"] [:: std :: mem :: align_of :: < aws_channel_handler_vtable > () - 8usize] ; ["Offset of field: aws_channel_handler_vtable::process_read_message"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , process_read_message) - 0usize] ; ["Offset of field: aws_channel_handler_vtable::process_write_message"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , process_write_message) - 8usize] ; ["Offset of field: aws_channel_handler_vtable::increment_read_window"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , increment_read_window) - 16usize] ; ["Offset of field: aws_channel_handler_vtable::shutdown"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , shutdown) - 24usize] ; ["Offset of field: aws_channel_handler_vtable::initial_window_size"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , initial_window_size) - 32usize] ; ["Offset of field: aws_channel_handler_vtable::message_overhead"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , message_overhead) - 40usize] ; ["Offset of field: aws_channel_handler_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , destroy) - 48usize] ; ["Offset of field: aws_channel_handler_vtable::reset_statistics"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , reset_statistics) - 56usize] ; ["Offset of field: aws_channel_handler_vtable::gather_statistics"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , gather_statistics) - 64usize] ; ["Offset of field: aws_channel_handler_vtable::trigger_read"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , trigger_read) - 72usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_channel_handler { pub vtable : * mut aws_channel_handler_vtable , pub alloc : * mut aws_allocator , pub slot : * mut aws_channel_slot , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_handler"] [:: std :: mem :: size_of :: < aws_channel_handler > () - 32usize] ; ["Alignment of aws_channel_handler"] [:: std :: mem :: align_of :: < aws_channel_handler > () - 8usize] ; ["Offset of field: aws_channel_handler::vtable"] [:: std :: mem :: offset_of ! (aws_channel_handler , vtable) - 0usize] ; ["Offset of field: aws_channel_handler::alloc"] [:: std :: mem :: offset_of ! (aws_channel_handler , alloc) - 8usize] ; ["Offset of field: aws_channel_handler::slot"] [:: std :: mem :: offset_of ! (aws_channel_handler , slot) - 16usize] ; ["Offset of field: aws_channel_handler::impl_"] [:: std :: mem :: offset_of ! (aws_channel_handler , impl_) - 24usize] ; } ; impl Default for aws_channel_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 () } } } # [doc = " Args for creating a new channel.\n  event_loop to use for IO and tasks. on_setup_completed will be invoked when\n  the setup process is finished It will be executed in the event loop's thread.\n  on_shutdown_completed will be executed upon channel shutdown.\n\n  enable_read_back_pressure toggles whether or not back pressure will be applied in the channel.\n  Leave this option off unless you're using something like reactive-streams, since it is a slight throughput\n  penalty.\n\n  Unless otherwise\n  specified all functions for channels and channel slots must be executed within that channel's event-loop's thread."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_channel_options { pub event_loop : * mut aws_event_loop , pub on_setup_completed : aws_channel_on_setup_completed_fn , pub on_shutdown_completed : aws_channel_on_shutdown_completed_fn , pub setup_user_data : * mut :: libc :: c_void , pub shutdown_user_data : * mut :: libc :: c_void , pub enable_read_back_pressure : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_options"] [:: std :: mem :: size_of :: < aws_channel_options > () - 48usize] ; ["Alignment of aws_channel_options"] [:: std :: mem :: align_of :: < aws_channel_options > () - 8usize] ; ["Offset of field: aws_channel_options::event_loop"] [:: std :: mem :: offset_of ! (aws_channel_options , event_loop) - 0usize] ; ["Offset of field: aws_channel_options::on_setup_completed"] [:: std :: mem :: offset_of ! (aws_channel_options , on_setup_completed) - 8usize] ; ["Offset of field: aws_channel_options::on_shutdown_completed"] [:: std :: mem :: offset_of ! (aws_channel_options , on_shutdown_completed) - 16usize] ; ["Offset of field: aws_channel_options::setup_user_data"] [:: std :: mem :: offset_of ! (aws_channel_options , setup_user_data) - 24usize] ; ["Offset of field: aws_channel_options::shutdown_user_data"] [:: std :: mem :: offset_of ! (aws_channel_options , shutdown_user_data) - 32usize] ; ["Offset of field: aws_channel_options::enable_read_back_pressure"] [:: std :: mem :: offset_of ! (aws_channel_options , enable_read_back_pressure) - 40usize] ; } ; impl Default for aws_channel_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 () } } } unsafe extern "C" { pub static mut g_aws_channel_max_fragment_size : usize ; } unsafe extern "C" { # [doc = " Initializes channel_task for use."] pub fn aws_channel_task_init (channel_task : * mut aws_channel_task , task_fn : aws_channel_task_fn , arg : * mut :: libc :: c_void , type_tag : * const :: libc :: c_char) ; } unsafe extern "C" { # [doc = " Allocates new channel, Unless otherwise specified all functions for channels and channel slots must be executed\n within that channel's event-loop's thread. channel_options are copied."] pub fn aws_channel_new (allocator : * mut aws_allocator , creation_args : * const aws_channel_options) -> * mut aws_channel ; } unsafe extern "C" { # [doc = " Mark the channel, along with all slots and handlers, for destruction.\n Must be called after shutdown has completed.\n Can be called from any thread assuming 'aws_channel_shutdown()' has completed.\n Note that memory will not be freed until all users which acquired holds on the channel via\n aws_channel_acquire_hold(), release them via aws_channel_release_hold()."] pub fn aws_channel_destroy (channel : * mut aws_channel) ; } unsafe extern "C" { # [doc = " Initiates shutdown of the channel. Shutdown will begin with the left-most slot. Each handler will invoke\n 'aws_channel_slot_on_handler_shutdown_complete' once they've finished their shutdown process for the read direction.\n Once the right-most slot has shutdown in the read direction, the process will start shutting down starting on the\n right-most slot. Once the left-most slot has shutdown in the write direction, 'callbacks->shutdown_completed' will be\n invoked in the event loop's thread.\n\n This function can be called from any thread."] pub fn aws_channel_shutdown (channel : * mut aws_channel , error_code : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Prevent a channel's memory from being freed.\n Any number of users may acquire a hold to prevent a channel and its handlers from being unexpectedly freed.\n Any user which acquires a hold must release it via aws_channel_release_hold().\n Memory will be freed once all holds are released and aws_channel_destroy() has been called."] pub fn aws_channel_acquire_hold (channel : * mut aws_channel) ; } unsafe extern "C" { # [doc = " Release a hold on the channel's memory, allowing it to be freed.\n This may be called before or after aws_channel_destroy()."] pub fn aws_channel_release_hold (channel : * mut aws_channel) ; } unsafe extern "C" { # [doc = " Allocates and initializes a new slot for use with the channel. If this is the first slot in the channel, it will\n automatically be added to the channel as the first slot. For all subsequent calls on a given channel, the slot will\n need to be added to the channel via. the aws_channel_slot_insert_right(), aws_channel_slot_insert_end(), and\n aws_channel_slot_insert_left() APIs."] pub fn aws_channel_slot_new (channel : * mut aws_channel) -> * mut aws_channel_slot ; } unsafe extern "C" { # [doc = " Fetches the event loop the channel is a part of."] pub fn aws_channel_get_event_loop (channel : * mut aws_channel) -> * mut aws_event_loop ; } unsafe extern "C" { # [doc = " Fetches the current timestamp from the event-loop's clock, in nanoseconds."] pub fn aws_channel_current_clock_time (channel : * mut aws_channel , time_nanos : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Retrieves an object by key from the event loop's local storage."] pub fn aws_channel_fetch_local_object (channel : * mut aws_channel , key : * const :: libc :: c_void , obj : * mut aws_event_loop_local_object) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Stores an object by key in the event loop's local storage."] pub fn aws_channel_put_local_object (channel : * mut aws_channel , key : * const :: libc :: c_void , obj : * const aws_event_loop_local_object) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes an object by key from the event loop's local storage."] pub fn aws_channel_remove_local_object (channel : * mut aws_channel , key : * const :: libc :: c_void , removed_obj : * mut aws_event_loop_local_object) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Acquires a message from the event loop's message pool. size_hint is merely a hint, it may be smaller than you\n requested and you are responsible for checking the bounds of it. If the returned message is not large enough, you\n must send multiple messages. This cannot fail, it never returns NULL."] pub fn aws_channel_acquire_message_from_pool (channel : * mut aws_channel , message_type : aws_io_message_type , size_hint : usize) -> * mut aws_io_message ; } unsafe extern "C" { # [doc = " Schedules a task to run on the event loop as soon as possible.\n This is the ideal way to move a task into the correct thread. It's also handy for context switches.\n This function is safe to call from any thread.\n\n If called from the channel's event loop, the task will get directly added to the run-now list.\n If called from outside the channel's event loop, the task will go into a cross-thread task queue.\n\n If tasks must be serialized relative to some source synchronization, you may not want to use this API\n because tasks submitted from the event loop thread can \"jump ahead\" of tasks submitted from external threads\n due to this optimization.  If this is a problem, you can either refactor your submission logic or use\n the aws_channel_schedule_task_now_serialized variant which does not perform this optimization.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_channel_schedule_task_now (channel : * mut aws_channel , task : * mut aws_channel_task) ; } unsafe extern "C" { # [doc = " Schedules a task to run on the event loop as soon as possible.\n\n This variant always uses the cross thread queue rather than conditionally skipping it when already in\n the destination event loop.  While not \"optimal\", this allows us to serialize task execution no matter where\n the task was submitted from: if you are submitting tasks from a critical section, the serialized order that you\n submit is guaranteed to be the order that they execute on the event loop.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_channel_schedule_task_now_serialized (channel : * mut aws_channel , task : * mut aws_channel_task) ; } unsafe extern "C" { # [doc = " Schedules a task to run on the event loop at the specified time.\n This is the ideal way to move a task into the correct thread. It's also handy for context switches.\n Use aws_channel_current_clock_time() to get the current time in nanoseconds.\n This function is safe to call from any thread.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_channel_schedule_task_future (channel : * mut aws_channel , task : * mut aws_channel_task , run_at_nanos : u64) ; } unsafe extern "C" { # [doc = " Instrument a channel with a statistics handler.  While instrumented with a statistics handler, the channel\n will periodically report per-channel-handler-specific statistics about handler performance and state.\n\n Assigning a statistics handler to a channel is a transfer of ownership -- the channel will clean up\n the handler appropriately.  Statistics handlers may be changed dynamically (for example, the upgrade\n from a vanilla http channel to a websocket channel), but this function may only be called from the\n event loop thread that the channel is a part of.\n\n The first possible hook to set a statistics handler is the channel's creation callback."] pub fn aws_channel_set_statistics_handler (channel : * mut aws_channel , handler : * mut aws_crt_statistics_handler) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Returns true if the caller is on the event loop's thread. If false, you likely need to use\n aws_channel_schedule_task(). This function is safe to call from any thread."] pub fn aws_channel_thread_is_callers_thread (channel : * mut aws_channel) -> bool ; } unsafe extern "C" { # [doc = " Sets the handler for a slot, the slot will also call get_current_window_size() and propagate a window update\n upstream."] pub fn aws_channel_slot_set_handler (slot : * mut aws_channel_slot , handler : * mut aws_channel_handler) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes slot from the channel and deallocates the slot and its handler."] pub fn aws_channel_slot_remove (slot : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Replaces remove with new_slot. Deallocates remove and its handler."] pub fn aws_channel_slot_replace (remove : * mut aws_channel_slot , new_slot : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " inserts 'to_add' to the position immediately to the right of slot. Note that the first call to\n aws_channel_slot_new() adds it to the channel implicitly."] pub fn aws_channel_slot_insert_right (slot : * mut aws_channel_slot , to_add : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Inserts to 'to_add' the end of the channel. Note that the first call to\n aws_channel_slot_new() adds it to the channel implicitly."] pub fn aws_channel_slot_insert_end (channel : * mut aws_channel , to_add : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " inserts 'to_add' to the position immediately to the left of slot. Note that the first call to\n aws_channel_slot_new() adds it to the channel implicitly."] pub fn aws_channel_slot_insert_left (slot : * mut aws_channel_slot , to_add : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Sends a message to the adjacent slot in the channel based on dir. Also does window size checking.\n\n NOTE: if this function returns an error code, it is the caller's responsibility to release message\n back to the pool. If this function returns AWS_OP_SUCCESS, the recipient of the message has taken\n ownership of the message. So, for example, don't release a message to the pool and then return an error.\n If you encounter an error condition in this case, shutdown the channel with the appropriate error code."] pub fn aws_channel_slot_send_message (slot : * mut aws_channel_slot , message : * mut aws_io_message , dir : aws_channel_direction) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Convenience function that invokes aws_channel_acquire_message_from_pool(),\n asking for the largest reasonable DATA message that can be sent in the write direction,\n with upstream overhead accounted for. This cannot fail, it never returns NULL."] pub fn aws_channel_slot_acquire_max_message_for_write (slot : * mut aws_channel_slot) -> * mut aws_io_message ; } unsafe extern "C" { # [doc = " Issues a window update notification upstream (to the left.)"] pub fn aws_channel_slot_increment_read_window (slot : * mut aws_channel_slot , window : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Called by handlers once they have finished their shutdown in the 'dir' direction. Propagates the shutdown process\n to the next handler in the channel."] pub fn aws_channel_slot_on_handler_shutdown_complete (slot : * mut aws_channel_slot , dir : aws_channel_direction , err_code : :: libc :: c_int , free_scarce_resources_immediately : bool) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initiates shutdown on slot. callbacks->on_shutdown_completed will be called\n once the shutdown process is completed."] pub fn aws_channel_slot_shutdown (slot : * mut aws_channel_slot , dir : aws_channel_direction , err_code : :: libc :: c_int , free_scarce_resources_immediately : bool) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Fetches the downstream read window. This gives you the information necessary to honor the read window. If you call\n send_message() and it exceeds this window, the message will be rejected."] pub fn aws_channel_slot_downstream_read_window (slot : * mut aws_channel_slot) -> usize ; } unsafe extern "C" { # [doc = " Fetches the current overhead of upstream handlers. This provides a hint to avoid fragmentation if you care."] pub fn aws_channel_slot_upstream_message_overhead (slot : * mut aws_channel_slot) -> usize ; } unsafe extern "C" { # [doc = " Calls destroy on handler's vtable"] pub fn aws_channel_handler_destroy (handler : * mut aws_channel_handler) ; } unsafe extern "C" { # [doc = " Calls process_read_message on handler's vtable"] pub fn aws_channel_handler_process_read_message (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , message : * mut aws_io_message) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Calls process_write_message on handler's vtable."] pub fn aws_channel_handler_process_write_message (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , message : * mut aws_io_message) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Calls on_window_update on handler's vtable."] pub fn aws_channel_handler_increment_read_window (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , size : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " calls shutdown_direction on handler's vtable."] pub fn aws_channel_handler_shutdown (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , dir : aws_channel_direction , error_code : :: libc :: c_int , free_scarce_resources_immediately : bool) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Calls initial_window_size on handler's vtable."] pub fn aws_channel_handler_initial_window_size (handler : * mut aws_channel_handler) -> usize ; } unsafe extern "C" { pub fn aws_channel_get_first_slot (channel : * mut aws_channel) -> * mut aws_channel_slot ; } unsafe extern "C" { # [doc = " A way for external processes to force a read by the data-source channel handler.  Necessary in certain cases, like\n when a server channel finishes setting up its initial handlers, a read may have already been triggered on the\n socket (the client's CLIENT_HELLO tls payload, for example) and absent further data/notifications, this data\n would never get processed."] pub fn aws_channel_trigger_read (channel : * mut aws_channel) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_address_record_type { AWS_ADDRESS_RECORD_TYPE_A = 0 , AWS_ADDRESS_RECORD_TYPE_AAAA = 1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_get_host_address_flags { AWS_GET_HOST_ADDRESS_COUNT_RECORD_TYPE_A = 1 , AWS_GET_HOST_ADDRESS_COUNT_RECORD_TYPE_AAAA = 2 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_host_address { pub allocator : * mut aws_allocator , pub host : * const aws_string , pub address : * const aws_string , pub record_type : aws_address_record_type , pub expiry : u64 , pub use_count : usize , pub connection_failure_count : usize , pub weight : u8 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_address"] [:: std :: mem :: size_of :: < aws_host_address > () - 64usize] ; ["Alignment of aws_host_address"] [:: std :: mem :: align_of :: < aws_host_address > () - 8usize] ; ["Offset of field: aws_host_address::allocator"] [:: std :: mem :: offset_of ! (aws_host_address , allocator) - 0usize] ; ["Offset of field: aws_host_address::host"] [:: std :: mem :: offset_of ! (aws_host_address , host) - 8usize] ; ["Offset of field: aws_host_address::address"] [:: std :: mem :: offset_of ! (aws_host_address , address) - 16usize] ; ["Offset of field: aws_host_address::record_type"] [:: std :: mem :: offset_of ! (aws_host_address , record_type) - 24usize] ; ["Offset of field: aws_host_address::expiry"] [:: std :: mem :: offset_of ! (aws_host_address , expiry) - 32usize] ; ["Offset of field: aws_host_address::use_count"] [:: std :: mem :: offset_of ! (aws_host_address , use_count) - 40usize] ; ["Offset of field: aws_host_address::connection_failure_count"] [:: std :: mem :: offset_of ! (aws_host_address , connection_failure_count) - 48usize] ; ["Offset of field: aws_host_address::weight"] [:: std :: mem :: offset_of ! (aws_host_address , weight) - 56usize] ; } ; impl Default for aws_host_address { 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 once an address has been resolved for host. The type in host_addresses is struct aws_host_address (by-value).\n The caller does not own this memory and you must copy the host address before returning from this function if you\n plan to use it later. For convenience, we've provided the aws_host_address_copy() and aws_host_address_clean_up()\n functions."] pub type aws_on_host_resolved_result_fn = :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , host_name : * const aws_string , err_code : :: libc :: c_int , host_addresses : * const aws_array_list , user_data : * mut :: libc :: c_void) > ; # [doc = " Function signature for configuring your own resolver (the default just uses getaddrinfo()). The type in\n output_addresses is struct aws_host_address (by-value). We assume this function blocks, hence this absurdly\n complicated design."] pub type aws_resolve_host_implementation_fn = :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , host_name : * const aws_string , output_addresses : * mut aws_array_list , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_host_resolution_config { pub impl_ : aws_resolve_host_implementation_fn , pub max_ttl : usize , pub impl_data : * mut :: libc :: c_void , pub resolve_frequency_ns : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolution_config"] [:: std :: mem :: size_of :: < aws_host_resolution_config > () - 32usize] ; ["Alignment of aws_host_resolution_config"] [:: std :: mem :: align_of :: < aws_host_resolution_config > () - 8usize] ; ["Offset of field: aws_host_resolution_config::impl_"] [:: std :: mem :: offset_of ! (aws_host_resolution_config , impl_) - 0usize] ; ["Offset of field: aws_host_resolution_config::max_ttl"] [:: std :: mem :: offset_of ! (aws_host_resolution_config , max_ttl) - 8usize] ; ["Offset of field: aws_host_resolution_config::impl_data"] [:: std :: mem :: offset_of ! (aws_host_resolution_config , impl_data) - 16usize] ; ["Offset of field: aws_host_resolution_config::resolve_frequency_ns"] [:: std :: mem :: offset_of ! (aws_host_resolution_config , resolve_frequency_ns) - 24usize] ; } ; impl Default for aws_host_resolution_config { 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)] pub struct aws_host_resolver_purge_host_options { pub host : * const aws_string , pub on_host_purge_complete_callback : aws_simple_completion_callback , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolver_purge_host_options"] [:: std :: mem :: size_of :: < aws_host_resolver_purge_host_options > () - 24usize] ; ["Alignment of aws_host_resolver_purge_host_options"] [:: std :: mem :: align_of :: < aws_host_resolver_purge_host_options > () - 8usize] ; ["Offset of field: aws_host_resolver_purge_host_options::host"] [:: std :: mem :: offset_of ! (aws_host_resolver_purge_host_options , host) - 0usize] ; ["Offset of field: aws_host_resolver_purge_host_options::on_host_purge_complete_callback"] [:: std :: mem :: offset_of ! (aws_host_resolver_purge_host_options , on_host_purge_complete_callback) - 8usize] ; ["Offset of field: aws_host_resolver_purge_host_options::user_data"] [:: std :: mem :: offset_of ! (aws_host_resolver_purge_host_options , user_data) - 16usize] ; } ; impl Default for aws_host_resolver_purge_host_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 () } } } # [doc = " should you absolutely disdain the default implementation, feel free to implement your own."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_host_resolver_vtable { # [doc = " clean up everything you allocated, but not resolver itself."] pub destroy : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver) > , # [doc = " resolve the host by host_name, the user owns host_name, so it needs to be copied if you persist it,\n invoke res with the result. This function should never block."] pub resolve_host : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , host_name : * const aws_string , res : aws_on_host_resolved_result_fn , config : * const aws_host_resolution_config , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > , # [doc = " gives your implementation a hint that an address has some failed connections occuring. Do whatever you want (or\n nothing) about it."] pub record_connection_failure : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , address : * const aws_host_address) -> :: libc :: c_int > , # [doc = " @Deprecated Use purge_cache_with_callback instead\n wipe out anything you have cached."] pub purge_cache : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver) -> :: libc :: c_int > , # [doc = " wipe out anything you have cached."] pub purge_cache_with_callback : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , on_purge_cache_complete_callback : aws_simple_completion_callback , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > , # [doc = " wipe out anything cached for a specific host"] pub purge_host_cache : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , options : * const aws_host_resolver_purge_host_options) -> :: libc :: c_int > , # [doc = " get number of addresses for a given host."] pub get_host_address_count : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , host_name : * const aws_string , flags : u32) -> usize > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolver_vtable"] [:: std :: mem :: size_of :: < aws_host_resolver_vtable > () - 56usize] ; ["Alignment of aws_host_resolver_vtable"] [:: std :: mem :: align_of :: < aws_host_resolver_vtable > () - 8usize] ; ["Offset of field: aws_host_resolver_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , destroy) - 0usize] ; ["Offset of field: aws_host_resolver_vtable::resolve_host"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , resolve_host) - 8usize] ; ["Offset of field: aws_host_resolver_vtable::record_connection_failure"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , record_connection_failure) - 16usize] ; ["Offset of field: aws_host_resolver_vtable::purge_cache"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , purge_cache) - 24usize] ; ["Offset of field: aws_host_resolver_vtable::purge_cache_with_callback"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , purge_cache_with_callback) - 32usize] ; ["Offset of field: aws_host_resolver_vtable::purge_host_cache"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , purge_host_cache) - 40usize] ; ["Offset of field: aws_host_resolver_vtable::get_host_address_count"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , get_host_address_count) - 48usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_host_resolver { pub allocator : * mut aws_allocator , pub impl_ : * mut :: libc :: c_void , pub vtable : * mut aws_host_resolver_vtable , pub ref_count : aws_ref_count , pub shutdown_options : aws_shutdown_callback_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolver"] [:: std :: mem :: size_of :: < aws_host_resolver > () - 64usize] ; ["Alignment of aws_host_resolver"] [:: std :: mem :: align_of :: < aws_host_resolver > () - 8usize] ; ["Offset of field: aws_host_resolver::allocator"] [:: std :: mem :: offset_of ! (aws_host_resolver , allocator) - 0usize] ; ["Offset of field: aws_host_resolver::impl_"] [:: std :: mem :: offset_of ! (aws_host_resolver , impl_) - 8usize] ; ["Offset of field: aws_host_resolver::vtable"] [:: std :: mem :: offset_of ! (aws_host_resolver , vtable) - 16usize] ; ["Offset of field: aws_host_resolver::ref_count"] [:: std :: mem :: offset_of ! (aws_host_resolver , ref_count) - 24usize] ; ["Offset of field: aws_host_resolver::shutdown_options"] [:: std :: mem :: offset_of ! (aws_host_resolver , shutdown_options) - 48usize] ; } ; impl Default for aws_host_resolver { 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)] pub struct aws_host_resolver_default_options { pub max_entries : usize , pub el_group : * mut aws_event_loop_group , pub shutdown_options : * const aws_shutdown_callback_options , pub system_clock_override_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolver_default_options"] [:: std :: mem :: size_of :: < aws_host_resolver_default_options > () - 32usize] ; ["Alignment of aws_host_resolver_default_options"] [:: std :: mem :: align_of :: < aws_host_resolver_default_options > () - 8usize] ; ["Offset of field: aws_host_resolver_default_options::max_entries"] [:: std :: mem :: offset_of ! (aws_host_resolver_default_options , max_entries) - 0usize] ; ["Offset of field: aws_host_resolver_default_options::el_group"] [:: std :: mem :: offset_of ! (aws_host_resolver_default_options , el_group) - 8usize] ; ["Offset of field: aws_host_resolver_default_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_host_resolver_default_options , shutdown_options) - 16usize] ; ["Offset of field: aws_host_resolver_default_options::system_clock_override_fn"] [:: std :: mem :: offset_of ! (aws_host_resolver_default_options , system_clock_override_fn) - 24usize] ; } ; impl Default for aws_host_resolver_default_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 () } } } unsafe extern "C" { # [doc = " Copies `from` to `to`."] pub fn aws_host_address_copy (from : * const aws_host_address , to : * mut aws_host_address) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Moves `from` to `to`. After this call, from is no longer usable. Though, it could be resused for another\n move or copy operation."] pub fn aws_host_address_move (from : * mut aws_host_address , to : * mut aws_host_address) ; } unsafe extern "C" { # [doc = " Cleans up the memory for `address`"] pub fn aws_host_address_clean_up (address : * mut aws_host_address) ; } unsafe extern "C" { # [doc = " WARNING! do not call this function directly (getaddrinfo()): it blocks. Provide a pointer to this function for other\n resolution functions."] pub fn aws_default_dns_resolve (allocator : * mut aws_allocator , host_name : * const aws_string , output_addresses : * mut aws_array_list , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Creates a host resolver with the default behavior. Here's the behavior:\n\n Since there's not a reliable way to do non-blocking DNS without a ton of risky work that would need years of testing\n on every Unix system in existence, we work around it by doing a threaded implementation.\n\n When you request an address, it checks the cache. If the entry isn't in the cache it creates a new one.\n Each entry has a potentially short lived back-ground thread based on ttl for the records. Once we've populated the\n cache and you keep the resolver active, the resolution callback will be invoked immediately. When it's idle, it will\n take a little while in the background thread to fetch more, evaluate TTLs etc... In that case your callback will be\n invoked from the background thread.\n\n --------------------------------------------------------------------------------------------------------------------\n\n A few things to note about TTLs and connection failures.\n\n We attempt to honor your max ttl but will not honor it if dns queries are failing or all of your connections are\n marked as failed. Once we are able to query dns again, we will re-evaluate the TTLs.\n\n Upon notification connection failures, we move them to a separate list. Eventually we retry them when it's likely\n that the endpoint is healthy again or we don't really have another choice, but we try to keep them out of your\n hot path.\n\n ---------------------------------------------------------------------------------------------------------------------\n\n Finally, this entire design attempts to prevent problems where developers have to choose between large TTLs and thus\n sticky hosts or short TTLs and good fleet utilization but now higher latencies. In this design, we resolve every\n second in the background (only while you're actually using the record), but we do not expire the earlier resolved\n addresses until max ttl has passed.\n\n This for example, should enable you to hit thousands of hosts in the Amazon S3 fleet instead of just one or two."] pub fn aws_host_resolver_new_default (allocator : * mut aws_allocator , options : * const aws_host_resolver_default_options) -> * mut aws_host_resolver ; } unsafe extern "C" { # [doc = " Increments the reference count on the host resolver, allowing the caller to take a reference to it.\n\n Returns the same host resolver passed in."] pub fn aws_host_resolver_acquire (resolver : * mut aws_host_resolver) -> * mut aws_host_resolver ; } unsafe extern "C" { # [doc = " Decrements a host resolver's ref count.  When the ref count drops to zero, the resolver will be destroyed."] pub fn aws_host_resolver_release (resolver : * mut aws_host_resolver) ; } unsafe extern "C" { # [doc = " calls resolve_host on the vtable. config will be copied."] pub fn aws_host_resolver_resolve_host (resolver : * mut aws_host_resolver , host_name : * const aws_string , res : aws_on_host_resolved_result_fn , config : * const aws_host_resolution_config , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " calls record_connection_failure on the vtable."] pub fn aws_host_resolver_record_connection_failure (resolver : * mut aws_host_resolver , address : * const aws_host_address) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " @Deprecated Use purge_cache_with_callback instead\n calls purge_cache on the vtable."] pub fn aws_host_resolver_purge_cache (resolver : * mut aws_host_resolver) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Calls aws_host_resolver_purge_cache_with_callback on the vtable which will wipe out everything host resolver has\n cached."] pub fn aws_host_resolver_purge_cache_with_callback (resolver : * mut aws_host_resolver , on_purge_cache_complete_callback : aws_simple_completion_callback , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes the cache for a host asynchronously."] pub fn aws_host_resolver_purge_host_cache (resolver : * mut aws_host_resolver , options : * const aws_host_resolver_purge_host_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " get number of addresses for a given host."] pub fn aws_host_resolver_get_host_address_count (resolver : * mut aws_host_resolver , host_name : * const aws_string , flags : u32) -> usize ; } unsafe extern "C" { # [doc = " Returns the default host resolution config used internally if none specified.\n\n @return default host resolution config"] pub fn aws_host_resolver_init_default_resolution_config () -> aws_host_resolution_config ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_socket { _unused : [u8 ; 0] , } # [doc = " Generic event function for channel lifecycle events.\n\n Callbacks are provided for:\n   (1) Channel creation\n   (2) Channel setup - If TLS is being used, this function is called once the socket has connected, the channel has\n been initialized, and TLS has been successfully negotiated. A TLS handler has already been added to the channel. If\n TLS negotiation fails, this function will be called with the corresponding error code. If TLS is not being used, this\n function is called once the socket has connected and the channel has been initialized.\n   (3) Channel shutdown\n\n These callbacks are always invoked within the thread of the event-loop that the channel is assigned to.\n\n This function does NOT always imply \"success\" -- if error_code is AWS_OP_SUCCESS then everything was successful,\n otherwise an error condition occurred."] pub type aws_client_bootstrap_on_channel_event_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_client_bootstrap , error_code : :: libc :: c_int , channel : * mut aws_channel , user_data : * mut :: libc :: c_void) > ; # [doc = " If ALPN is being used this function will be invoked by the channel once an ALPN message is received. The returned\n channel_handler will be added to, and managed by, the channel."] pub type aws_channel_on_protocol_negotiated_fn = :: std :: option :: Option < unsafe extern "C" fn (new_slot : * mut aws_channel_slot , protocol : * mut aws_byte_buf , user_data : * mut :: libc :: c_void) -> * mut aws_channel_handler > ; # [doc = " Called after client bootstrap has been completely cleaned up, after its last refcount is released."] pub type aws_client_bootstrap_shutdown_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " aws_client_bootstrap handles creation and setup of channels that communicate via socket with a specific endpoint."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_client_bootstrap { pub allocator : * mut aws_allocator , pub event_loop_group : * mut aws_event_loop_group , pub host_resolver : * mut aws_host_resolver , pub host_resolver_config : aws_host_resolution_config , pub on_protocol_negotiated : aws_channel_on_protocol_negotiated_fn , pub ref_count : aws_ref_count , pub on_shutdown_complete : aws_client_bootstrap_shutdown_complete_fn , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_client_bootstrap"] [:: std :: mem :: size_of :: < aws_client_bootstrap > () - 104usize] ; ["Alignment of aws_client_bootstrap"] [:: std :: mem :: align_of :: < aws_client_bootstrap > () - 8usize] ; ["Offset of field: aws_client_bootstrap::allocator"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , allocator) - 0usize] ; ["Offset of field: aws_client_bootstrap::event_loop_group"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , event_loop_group) - 8usize] ; ["Offset of field: aws_client_bootstrap::host_resolver"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , host_resolver) - 16usize] ; ["Offset of field: aws_client_bootstrap::host_resolver_config"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , host_resolver_config) - 24usize] ; ["Offset of field: aws_client_bootstrap::on_protocol_negotiated"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , on_protocol_negotiated) - 56usize] ; ["Offset of field: aws_client_bootstrap::ref_count"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , ref_count) - 64usize] ; ["Offset of field: aws_client_bootstrap::on_shutdown_complete"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , on_shutdown_complete) - 88usize] ; ["Offset of field: aws_client_bootstrap::user_data"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , user_data) - 96usize] ; } ; impl Default for aws_client_bootstrap { 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 = " aws_client_bootstrap creation options."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_client_bootstrap_options { pub event_loop_group : * mut aws_event_loop_group , pub host_resolver : * mut aws_host_resolver , pub host_resolution_config : * const aws_host_resolution_config , pub on_shutdown_complete : aws_client_bootstrap_shutdown_complete_fn , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_client_bootstrap_options"] [:: std :: mem :: size_of :: < aws_client_bootstrap_options > () - 40usize] ; ["Alignment of aws_client_bootstrap_options"] [:: std :: mem :: align_of :: < aws_client_bootstrap_options > () - 8usize] ; ["Offset of field: aws_client_bootstrap_options::event_loop_group"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , event_loop_group) - 0usize] ; ["Offset of field: aws_client_bootstrap_options::host_resolver"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , host_resolver) - 8usize] ; ["Offset of field: aws_client_bootstrap_options::host_resolution_config"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , host_resolution_config) - 16usize] ; ["Offset of field: aws_client_bootstrap_options::on_shutdown_complete"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , on_shutdown_complete) - 24usize] ; ["Offset of field: aws_client_bootstrap_options::user_data"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , user_data) - 32usize] ; } ; impl Default for aws_client_bootstrap_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 () } } } # [doc = " If TLS is being used, this function is called once the socket has received an incoming connection, the channel has\n been initialized, and TLS has been successfully negotiated. A TLS handler has already been added to the channel. If\n TLS negotiation fails, this function will be called with the corresponding error code.\n\n If TLS is not being used, this function is called once the socket has received an incoming connection and the channel\n has been initialized.\n\n This function is always called within the thread of the event-loop that the new channel is assigned to upon success.\n\n On failure, the channel might not be assigned to an event loop yet, and will thus be invoked on the listener's\n event-loop thread.\n\n This function does NOT mean \"success\", if error_code is AWS_OP_SUCCESS then everything was successful, otherwise an\n error condition occurred.\n\n If an error occurred, you do not need to shutdown the channel. The `aws_channel_client_shutdown_callback` will be\n invoked once the channel has finished shutting down."] pub type aws_server_bootstrap_on_accept_channel_setup_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_server_bootstrap , error_code : :: libc :: c_int , channel : * mut aws_channel , user_data : * mut :: libc :: c_void) > ; # [doc = " Once the channel shuts down, this function will be invoked within the thread of\n the event-loop that the channel is assigned to.\n\n Note: this function is only invoked if the channel was successfully setup,\n e.g. aws_server_bootstrap_on_accept_channel_setup_fn() was invoked without an error code."] pub type aws_server_bootstrap_on_accept_channel_shutdown_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_server_bootstrap , error_code : :: libc :: c_int , channel : * mut aws_channel , user_data : * mut :: libc :: c_void) > ; # [doc = " This function is only used for async listener (Apple Network Framework in this case).\n Once the server listener socket is finished setup and starting listening, this fuction\n will be invoked."] pub type aws_server_bootstrap_on_listener_setup_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_server_bootstrap , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Once the server listener socket is finished destroying, and all the existing connections are closed, this fuction\n will be invoked."] pub type aws_server_bootstrap_on_server_listener_destroy_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_server_bootstrap , user_data : * mut :: libc :: c_void) > ; # [doc = " aws_server_bootstrap manages listening sockets, creating and setting up channels to handle each incoming connection."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_server_bootstrap { pub allocator : * mut aws_allocator , pub event_loop_group : * mut aws_event_loop_group , pub on_protocol_negotiated : aws_channel_on_protocol_negotiated_fn , pub ref_count : aws_ref_count , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_server_bootstrap"] [:: std :: mem :: size_of :: < aws_server_bootstrap > () - 48usize] ; ["Alignment of aws_server_bootstrap"] [:: std :: mem :: align_of :: < aws_server_bootstrap > () - 8usize] ; ["Offset of field: aws_server_bootstrap::allocator"] [:: std :: mem :: offset_of ! (aws_server_bootstrap , allocator) - 0usize] ; ["Offset of field: aws_server_bootstrap::event_loop_group"] [:: std :: mem :: offset_of ! (aws_server_bootstrap , event_loop_group) - 8usize] ; ["Offset of field: aws_server_bootstrap::on_protocol_negotiated"] [:: std :: mem :: offset_of ! (aws_server_bootstrap , on_protocol_negotiated) - 16usize] ; ["Offset of field: aws_server_bootstrap::ref_count"] [:: std :: mem :: offset_of ! (aws_server_bootstrap , ref_count) - 24usize] ; } ; impl Default for aws_server_bootstrap { 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 = " Socket-based channel creation options.\n\n bootstrap - configs name resolution and which event loop group the connection will be seated into\n host_name - host to connect to; if a dns address, will be resolved prior to connecting\n port - port to connect to\n socket_options - socket properties, including type (tcp vs. udp vs. unix domain) and connect timeout.  TLS\n   connections are currently restricted to tcp (AWS_SOCKET_STREAM) only.\n tls_options - (optional) tls context to apply after connection establishment.  If NULL, the connection will\n   not be protected by TLS.\n creation_callback - (optional) callback invoked when the channel is first created.  This is always right after\n   the connection was successfully established.  *Does NOT* get called if the initial connect failed.\n setup_callback - callback invoked once the channel is ready for use and TLS has been negotiated or if an error\n   is encountered\n shutdown_callback - callback invoked once the channel has shutdown.\n enable_read_back_pressure - controls whether or not back pressure will be applied in the channel\n user_data - arbitrary data to pass back to the various callbacks\n requested_event_loop - if set, the connection will be placed on the requested event loop rather than one\n  chosen internally from the bootstrap's associated event loop group.  It is an error to pass in an event loop\n  that is not associated with the bootstrap's event loop group.\n\n Immediately after the `shutdown_callback` returns, the channel is cleaned up automatically. All callbacks are invoked\n in the thread of the event-loop that the new channel is assigned to.\n"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_socket_channel_bootstrap_options { pub bootstrap : * mut aws_client_bootstrap , pub host_name : * const :: libc :: c_char , pub port : u32 , pub socket_options : * const aws_socket_options , pub tls_options : * const aws_tls_connection_options , pub creation_callback : aws_client_bootstrap_on_channel_event_fn , pub setup_callback : aws_client_bootstrap_on_channel_event_fn , pub shutdown_callback : aws_client_bootstrap_on_channel_event_fn , pub enable_read_back_pressure : bool , pub user_data : * mut :: libc :: c_void , pub requested_event_loop : * mut aws_event_loop , pub host_resolution_override_config : * const aws_host_resolution_config , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_socket_channel_bootstrap_options"] [:: std :: mem :: size_of :: < aws_socket_channel_bootstrap_options > () - 96usize] ; ["Alignment of aws_socket_channel_bootstrap_options"] [:: std :: mem :: align_of :: < aws_socket_channel_bootstrap_options > () - 8usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , bootstrap) - 0usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::host_name"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , host_name) - 8usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::port"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , port) - 16usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::socket_options"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , socket_options) - 24usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::tls_options"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , tls_options) - 32usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::creation_callback"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , creation_callback) - 40usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::setup_callback"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , setup_callback) - 48usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , shutdown_callback) - 56usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::enable_read_back_pressure"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , enable_read_back_pressure) - 64usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::user_data"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , user_data) - 72usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::requested_event_loop"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , requested_event_loop) - 80usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::host_resolution_override_config"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , host_resolution_override_config) - 88usize] ; } ; impl Default for aws_socket_channel_bootstrap_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 () } } } # [doc = " Arguments to setup a server socket listener which will also negotiate and configure TLS.\n This creates a socket listener bound to `host` and 'port' using socket options `options`, and TLS options\n `tls_options`. `incoming_callback` will be invoked once an incoming channel is ready for use and TLS is\n finished negotiating, or if an error is encountered. `shutdown_callback` will be invoked once the channel has\n shutdown. `destroy_callback` will be invoked after the server socket listener is destroyed, and all associated\n connections and channels have finished shutting down. Immediately after the `shutdown_callback` returns, the channel\n is cleaned up automatically. All callbacks are invoked in the thread of the event-loop that listener is assigned to.\n\n Upon shutdown of your application, you'll want to call `aws_server_bootstrap_destroy_socket_listener` with the return\n value from this function.\n\n The socket type in `options` must be AWS_SOCKET_STREAM if tls_options is set.\n DTLS is not currently supported for tls."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_server_socket_channel_bootstrap_options { pub bootstrap : * mut aws_server_bootstrap , pub host_name : * const :: libc :: c_char , pub port : u32 , pub socket_options : * const aws_socket_options , pub tls_options : * const aws_tls_connection_options , pub setup_callback : aws_server_bootstrap_on_listener_setup_fn , pub incoming_callback : aws_server_bootstrap_on_accept_channel_setup_fn , pub shutdown_callback : aws_server_bootstrap_on_accept_channel_shutdown_fn , pub destroy_callback : aws_server_bootstrap_on_server_listener_destroy_fn , pub enable_read_back_pressure : bool , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_server_socket_channel_bootstrap_options"] [:: std :: mem :: size_of :: < aws_server_socket_channel_bootstrap_options > () - 88usize] ; ["Alignment of aws_server_socket_channel_bootstrap_options"] [:: std :: mem :: align_of :: < aws_server_socket_channel_bootstrap_options > () - 8usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , bootstrap) - 0usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::host_name"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , host_name) - 8usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::port"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , port) - 16usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::socket_options"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , socket_options) - 24usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::tls_options"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , tls_options) - 32usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::setup_callback"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , setup_callback) - 40usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::incoming_callback"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , incoming_callback) - 48usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , shutdown_callback) - 56usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::destroy_callback"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , destroy_callback) - 64usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::enable_read_back_pressure"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , enable_read_back_pressure) - 72usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::user_data"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , user_data) - 80usize] ; } ; impl Default for aws_server_socket_channel_bootstrap_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 () } } } unsafe extern "C" { # [doc = " Create the client bootstrap."] pub fn aws_client_bootstrap_new (allocator : * mut aws_allocator , options : * const aws_client_bootstrap_options) -> * mut aws_client_bootstrap ; } unsafe extern "C" { # [doc = " Increments a client bootstrap's ref count, allowing the caller to take a reference to it.\n\n Returns the same client bootstrap passed in."] pub fn aws_client_bootstrap_acquire (bootstrap : * mut aws_client_bootstrap) -> * mut aws_client_bootstrap ; } unsafe extern "C" { # [doc = " Decrements a client bootstrap's ref count.  When the ref count drops to zero, the bootstrap will be destroyed."] pub fn aws_client_bootstrap_release (bootstrap : * mut aws_client_bootstrap) ; } unsafe extern "C" { # [doc = " When using TLS, if ALPN is used, this callback will be invoked from the channel. The returned handler will be added\n to the channel."] pub fn aws_client_bootstrap_set_alpn_callback (bootstrap : * mut aws_client_bootstrap , on_protocol_negotiated : aws_channel_on_protocol_negotiated_fn) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Sets up a client socket channel."] pub fn aws_client_bootstrap_new_socket_channel (options : * mut aws_socket_channel_bootstrap_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes the server bootstrap with `allocator` and `el_group`. This object manages listeners, server connections,\n and channels."] pub fn aws_server_bootstrap_new (allocator : * mut aws_allocator , el_group : * mut aws_event_loop_group) -> * mut aws_server_bootstrap ; } unsafe extern "C" { # [doc = " Increments a server bootstrap's ref count, allowing the caller to take a reference to it.\n\n Returns the same server bootstrap passed in."] pub fn aws_server_bootstrap_acquire (bootstrap : * mut aws_server_bootstrap) -> * mut aws_server_bootstrap ; } unsafe extern "C" { # [doc = " Decrements a server bootstrap's ref count.  When the ref count drops to zero, the bootstrap will be destroyed."] pub fn aws_server_bootstrap_release (bootstrap : * mut aws_server_bootstrap) ; } unsafe extern "C" { # [doc = " When using TLS, if ALPN is used, this callback will be invoked from the channel. The returned handler will be added\n to the channel."] pub fn aws_server_bootstrap_set_alpn_callback (bootstrap : * mut aws_server_bootstrap , on_protocol_negotiated : aws_channel_on_protocol_negotiated_fn) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Sets up a server socket listener. If you are planning on using TLS, use\n `aws_server_bootstrap_new_tls_socket_listener` instead. This creates a socket listener bound to `local_endpoint`\n using socket options `options`. `incoming_callback` will be invoked once an incoming channel is ready for use or if\n an error is encountered. `shutdown_callback` will be invoked once the channel has shutdown. `destroy_callback` will\n be invoked after the server socket listener is destroyed, and all associated connections and channels have finished\n shutting down. Immediately after the `shutdown_callback` returns, the channel is cleaned up automatically. All\n callbacks are invoked the thread of the event-loop that the listening socket is assigned to\n\n `setup_callback`. If set, the callback will be asynchronously invoked when the listener is ready for use. For Apple\n Network Framework, the listener is not usable until the callback is invoked. If the listener creation failed\n (return NULL), the `setup_callback` will not be invoked.\n\n Upon shutdown of your application, you'll want to call `aws_server_bootstrap_destroy_socket_listener` with the return\n value from this function.\n\n bootstrap_options is copied."] pub fn aws_server_bootstrap_new_socket_listener (bootstrap_options : * const aws_server_socket_channel_bootstrap_options) -> * mut aws_socket ; } unsafe extern "C" { # [doc = " Shuts down 'listener' and cleans up any resources associated with it. Any incoming channels on `listener` will still\n be active. `destroy_callback` will be invoked after the server socket listener is destroyed, and all associated\n connections and channels have finished shutting down."] pub fn aws_server_bootstrap_destroy_socket_listener (bootstrap : * mut aws_server_bootstrap , listener : * mut aws_socket) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop_options { _unused : [u8 ; 0] , } # [doc = " @internal"] pub type aws_event_loop_on_event_fn = :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , handle : * mut aws_io_handle , events : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " @internal"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_event_loop_vtable { pub start_destroy : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) > , pub complete_destroy : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) > , pub run : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) -> :: libc :: c_int > , pub stop : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) -> :: libc :: c_int > , pub wait_for_stop_completion : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) -> :: libc :: c_int > , pub schedule_task_now : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , task : * mut aws_task) > , pub schedule_task_now_serialized : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , task : * mut aws_task) > , pub schedule_task_future : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , task : * mut aws_task , run_at_nanos : u64) > , pub cancel_task : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , task : * mut aws_task) > , pub connect_to_io_completion_port : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , handle : * mut aws_io_handle) -> :: libc :: c_int > , pub subscribe_to_io_events : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , handle : * mut aws_io_handle , events : :: libc :: c_int , on_event : aws_event_loop_on_event_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > , pub unsubscribe_from_io_events : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , handle : * mut aws_io_handle) -> :: libc :: c_int > , pub free_io_event_resources : :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > , pub is_on_callers_thread : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) -> bool > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_event_loop_vtable"] [:: std :: mem :: size_of :: < aws_event_loop_vtable > () - 112usize] ; ["Alignment of aws_event_loop_vtable"] [:: std :: mem :: align_of :: < aws_event_loop_vtable > () - 8usize] ; ["Offset of field: aws_event_loop_vtable::start_destroy"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , start_destroy) - 0usize] ; ["Offset of field: aws_event_loop_vtable::complete_destroy"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , complete_destroy) - 8usize] ; ["Offset of field: aws_event_loop_vtable::run"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , run) - 16usize] ; ["Offset of field: aws_event_loop_vtable::stop"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , stop) - 24usize] ; ["Offset of field: aws_event_loop_vtable::wait_for_stop_completion"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , wait_for_stop_completion) - 32usize] ; ["Offset of field: aws_event_loop_vtable::schedule_task_now"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , schedule_task_now) - 40usize] ; ["Offset of field: aws_event_loop_vtable::schedule_task_now_serialized"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , schedule_task_now_serialized) - 48usize] ; ["Offset of field: aws_event_loop_vtable::schedule_task_future"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , schedule_task_future) - 56usize] ; ["Offset of field: aws_event_loop_vtable::cancel_task"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , cancel_task) - 64usize] ; ["Offset of field: aws_event_loop_vtable::connect_to_io_completion_port"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , connect_to_io_completion_port) - 72usize] ; ["Offset of field: aws_event_loop_vtable::subscribe_to_io_events"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , subscribe_to_io_events) - 80usize] ; ["Offset of field: aws_event_loop_vtable::unsubscribe_from_io_events"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , unsubscribe_from_io_events) - 88usize] ; ["Offset of field: aws_event_loop_vtable::free_io_event_resources"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , free_io_event_resources) - 96usize] ; ["Offset of field: aws_event_loop_vtable::is_on_callers_thread"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , is_on_callers_thread) - 104usize] ; } ; # [repr (u32)] # [non_exhaustive] # [doc = " Event Loop Type.  If set to `AWS_EVENT_LOOP_PLATFORM_DEFAULT`, the event loop will automatically use the platform’s\n default.\n\n Default Event Loop Type\n Linux       | AWS_EVENT_LOOP_EPOLL\n Windows     | AWS_EVENT_LOOP_IOCP\n BSD Variants| AWS_EVENT_LOOP_KQUEUE\n macOS       | AWS_EVENT_LOOP_KQUEUE\n iOS         | AWS_EVENT_LOOP_DISPATCH_QUEUE"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_event_loop_type { AWS_EVENT_LOOP_PLATFORM_DEFAULT = 0 , AWS_EVENT_LOOP_EPOLL = 1 , AWS_EVENT_LOOP_IOCP = 2 , AWS_EVENT_LOOP_KQUEUE = 3 , AWS_EVENT_LOOP_DISPATCH_QUEUE = 4 , } # [doc = " Event loop group configuration options"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop_group_options { # [doc = " How many event loops that event loop group should contain.  For most group types, this implies\n the creation and management of an analagous amount of managed threads"] pub loop_count : u16 , # [doc = " Event loop type. If the event loop type is set to AWS_EVENT_LOOP_PLATFORM_DEFAULT, the\n creation function will automatically use the platform’s default event loop type."] pub type_ : aws_event_loop_type , # [doc = " Optional callback to invoke when the event loop group finishes destruction."] pub shutdown_options : * const aws_shutdown_callback_options , # [doc = " Optional configuration to control how the event loop group's threads bind to CPU groups"] pub cpu_group : * const u16 , # [doc = " Override for the clock function that event loops should use.  Defaults to the system's high resolution\n timer.\n\n Do not bind this value to managed code; it is only used in timing-sensitive tests."] pub clock_override : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_event_loop_group_options"] [:: std :: mem :: size_of :: < aws_event_loop_group_options > () - 32usize] ; ["Alignment of aws_event_loop_group_options"] [:: std :: mem :: align_of :: < aws_event_loop_group_options > () - 8usize] ; ["Offset of field: aws_event_loop_group_options::loop_count"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , loop_count) - 0usize] ; ["Offset of field: aws_event_loop_group_options::type_"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , type_) - 4usize] ; ["Offset of field: aws_event_loop_group_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , shutdown_options) - 8usize] ; ["Offset of field: aws_event_loop_group_options::cpu_group"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , cpu_group) - 16usize] ; ["Offset of field: aws_event_loop_group_options::clock_override"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , clock_override) - 24usize] ; } ; impl Default for aws_event_loop_group_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 () } } } unsafe extern "C" { # [doc = " The event loop will schedule the task and run it on the event loop thread as soon as possible.\n Note that cancelled tasks may execute outside the event loop thread.\n This function may be called from outside or inside the event loop thread.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_event_loop_schedule_task_now (event_loop : * mut aws_event_loop , task : * mut aws_task) ; } unsafe extern "C" { # [doc = " Variant of aws_event_loop_schedule_task_now that forces all tasks to go through the cross thread task queue,\n guaranteeing that order-of-submission is order-of-execution.  If you need this guarantee, you must use this\n function; the base function contains short-circuiting logic that breaks ordering invariants.  Beyond that, all\n properties of aws_event_loop_schedule_task_now apply to this function as well.\n\n Serialization guarantee does not apply to task cancellation (which can occur out-of-order or even out-of-thread in\n certain cases)."] pub fn aws_event_loop_schedule_task_now_serialized (event_loop : * mut aws_event_loop , task : * mut aws_task) ; } unsafe extern "C" { # [doc = " The event loop will schedule the task and run it at the specified time.\n Use aws_event_loop_current_clock_time() to query the current time in nanoseconds.\n Note that cancelled tasks may execute outside the event loop thread.\n This function may be called from outside or inside the event loop thread.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_event_loop_schedule_task_future (event_loop : * mut aws_event_loop , task : * mut aws_task , run_at_nanos : u64) ; } unsafe extern "C" { # [doc = " Cancels task.\n This function must be called from the event loop's thread, and is only guaranteed\n to work properly on tasks scheduled from within the event loop's thread.\n The task will be executed with the AWS_TASK_STATUS_CANCELED status inside this call."] pub fn aws_event_loop_cancel_task (event_loop : * mut aws_event_loop , task : * mut aws_task) ; } unsafe extern "C" { # [doc = " Returns true if the event loop's thread is the same thread that called this function, otherwise false."] pub fn aws_event_loop_thread_is_callers_thread (event_loop : * mut aws_event_loop) -> bool ; } unsafe extern "C" { # [doc = " Gets the current timestamp for the event loop's clock, in nanoseconds. This function is thread-safe."] pub fn aws_event_loop_current_clock_time (event_loop : * const aws_event_loop , time_nanos : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Creation function for event loop groups."] pub fn aws_event_loop_group_new (allocator : * mut aws_allocator , options : * const aws_event_loop_group_options) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " Increments the reference count on the event loop group, allowing the caller to take a reference to it.\n\n Returns the same event loop group passed in."] pub fn aws_event_loop_group_acquire (el_group : * mut aws_event_loop_group) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " Decrements an event loop group's ref count.  When the ref count drops to zero, the event loop group will be\n destroyed."] pub fn aws_event_loop_group_release (el_group : * mut aws_event_loop_group) ; } unsafe extern "C" { # [doc = " Increments the reference count on the event loop group from event loop, allowing the caller to take a reference to\n it.\n\n Returns the base event loop group of the event loop, or null if the event loop does not belong to a group."] pub fn aws_event_loop_group_acquire_from_event_loop (event_loop : * mut aws_event_loop) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " Decrements the ref count of the event loop's base event loop group.  When the ref count drops to zero, the event loop\n group will be destroyed."] pub fn aws_event_loop_group_release_from_event_loop (event_loop : * mut aws_event_loop) ; } unsafe extern "C" { # [doc = " Returns the event loop at a particular index.  If the index is out of bounds, null is returned."] pub fn aws_event_loop_group_get_loop_at (el_group : * mut aws_event_loop_group , index : usize) -> * mut aws_event_loop ; } unsafe extern "C" { # [doc = " Gets the number of event loops managed by an event loop group."] pub fn aws_event_loop_group_get_loop_count (el_group : * const aws_event_loop_group) -> usize ; } unsafe extern "C" { # [doc = " Gets the event loop type used by an event loop group."] pub fn aws_event_loop_group_get_type (el_group : * const aws_event_loop_group) -> aws_event_loop_type ; } unsafe extern "C" { # [doc = " Fetches the next loop for use. The purpose is to enable load balancing across loops. You should not depend on how\n this load balancing is done as it is subject to change in the future. Currently it uses the \"best-of-two\" algorithm\n based on the load factor of each loop."] pub fn aws_event_loop_group_get_next_loop (el_group : * mut aws_event_loop_group) -> * mut aws_event_loop ; } unsafe extern "C" { # [doc = " @deprecated - use aws_event_loop_group_new() instead"] pub fn aws_event_loop_group_new_default (alloc : * mut aws_allocator , max_threads : u16 , shutdown_options : * const aws_shutdown_callback_options) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " @deprecated - use aws_event_loop_group_new() instead"] pub fn aws_event_loop_group_new_default_pinned_to_cpu_group (alloc : * mut aws_allocator , max_threads : u16 , cpu_group : u16 , shutdown_options : * const aws_shutdown_callback_options) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " @internal - Don't use outside of testing.\n\n Returns the opaque internal user data of an event loop.  Can be cast into a specific implementation by\n privileged consumers."] pub fn aws_event_loop_get_impl (event_loop : * mut aws_event_loop) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " @internal - Don't use outside of testing.\n\n Initializes the base structure used by all event loop implementations with test-oriented overrides."] pub fn aws_event_loop_new_base (allocator : * mut aws_allocator , clock : aws_io_clock_fn , vtable : * mut aws_event_loop_vtable , impl_ : * mut :: libc :: c_void) -> * mut aws_event_loop ; } unsafe extern "C" { # [doc = " @internal - Don't use outside of testing.\n\n Common cleanup code for all implementations.\n This is only called from the *destroy() function of event loop implementations."] pub fn aws_event_loop_clean_up_base (event_loop : * mut aws_event_loop) ; } unsafe extern "C" { # [doc = " @internal - Don't use outside of testing.\n\n Destroys an event loop implementation.\n If the event loop is still in a running state, this function will block waiting on the event loop to shutdown.\n If the event loop is shared by multiple threads then destroy must be called by exactly one thread. All other threads\n must ensure their API calls to the event loop happen-before the call to destroy.\n\n Internally, this calls aws_event_loop_start_destroy() followed by aws_event_loop_complete_destroy()"] pub fn aws_event_loop_destroy (event_loop : * mut aws_event_loop) ; } unsafe extern "C" { # [doc = " @internal\n\n Signals an event loop to begin its destruction process.  If an event loop's implementation of this API does anything,\n it must be quick and non-blocking.  Most event loop implementations have an empty implementation for this function."] pub fn aws_event_loop_start_destroy (event_loop : * mut aws_event_loop) ; } unsafe extern "C" { # [doc = " @internal\n\n Waits for an event loop to complete its destruction process.  aws_event_loop_start_destroy() must have been called\n previously for this function to not deadlock."] pub fn aws_event_loop_complete_destroy (event_loop : * mut aws_event_loop) ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_stream_seek_basis { AWS_SSB_BEGIN = 0 , AWS_SSB_END = 2 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_stream_status { pub is_end_of_stream : bool , pub is_valid : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_stream_status"] [:: std :: mem :: size_of :: < aws_stream_status > () - 2usize] ; ["Alignment of aws_stream_status"] [:: std :: mem :: align_of :: < aws_stream_status > () - 1usize] ; ["Offset of field: aws_stream_status::is_end_of_stream"] [:: std :: mem :: offset_of ! (aws_stream_status , is_end_of_stream) - 0usize] ; ["Offset of field: aws_stream_status::is_valid"] [:: std :: mem :: offset_of ! (aws_stream_status , is_valid) - 1usize] ; } ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_input_stream_vtable { pub seek : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream , offset : i64 , basis : aws_stream_seek_basis) -> :: libc :: c_int > , # [doc = " Stream as much data as will fit into the destination buffer and update its length.\n The destination buffer's capacity MUST NOT be changed.\n\n Return AWS_OP_SUCCESS if the read is successful.\n If AWS_OP_ERR is returned, the stream is assumed to be invalid and any data written to the buffer is ignored.\n\n If no more data is currently available, or the end of the stream has been reached, simply return AWS_OP_SUCCESS\n without touching the destination buffer."] pub read : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream , dest : * mut aws_byte_buf) -> :: libc :: c_int > , pub get_status : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream , status : * mut aws_stream_status) -> :: libc :: c_int > , pub get_length : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream , out_length : * mut i64) -> :: libc :: c_int > , # [doc = " Optional.\n If not set, the default aws_ref_count_acquire/release will be used.\n Set for high level language binding that has its own refcounting implementation and needs to be kept alive from\n C.\n If set, ref_count member will not be used."] pub acquire : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream) > , pub release : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_input_stream_vtable"] [:: std :: mem :: size_of :: < aws_input_stream_vtable > () - 48usize] ; ["Alignment of aws_input_stream_vtable"] [:: std :: mem :: align_of :: < aws_input_stream_vtable > () - 8usize] ; ["Offset of field: aws_input_stream_vtable::seek"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , seek) - 0usize] ; ["Offset of field: aws_input_stream_vtable::read"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , read) - 8usize] ; ["Offset of field: aws_input_stream_vtable::get_status"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , get_status) - 16usize] ; ["Offset of field: aws_input_stream_vtable::get_length"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , get_length) - 24usize] ; ["Offset of field: aws_input_stream_vtable::acquire"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , acquire) - 32usize] ; ["Offset of field: aws_input_stream_vtable::release"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , release) - 40usize] ; } ; # [doc = " Base class for input streams.\n Note: when you implement one input stream, the ref_count needs to be initialized to clean up the resource when\n reaches to zero."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_input_stream { pub impl_ : * mut :: libc :: c_void , pub vtable : * const aws_input_stream_vtable , pub ref_count : aws_ref_count , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_input_stream"] [:: std :: mem :: size_of :: < aws_input_stream > () - 40usize] ; ["Alignment of aws_input_stream"] [:: std :: mem :: align_of :: < aws_input_stream > () - 8usize] ; ["Offset of field: aws_input_stream::impl_"] [:: std :: mem :: offset_of ! (aws_input_stream , impl_) - 0usize] ; ["Offset of field: aws_input_stream::vtable"] [:: std :: mem :: offset_of ! (aws_input_stream , vtable) - 8usize] ; ["Offset of field: aws_input_stream::ref_count"] [:: std :: mem :: offset_of ! (aws_input_stream , ref_count) - 16usize] ; } ; impl Default for aws_input_stream { 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 () } } } unsafe extern "C" { # [doc = " Increments the reference count on the input stream, allowing the caller to take a reference to it.\n\n Returns the same input stream passed in."] pub fn aws_input_stream_acquire (stream : * mut aws_input_stream) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Decrements a input stream's ref count.  When the ref count drops to zero, the input stream will be destroyed.\n\n Returns NULL always."] pub fn aws_input_stream_release (stream : * mut aws_input_stream) -> * mut aws_input_stream ; } unsafe extern "C" { pub fn aws_input_stream_seek (stream : * mut aws_input_stream , offset : i64 , basis : aws_stream_seek_basis) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_input_stream_read (stream : * mut aws_input_stream , dest : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_input_stream_get_status (stream : * mut aws_input_stream , status : * mut aws_stream_status) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_input_stream_get_length (stream : * mut aws_input_stream , out_length : * mut i64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_input_stream_destroy (stream : * mut aws_input_stream) ; } unsafe extern "C" { pub fn aws_input_stream_new_from_cursor (allocator : * mut aws_allocator , cursor : * const aws_byte_cursor) -> * mut aws_input_stream ; } unsafe extern "C" { pub fn aws_input_stream_new_from_file (allocator : * mut aws_allocator , file_name : * const :: libc :: c_char) -> * mut aws_input_stream ; } unsafe extern "C" { pub fn aws_input_stream_new_from_open_file (allocator : * mut aws_allocator , file : * mut FILE) -> * mut aws_input_stream ; } # [doc = " Data representing a URI. uri_str is always allocated and filled in.\n The other portions are merely storing offsets into uri_str."] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 : u32 , pub path : aws_byte_cursor , pub query_string : aws_byte_cursor , pub path_and_query : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_uri"] [:: std :: mem :: size_of :: < aws_uri > () - 200usize] ; ["Alignment of aws_uri"] [:: std :: mem :: align_of :: < aws_uri > () - 8usize] ; ["Offset of field: aws_uri::self_size"] [:: std :: mem :: offset_of ! (aws_uri , self_size) - 0usize] ; ["Offset of field: aws_uri::allocator"] [:: std :: mem :: offset_of ! (aws_uri , allocator) - 8usize] ; ["Offset of field: aws_uri::uri_str"] [:: std :: mem :: offset_of ! (aws_uri , uri_str) - 16usize] ; ["Offset of field: aws_uri::scheme"] [:: std :: mem :: offset_of ! (aws_uri , scheme) - 48usize] ; ["Offset of field: aws_uri::authority"] [:: std :: mem :: offset_of ! (aws_uri , authority) - 64usize] ; ["Offset of field: aws_uri::userinfo"] [:: std :: mem :: offset_of ! (aws_uri , userinfo) - 80usize] ; ["Offset of field: aws_uri::user"] [:: std :: mem :: offset_of ! (aws_uri , user) - 96usize] ; ["Offset of field: aws_uri::password"] [:: std :: mem :: offset_of ! (aws_uri , password) - 112usize] ; ["Offset of field: aws_uri::host_name"] [:: std :: mem :: offset_of ! (aws_uri , host_name) - 128usize] ; ["Offset of field: aws_uri::port"] [:: std :: mem :: offset_of ! (aws_uri , port) - 144usize] ; ["Offset of field: aws_uri::path"] [:: std :: mem :: offset_of ! (aws_uri , path) - 152usize] ; ["Offset of field: aws_uri::query_string"] [:: std :: mem :: offset_of ! (aws_uri , query_string) - 168usize] ; ["Offset of field: aws_uri::path_and_query"] [:: std :: mem :: offset_of ! (aws_uri , path_and_query) - 184usize] ; } ; 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\n will be stored in key"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_uri_param { pub key : aws_byte_cursor , pub value : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_uri_param"] [:: std :: mem :: size_of :: < aws_uri_param > () - 32usize] ; ["Alignment of aws_uri_param"] [:: std :: mem :: align_of :: < aws_uri_param > () - 8usize] ; ["Offset of field: aws_uri_param::key"] [:: std :: mem :: offset_of ! (aws_uri_param , key) - 0usize] ; ["Offset of field: aws_uri_param::value"] [:: std :: mem :: offset_of ! (aws_uri_param , value) - 16usize] ; } ; 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\n be initialized before passing them to aws_uri_init().\n\n query_string and query_params are exclusive to each other. If you set\n query_string, do not prepend it with '?'"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_uri_builder_options { pub scheme : aws_byte_cursor , pub path : aws_byte_cursor , pub host_name : aws_byte_cursor , pub port : u32 , pub query_params : * mut aws_array_list , pub query_string : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_uri_builder_options"] [:: std :: mem :: size_of :: < aws_uri_builder_options > () - 80usize] ; ["Alignment of aws_uri_builder_options"] [:: std :: mem :: align_of :: < aws_uri_builder_options > () - 8usize] ; ["Offset of field: aws_uri_builder_options::scheme"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , scheme) - 0usize] ; ["Offset of field: aws_uri_builder_options::path"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , path) - 16usize] ; ["Offset of field: aws_uri_builder_options::host_name"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , host_name) - 32usize] ; ["Offset of field: aws_uri_builder_options::port"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , port) - 48usize] ; ["Offset of field: aws_uri_builder_options::query_params"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , query_params) - 56usize] ; ["Offset of field: aws_uri_builder_options::query_string"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , query_string) - 64usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Parses 'uri_str' and initializes uri. Returns AWS_OP_SUCCESS, on success, AWS_OP_ERR on failure.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes uri to values specified in options. Returns AWS_OP_SUCCESS, on success, AWS_OP_ERR on failure.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_uri_clean_up (uri : * mut aws_uri) ; } unsafe extern "C" { # [doc = " Returns the scheme portion of the uri (e.g. http, https, ftp, ftps, etc...). If the scheme was not present\n in the uri, the returned value will be empty. It is the users job to determine the appropriate defaults\n if this field is empty, based on protocol, port, etc..."] pub fn aws_uri_scheme (uri : * const aws_uri) -> * const aws_byte_cursor ; } unsafe extern "C" { # [doc = " Returns the authority portion of the uri (host[:port]). If it was not present, this was a request uri. In that\n case, the value will be empty."] pub fn aws_uri_authority (uri : * const aws_uri) -> * const aws_byte_cursor ; } unsafe extern "C" { # [doc = " Returns the path portion of the uri, including any leading '/'. If not present, this value will be empty."] pub fn aws_uri_path (uri : * const aws_uri) -> * const aws_byte_cursor ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Returns the port portion of the authority if it was present, otherwise, returns 0.\n 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) -> u32 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " For iterating over the params in the query string.\n `param` is an in/out argument used to track progress, it MUST be zeroed out to start.\n If true is returned, `param` contains the value of the next param.\n If false is returned, there are no further params.\n\n Edge cases:\n 1) Entries without '=' sign are treated as having a key and no value.\n    Example: First param in query string \"a&b=c\" has key=\"a\" value=\"\"\n\n 2) Blank entries are skipped.\n    Example: The only param in query string \"&&a=b\" is key=\"a\" value=\"b\""] pub fn aws_query_string_next_param (query_string : aws_byte_cursor , param : * mut aws_uri_param) -> bool ; } unsafe extern "C" { # [doc = " Parses query string and stores the parameters in 'out_params'. Returns AWS_OP_SUCCESS on success and\n AWS_OP_ERR on failure. The user is responsible for initializing out_params with item size of struct aws_query_param.\n The user is also responsible for cleaning up out_params when finished."] pub fn aws_query_string_params (query_string : aws_byte_cursor , out_params : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " For iterating over the params in the uri query string.\n `param` is an in/out argument used to track progress, it MUST be zeroed out to start.\n If true is returned, `param` contains the value of the next param.\n If false is returned, there are no further params.\n\n Edge cases:\n 1) Entries without '=' sign are treated as having a key and no value.\n    Example: First param in query string \"a&b=c\" has key=\"a\" value=\"\"\n\n 2) Blank entries are skipped.\n    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 ; } unsafe extern "C" { # [doc = " Parses query string and stores the parameters in 'out_params'. Returns AWS_OP_SUCCESS on success and\n AWS_OP_ERR on failure. The user is responsible for initializing out_params with item size of struct aws_query_param.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Writes the uri path encoding of a cursor to a buffer.  This is the modified version of rfc3986 used by\n sigv4 signing."] pub fn aws_byte_buf_append_encoding_uri_path (buffer : * mut aws_byte_buf , cursor : * const aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Writes the uri query param encoding (passthrough alnum + '-' '_' '~' '.') of a UTF-8 cursor to a buffer\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Writes the uri decoding of a UTF-8 cursor to a buffer,\n replacing %xx escapes by their single byte equivalent.\n 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) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_errors { AWS_ERROR_S3_MISSING_CONTENT_RANGE_HEADER = 14336 , AWS_ERROR_S3_INVALID_CONTENT_RANGE_HEADER = 14337 , AWS_ERROR_S3_MISSING_CONTENT_LENGTH_HEADER = 14338 , AWS_ERROR_S3_INVALID_CONTENT_LENGTH_HEADER = 14339 , AWS_ERROR_S3_MISSING_ETAG = 14340 , AWS_ERROR_S3_INTERNAL_ERROR = 14341 , AWS_ERROR_S3_SLOW_DOWN = 14342 , AWS_ERROR_S3_INVALID_RESPONSE_STATUS = 14343 , AWS_ERROR_S3_MISSING_UPLOAD_ID = 14344 , AWS_ERROR_S3_PROXY_PARSE_FAILED = 14345 , AWS_ERROR_S3_UNSUPPORTED_PROXY_SCHEME = 14346 , AWS_ERROR_S3_CANCELED = 14347 , AWS_ERROR_S3_INVALID_RANGE_HEADER = 14348 , AWS_ERROR_S3_MULTIRANGE_HEADER_UNSUPPORTED = 14349 , AWS_ERROR_S3_RESPONSE_CHECKSUM_MISMATCH = 14350 , AWS_ERROR_S3_CHECKSUM_CALCULATION_FAILED = 14351 , AWS_ERROR_S3_PAUSED = 14352 , AWS_ERROR_S3_LIST_PARTS_PARSE_FAILED = 14353 , AWS_ERROR_S3_RESUMED_PART_CHECKSUM_MISMATCH = 14354 , AWS_ERROR_S3_RESUME_FAILED = 14355 , AWS_ERROR_S3_OBJECT_MODIFIED = 14356 , AWS_ERROR_S3_NON_RECOVERABLE_ASYNC_ERROR = 14357 , AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE = 14358 , AWS_ERROR_S3_INCORRECT_CONTENT_LENGTH = 14359 , AWS_ERROR_S3_REQUEST_TIME_TOO_SKEWED = 14360 , AWS_ERROR_S3_FILE_MODIFIED = 14361 , AWS_ERROR_S3_EXCEEDS_MEMORY_LIMIT = 14362 , AWS_ERROR_S3_INVALID_MEMORY_LIMIT_CONFIG = 14363 , AWS_ERROR_S3EXPRESS_CREATE_SESSION_FAILED = 14364 , AWS_ERROR_S3_INTERNAL_PART_SIZE_MISMATCH_RETRYING_WITH_RANGE = 14365 , AWS_ERROR_S3_REQUEST_HAS_COMPLETED = 14366 , AWS_ERROR_S3_RECV_FILE_ALREADY_EXISTS = 14367 , AWS_ERROR_S3_RECV_FILE_NOT_FOUND = 14368 , AWS_ERROR_S3_REQUEST_TIMEOUT = 14369 , AWS_ERROR_S3_BUFFER_ALLOCATION_FAILED = 14370 , AWS_ERROR_S3_END_RANGE = 15359 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_subject { AWS_LS_S3_GENERAL = 14336 , AWS_LS_S3_CLIENT = 14337 , AWS_LS_S3_CLIENT_STATS = 14338 , AWS_LS_S3_REQUEST = 14339 , AWS_LS_S3_META_REQUEST = 14340 , AWS_LS_S3_ENDPOINT = 14341 , AWS_LS_S3_LAST = 15359 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_platform_info { pub instance_type : aws_byte_cursor , pub max_throughput_gbps : f64 , pub has_recommended_configuration : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_platform_info"] [:: std :: mem :: size_of :: < aws_s3_platform_info > () - 32usize] ; ["Alignment of aws_s3_platform_info"] [:: std :: mem :: align_of :: < aws_s3_platform_info > () - 8usize] ; ["Offset of field: aws_s3_platform_info::instance_type"] [:: std :: mem :: offset_of ! (aws_s3_platform_info , instance_type) - 0usize] ; ["Offset of field: aws_s3_platform_info::max_throughput_gbps"] [:: std :: mem :: offset_of ! (aws_s3_platform_info , max_throughput_gbps) - 16usize] ; ["Offset of field: aws_s3_platform_info::has_recommended_configuration"] [:: std :: mem :: offset_of ! (aws_s3_platform_info , has_recommended_configuration) - 24usize] ; } ; impl Default for aws_s3_platform_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 () } } } unsafe extern "C" { # [doc = " Initializes internal datastructures used by aws-c-s3.\n Must be called before using any functionality in aws-c-s3."] pub fn aws_s3_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Shuts down the internal datastructures used by aws-c-s3."] pub fn aws_s3_library_clean_up () ; } unsafe extern "C" { pub fn aws_s3_get_current_platform_info () -> * const aws_s3_platform_info ; } unsafe extern "C" { pub fn aws_s3_get_current_platform_ec2_intance_type (cached_only : bool) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_s3_get_platforms_with_recommended_config () -> aws_array_list ; } # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_s3_buffer_ticket { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_new (alloc : * mut aws_allocator) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_set_result_by_move (future : * mut aws_future_s3_buffer_ticket , pointer_address : * mut * mut aws_s3_buffer_ticket) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_get_result_by_move (future : * mut aws_future_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_peek_result (future : * const aws_future_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_acquire (future : * mut aws_future_s3_buffer_ticket) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_release (future : * mut aws_future_s3_buffer_ticket) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_set_error (future : * mut aws_future_s3_buffer_ticket , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_is_done (future : * const aws_future_s3_buffer_ticket) -> bool ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_get_error (future : * const aws_future_s3_buffer_ticket) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_register_callback (future : * mut aws_future_s3_buffer_ticket , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_register_callback_if_not_done (future : * mut aws_future_s3_buffer_ticket , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_register_event_loop_callback (future : * mut aws_future_s3_buffer_ticket , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_register_channel_callback (future : * mut aws_future_s3_buffer_ticket , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_wait (future : * mut aws_future_s3_buffer_ticket , timeout_ns : u64) -> bool ; } # [doc = " Meta information about ticket reservation request."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_buffer_pool_reserve_meta { pub client : * mut aws_s3_client , pub meta_request : * mut aws_s3_meta_request , pub size : usize , pub can_block : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_pool_reserve_meta"] [:: std :: mem :: size_of :: < aws_s3_buffer_pool_reserve_meta > () - 32usize] ; ["Alignment of aws_s3_buffer_pool_reserve_meta"] [:: std :: mem :: align_of :: < aws_s3_buffer_pool_reserve_meta > () - 8usize] ; ["Offset of field: aws_s3_buffer_pool_reserve_meta::client"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_reserve_meta , client) - 0usize] ; ["Offset of field: aws_s3_buffer_pool_reserve_meta::meta_request"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_reserve_meta , meta_request) - 8usize] ; ["Offset of field: aws_s3_buffer_pool_reserve_meta::size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_reserve_meta , size) - 16usize] ; ["Offset of field: aws_s3_buffer_pool_reserve_meta::can_block"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_reserve_meta , can_block) - 24usize] ; } ; impl Default for aws_s3_buffer_pool_reserve_meta { 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)] pub struct aws_s3_buffer_ticket_vtable { # [doc = " Get buffer associated with the ticket.\n Note: can be called multiple times and the same buffer should be returned. In some cases ticket might not be\n claimed at all."] pub claim : :: std :: option :: Option < unsafe extern "C" fn (ticket : * mut aws_s3_buffer_ticket) -> aws_byte_buf > , pub acquire : :: std :: option :: Option < unsafe extern "C" fn (ticket : * mut aws_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket > , pub release : :: std :: option :: Option < unsafe extern "C" fn (ticket : * mut aws_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_ticket_vtable"] [:: std :: mem :: size_of :: < aws_s3_buffer_ticket_vtable > () - 24usize] ; ["Alignment of aws_s3_buffer_ticket_vtable"] [:: std :: mem :: align_of :: < aws_s3_buffer_ticket_vtable > () - 8usize] ; ["Offset of field: aws_s3_buffer_ticket_vtable::claim"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket_vtable , claim) - 0usize] ; ["Offset of field: aws_s3_buffer_ticket_vtable::acquire"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket_vtable , acquire) - 8usize] ; ["Offset of field: aws_s3_buffer_ticket_vtable::release"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket_vtable , release) - 16usize] ; } ; # [doc = " Generic memory pool interface.\n Allows consumers of aws-c-s3 to override how buffer allocation for part buffers is done.\n Refer to docs/memory_aware_request_execution.md for details on how default implementation works.\n WARNING: this is currently experimental feature and does not provide API stability guarantees so should be used with\n caution. At highlevel the flow is as follows:\n - crt scheduler queues up requests to be prepared\n - requests being prepared will try to reserve mem (i.e. obtain a ticket) and wait until they get it before proceeding\n - once mem is reserved requests will proceed with the pipeline\n - request will acquire buffer from the ticket when needed\n - ticket is released when request is done with the buffer\n Note: in some cases pipeline can stall if new buffer cannot be allocated (ex. async writes flow).\n In this case reserve request will indicate that not granting the ticket can block and buffer pool should try to\n allocate ticket right away (or wait and call waker when mem is allocated for the case of async writes).\n Note for custom pool implementations: Scheduler keeps track of all outstanding futures and will error them out when\n request is paused or cancelled. Its still fine for memory pool implementation to deliver ticket (it will just be\n released by future right away with no side effects) or just ignore the future if its already in error state."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_buffer_ticket { pub vtable : * mut aws_s3_buffer_ticket_vtable , pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_ticket"] [:: std :: mem :: size_of :: < aws_s3_buffer_ticket > () - 40usize] ; ["Alignment of aws_s3_buffer_ticket"] [:: std :: mem :: align_of :: < aws_s3_buffer_ticket > () - 8usize] ; ["Offset of field: aws_s3_buffer_ticket::vtable"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket , vtable) - 0usize] ; ["Offset of field: aws_s3_buffer_ticket::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket , ref_count) - 8usize] ; ["Offset of field: aws_s3_buffer_ticket::impl_"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket , impl_) - 32usize] ; } ; impl Default for aws_s3_buffer_ticket { 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 () } } } unsafe extern "C" { pub fn aws_s3_buffer_ticket_claim (ticket : * mut aws_s3_buffer_ticket) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_s3_buffer_ticket_acquire (ticket : * mut aws_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket ; } unsafe extern "C" { pub fn aws_s3_buffer_ticket_release (ticket : * mut aws_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket ; } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_buffer_pool_vtable { pub reserve : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool , meta : aws_s3_buffer_pool_reserve_meta) -> * mut aws_future_s3_buffer_ticket > , # [doc = " Trim the pool. This is mostly a suggestion, which pool can decide to ignore. Triggered by CRT when\n client has been idle for some time."] pub trim : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool) > , # [doc = " Optimize the buffer pool for allocations of a specific size.\n Creates a separate list of blocks dedicated to this size for better memory efficiency."] pub add_special_size : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool , buffer_size : usize) -> :: libc :: c_int > , # [doc = " Release all special-sized blocks from the buffer pool.\n This frees all memory allocated for the special size optimization."] pub release_special_size : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool , buffer_size : usize) > , # [doc = " Align a range size to the buffer pool's allocation strategy.\n Returns the optimal aligned size based on the buffer pool's configuration."] pub derive_aligned_buffer_size : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool , size : u64) -> u64 > , pub acquire : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool) -> * mut aws_s3_buffer_pool > , pub release : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool) -> * mut aws_s3_buffer_pool > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_pool_vtable"] [:: std :: mem :: size_of :: < aws_s3_buffer_pool_vtable > () - 56usize] ; ["Alignment of aws_s3_buffer_pool_vtable"] [:: std :: mem :: align_of :: < aws_s3_buffer_pool_vtable > () - 8usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::reserve"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , reserve) - 0usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::trim"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , trim) - 8usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::add_special_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , add_special_size) - 16usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::release_special_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , release_special_size) - 24usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::derive_aligned_buffer_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , derive_aligned_buffer_size) - 32usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::acquire"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , acquire) - 40usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::release"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , release) - 48usize] ; } ; # [doc = " Polymorphic buffer pool."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_buffer_pool { pub vtable : * mut aws_s3_buffer_pool_vtable , pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_pool"] [:: std :: mem :: size_of :: < aws_s3_buffer_pool > () - 40usize] ; ["Alignment of aws_s3_buffer_pool"] [:: std :: mem :: align_of :: < aws_s3_buffer_pool > () - 8usize] ; ["Offset of field: aws_s3_buffer_pool::vtable"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool , vtable) - 0usize] ; ["Offset of field: aws_s3_buffer_pool::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool , ref_count) - 8usize] ; ["Offset of field: aws_s3_buffer_pool::impl_"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool , impl_) - 32usize] ; } ; impl Default for aws_s3_buffer_pool { 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 () } } } unsafe extern "C" { pub fn aws_s3_buffer_pool_reserve (buffer_pool : * mut aws_s3_buffer_pool , meta : aws_s3_buffer_pool_reserve_meta) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { pub fn aws_s3_buffer_pool_trim (buffer_pool : * mut aws_s3_buffer_pool) ; } unsafe extern "C" { pub fn aws_s3_buffer_pool_acquire (buffer_pool : * mut aws_s3_buffer_pool) -> * mut aws_s3_buffer_pool ; } unsafe extern "C" { pub fn aws_s3_buffer_pool_release (buffer_pool : * mut aws_s3_buffer_pool) -> * mut aws_s3_buffer_pool ; } # [doc = " Buffer pool configuration options."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_buffer_pool_config { pub client : * mut aws_s3_client , pub part_size : usize , pub max_part_size : usize , pub memory_limit : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_pool_config"] [:: std :: mem :: size_of :: < aws_s3_buffer_pool_config > () - 32usize] ; ["Alignment of aws_s3_buffer_pool_config"] [:: std :: mem :: align_of :: < aws_s3_buffer_pool_config > () - 8usize] ; ["Offset of field: aws_s3_buffer_pool_config::client"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_config , client) - 0usize] ; ["Offset of field: aws_s3_buffer_pool_config::part_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_config , part_size) - 8usize] ; ["Offset of field: aws_s3_buffer_pool_config::max_part_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_config , max_part_size) - 16usize] ; ["Offset of field: aws_s3_buffer_pool_config::memory_limit"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_config , memory_limit) - 24usize] ; } ; impl Default for aws_s3_buffer_pool_config { 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 = " Factory to construct the pool for the given config. Passes along buffer related info configured on the client, which\n factory may ignore when considering how to construct pool.\n This implementation should fail if pool cannot be constructed for some reason (ex. if config params cannot be met),\n by logging failure reason, returning null and raising aws_error."] pub type aws_s3_buffer_pool_factory_fn = :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , config : aws_s3_buffer_pool_config , user_data : * mut :: libc :: c_void) -> * mut aws_s3_buffer_pool > ; unsafe extern "C" { # [doc = " Optimize the buffer pool for allocations of a specific size.\n Creates a separate list of blocks dedicated to this size for better memory efficiency.\n Allocations of exactly this size will use these special blocks instead of the regular primary/secondary storage.\n\n @param buffer_pool The buffer pool to optimize\n @param buffer_size The size to optimize for (must be > 0)\n @return AWS_OP_SUCCESS on success, AWS_OP_ERR on failure"] pub fn aws_s3_buffer_pool_add_special_size (buffer_pool : * mut aws_s3_buffer_pool , buffer_size : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Release the special-sized blocks from the buffer pool.\n Should be called when done with the special-sized allocations.\n\n @param buffer_pool The buffer pool\n @param buffer_size The special size to release blocks for"] pub fn aws_s3_buffer_pool_release_special_size (buffer_pool : * mut aws_s3_buffer_pool , buffer_size : usize) ; } unsafe extern "C" { # [doc = " Align a range size to the buffer pool's allocation strategy.\n This function determines the optimal aligned size based on the buffer pool's configuration.\n For sizes within the primary allocation range, it aligns to chunk boundaries.\n For larger sizes that go to secondary storage, it returns the size as-is.\n\n @param buffer_pool The buffer pool to use for alignment (can be NULL, in which case size is returned unchanged)\n @param size The size to align\n @return The aligned size that's optimal for the buffer pool's allocation strategy"] pub fn aws_s3_buffer_pool_derive_aligned_buffer_size (buffer_pool : * mut aws_s3_buffer_pool , size : u64) -> u64 ; } pub type aws_should_sign_header_fn = :: std :: option :: Option < unsafe extern "C" fn (name : * const aws_byte_cursor , userdata : * mut :: libc :: c_void) -> bool > ; # [repr (u32)] # [non_exhaustive] # [doc = " A primitive RTTI indicator for signing configuration structs\n\n There must be one entry per config structure type and it's a fatal error\n to put the wrong value in the \"config_type\" member of your config structure."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_signing_config_type { AWS_SIGNING_CONFIG_AWS = 1 , } # [doc = " All signing configuration structs must match this by having\n the config_type member as the first member."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_signing_config_base { pub config_type : aws_signing_config_type , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_signing_config_base"] [:: std :: mem :: size_of :: < aws_signing_config_base > () - 4usize] ; ["Alignment of aws_signing_config_base"] [:: std :: mem :: align_of :: < aws_signing_config_base > () - 4usize] ; ["Offset of field: aws_signing_config_base::config_type"] [:: std :: mem :: offset_of ! (aws_signing_config_base , config_type) - 0usize] ; } ; impl Default for aws_signing_config_base { 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 (u32)] # [non_exhaustive] # [doc = " What version of the AWS signing process should we use."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_signing_algorithm { AWS_SIGNING_ALGORITHM_V4 = 0 , AWS_SIGNING_ALGORITHM_V4_ASYMMETRIC = 1 , AWS_SIGNING_ALGORITHM_V4_S3EXPRESS = 2 , } # [repr (u32)] # [non_exhaustive] # [doc = " What sort of signature should be computed from the signable?"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_signature_type { # [doc = " A signature for a full http request should be computed, with header updates applied to the signing result."] AWS_ST_HTTP_REQUEST_HEADERS = 0 , # [doc = " A signature for a full http request should be computed, with query param updates applied to the signing result."] AWS_ST_HTTP_REQUEST_QUERY_PARAMS = 1 , # [doc = " Compute a signature for a payload chunk. The signable's input stream should be the chunk data and the\n signable should contain the most recent signature value (either the original http request or the most recent\n chunk) in the \"previous-signature\" property."] AWS_ST_HTTP_REQUEST_CHUNK = 2 , # [doc = " Compute a signature for an event stream event. The signable's input stream should be the encoded event-stream\n message (headers + payload), the signable should contain the most recent signature value (either the original\n http request or the most recent event) in the \"previous-signature\" property.\n\n This option is only supported for Sigv4 for now."] AWS_ST_HTTP_REQUEST_EVENT = 3 , # [doc = " Compute a signature for an http request via it's already-computed canonical request.  Only the authorization\n signature header is added to the signing result."] AWS_ST_CANONICAL_REQUEST_HEADERS = 4 , # [doc = " Compute a signature for an http request via it's already-computed canonical request.  Only the authorization\n signature query param is added to the signing result."] AWS_ST_CANONICAL_REQUEST_QUERY_PARAMS = 5 , # [doc = " Compute a signature for the trailing headers.\n the signable should contain the most recent signature value (either the original http request or the most recent\n chunk) in the \"previous-signature\" property."] AWS_ST_HTTP_REQUEST_TRAILING_HEADERS = 6 , } unsafe extern "C" { # [doc = " The SHA-256 of an empty string:\n 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_empty_sha256 : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'UNSIGNED-PAYLOAD'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_unsigned_payload : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-UNSIGNED-PAYLOAD-TRAILER'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_unsigned_payload_trailer : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-HMAC-SHA256-PAYLOAD'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_aws4_hmac_sha256_payload : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-HMAC-SHA256-PAYLOAD-TRAILER'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_aws4_hmac_sha256_payload_trailer : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-ECDSA-P256-SHA256-PAYLOAD'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_aws4_ecdsa_p256_sha256_payload : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-ECDSA-P256-SHA256-PAYLOAD-TRAILER'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_aws4_ecdsa_p256_sha256_payload_trailer : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-HMAC-SHA256-EVENTS'\n For use with `aws_signing_config_aws.signed_body_value`.\n\n Event signing is only supported for Sigv4 for now."] pub static g_aws_signed_body_value_streaming_aws4_hmac_sha256_events : aws_byte_cursor ; } # [repr (u32)] # [non_exhaustive] # [doc = " Controls if signing adds a header containing the canonical request's body value"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_signed_body_header_type { # [doc = " Do not add a header"] AWS_SBHT_NONE = 0 , # [doc = " Add the \"x-amz-content-sha256\" header with the canonical request's body value"] AWS_SBHT_X_AMZ_CONTENT_SHA256 = 1 , } # [doc = " A configuration structure for use in AWS-related signing.  Currently covers sigv4 only, but is not required to."] # [repr (C)] pub struct aws_signing_config_aws { # [doc = " What kind of config structure is this?"] pub config_type : aws_signing_config_type , # [doc = " What signing algorithm to use."] pub algorithm : aws_signing_algorithm , # [doc = " What sort of signature should be computed?"] pub signature_type : aws_signature_type , pub region : aws_byte_cursor , # [doc = " name of service to sign a request for"] pub service : aws_byte_cursor , # [doc = " Raw date to use during the signing process."] pub date : aws_date_time , # [doc = " Optional function to control which headers are a part of the canonical request.\n Skipping auth-required headers will result in an unusable signature.  Headers injected by the signing process\n are not skippable.\n\n This function does not override the internal check function (x-amzn-trace-id, user-agent), but rather\n supplements it.  In particular, a header will get signed if and only if it returns true to both\n the internal check (skips x-amzn-trace-id, user-agent) and this function (if defined)."] pub should_sign_header : aws_should_sign_header_fn , pub should_sign_header_ud : * mut :: libc :: c_void , pub flags : aws_signing_config_aws__bindgen_ty_1 , # [doc = " Optional string to use as the canonical request's body value.\n If string is empty, a value will be calculated from the payload during signing.\n Typically, this is the SHA-256 of the (request/chunk/event) payload, written as lowercase hex.\n If this has been precalculated, it can be set here. Special values used by certain services can also be set\n (e.g. \"UNSIGNED-PAYLOAD\" \"STREAMING-AWS4-HMAC-SHA256-PAYLOAD\" \"STREAMING-AWS4-HMAC-SHA256-EVENTS\")."] pub signed_body_value : aws_byte_cursor , # [doc = " Controls what body \"hash\" header, if any, should be added to the canonical request and the signed request:\n   AWS_SBHT_NONE - no header should be added\n   AWS_SBHT_X_AMZ_CONTENT_SHA256 - the body \"hash\" should be added in the X-Amz-Content-Sha256 header"] pub signed_body_header : aws_signed_body_header_type , pub credentials : * const aws_credentials , pub credentials_provider : * mut aws_credentials_provider , # [doc = " If non-zero and the signing transform is query param, then signing will add X-Amz-Expires to the query\n string, equal to the value specified here.  If this value is zero or if header signing is being used then\n this parameter has no effect."] pub expiration_in_seconds : u64 , } # [repr (C)] # [repr (align (4))] # [derive (Debug , Default , Copy , Clone)] pub struct aws_signing_config_aws__bindgen_ty_1 { pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub __bindgen_padding_0 : [u8 ; 3usize] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_signing_config_aws__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_signing_config_aws__bindgen_ty_1 > () - 4usize] ; ["Alignment of aws_signing_config_aws__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_signing_config_aws__bindgen_ty_1 > () - 4usize] ; } ; impl aws_signing_config_aws__bindgen_ty_1 { # [inline] pub fn use_double_uri_encode (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_use_double_uri_encode (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn use_double_uri_encode_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_use_double_uri_encode_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn should_normalize_uri_path (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_should_normalize_uri_path (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub unsafe fn should_normalize_uri_path_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 1usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_should_normalize_uri_path_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 1usize , 1u8 , val as u64 ,) } } # [inline] pub fn omit_session_token (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_omit_session_token (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub unsafe fn omit_session_token_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 2usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_omit_session_token_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 2usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (use_double_uri_encode : u32 , should_normalize_uri_path : u32 , omit_session_token : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let use_double_uri_encode : u32 = unsafe { :: std :: mem :: transmute (use_double_uri_encode) } ; use_double_uri_encode as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let should_normalize_uri_path : u32 = unsafe { :: std :: mem :: transmute (should_normalize_uri_path) } ; should_normalize_uri_path as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let omit_session_token : u32 = unsafe { :: std :: mem :: transmute (omit_session_token) } ; omit_session_token as u64 }) ; __bindgen_bitfield_unit } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_signing_config_aws"] [:: std :: mem :: size_of :: < aws_signing_config_aws > () - 256usize] ; ["Alignment of aws_signing_config_aws"] [:: std :: mem :: align_of :: < aws_signing_config_aws > () - 8usize] ; ["Offset of field: aws_signing_config_aws::config_type"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , config_type) - 0usize] ; ["Offset of field: aws_signing_config_aws::algorithm"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , algorithm) - 4usize] ; ["Offset of field: aws_signing_config_aws::signature_type"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , signature_type) - 8usize] ; ["Offset of field: aws_signing_config_aws::region"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , region) - 16usize] ; ["Offset of field: aws_signing_config_aws::service"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , service) - 32usize] ; ["Offset of field: aws_signing_config_aws::date"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , date) - 48usize] ; ["Offset of field: aws_signing_config_aws::should_sign_header"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , should_sign_header) - 184usize] ; ["Offset of field: aws_signing_config_aws::should_sign_header_ud"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , should_sign_header_ud) - 192usize] ; ["Offset of field: aws_signing_config_aws::flags"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , flags) - 200usize] ; ["Offset of field: aws_signing_config_aws::signed_body_value"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , signed_body_value) - 208usize] ; ["Offset of field: aws_signing_config_aws::signed_body_header"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , signed_body_header) - 224usize] ; ["Offset of field: aws_signing_config_aws::credentials"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , credentials) - 232usize] ; ["Offset of field: aws_signing_config_aws::credentials_provider"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , credentials_provider) - 240usize] ; ["Offset of field: aws_signing_config_aws::expiration_in_seconds"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , expiration_in_seconds) - 248usize] ; } ; impl Default for aws_signing_config_aws { 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 () } } } unsafe extern "C" { # [doc = " Returns a c-string that describes the supplied signing algorithm\n\n @param algorithm signing algorithm to get a friendly string name for\n\n @return friendly string name of the supplied algorithm, or \"Unknown\" if the algorithm is not recognized"] pub fn aws_signing_algorithm_to_string (algorithm : aws_signing_algorithm) -> * const :: libc :: c_char ; } unsafe extern "C" { # [doc = " Checks a signing configuration for invalid settings combinations.\n\n @param config signing configuration to validate\n\n @return - AWS_OP_SUCCESS if the configuration is valid, AWS_OP_ERR otherwise"] pub fn aws_validate_aws_signing_config_aws (config : * const aws_signing_config_aws) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3express_credentials_provider { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_properties_s3express { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [doc = " A Meta Request represents a group of generated requests that are being done on behalf of the\n original request. For example, one large GetObject request can be transformed into a series\n of ranged GetObject requests that are executed in parallel to improve throughput.\n\n The aws_s3_meta_request_type is a hint of transformation to be applied."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_type { # [doc = " The Default meta request type sends any request to S3 as-is (with no transformation). For example,\n it can be used to pass a CreateBucket request."] AWS_S3_META_REQUEST_TYPE_DEFAULT = 0 , # [doc = " The GetObject request will be split into a series of ranged GetObject requests that are\n executed in parallel to improve throughput, when possible."] AWS_S3_META_REQUEST_TYPE_GET_OBJECT = 1 , # [doc = " The PutObject request will be split into MultiPart uploads that are executed in parallel\n to improve throughput, when possible.\n Note: put object supports both known and unknown body length. The client\n relies on Content-Length header to determine length of the body.\n Request with unknown content length are always sent using multipart\n upload regardless of final number of parts and do have the following limitations:\n - multipart threshold is ignored and all request are made through mpu,\n   even if they only need one part\n - pause/resume is not supported\n - meta request will throw error if checksum header is provider (due to\n   general limitation of checksum not being usable if meta request is\n   getting split)"] AWS_S3_META_REQUEST_TYPE_PUT_OBJECT = 2 , # [doc = " The CopyObject meta request performs a multi-part copy\n using multiple S3 UploadPartCopy requests in parallel, or bypasses\n a CopyObject request to S3 if the object size is not large enough for\n a multipart upload.\n Note: copy support is still in development and has following limitations:\n 1. host header must use virtual host addressing style (path style is not\n   supported) and both source and dest buckets must have dns compliant name\n 2. only {bucket}/{key} format is supported for source and passing arn as\n   source will not work\n 3. source bucket is assumed to be in the same region as dest\n 4. source bucket and dest bucket must both be either directory buckets or regular buckets.\n\n Provide the `meta_request_options.copy_source_uri` to bypass limitation 1 & 2."] AWS_S3_META_REQUEST_TYPE_COPY_OBJECT = 3 , # [doc = " The CopyObject meta request performs a multi-part copy\n using multiple S3 UploadPartCopy requests in parallel, or bypasses\n a CopyObject request to S3 if the object size is not large enough for\n a multipart upload.\n Note: copy support is still in development and has following limitations:\n 1. host header must use virtual host addressing style (path style is not\n   supported) and both source and dest buckets must have dns compliant name\n 2. only {bucket}/{key} format is supported for source and passing arn as\n   source will not work\n 3. source bucket is assumed to be in the same region as dest\n 4. source bucket and dest bucket must both be either directory buckets or regular buckets.\n\n Provide the `meta_request_options.copy_source_uri` to bypass limitation 1 & 2."] AWS_S3_META_REQUEST_TYPE_MAX = 4 , } impl aws_s3_request_type { pub const AWS_S3_REQUEST_TYPE_DEFAULT : aws_s3_request_type = aws_s3_request_type :: AWS_S3_REQUEST_TYPE_UNKNOWN ; } # [repr (u32)] # [non_exhaustive] # [doc = " The type of a single S3 HTTP request. Used by metrics.\n A meta-request can make multiple S3 HTTP requests under the hood.\n\n For example, AWS_S3_META_REQUEST_TYPE_PUT_OBJECT for a large file will\n do multipart upload, resulting in 3+ HTTP requests:\n AWS_S3_REQUEST_TYPE_CREATE_MULTIPART_UPLOAD, one or more AWS_S3_REQUEST_TYPE_UPLOAD_PART,\n and finally AWS_S3_REQUEST_TYPE_COMPLETE_MULTIPART_UPLOAD.\n\n aws_s3_request_type_operation_name() returns the S3 operation name\n for types that map (e.g. AWS_S3_REQUEST_TYPE_HEAD_OBJECT -> \"HeadObject\"),\n or empty string for types that don't map (e.g. AWS_S3_REQUEST_TYPE_UNKNOWN -> \"\")."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_request_type { AWS_S3_REQUEST_TYPE_UNKNOWN = 0 , AWS_S3_REQUEST_TYPE_HEAD_OBJECT = 1 , AWS_S3_REQUEST_TYPE_GET_OBJECT = 2 , AWS_S3_REQUEST_TYPE_LIST_PARTS = 3 , AWS_S3_REQUEST_TYPE_CREATE_MULTIPART_UPLOAD = 4 , AWS_S3_REQUEST_TYPE_UPLOAD_PART = 5 , AWS_S3_REQUEST_TYPE_ABORT_MULTIPART_UPLOAD = 6 , AWS_S3_REQUEST_TYPE_COMPLETE_MULTIPART_UPLOAD = 7 , AWS_S3_REQUEST_TYPE_UPLOAD_PART_COPY = 8 , AWS_S3_REQUEST_TYPE_COPY_OBJECT = 9 , AWS_S3_REQUEST_TYPE_PUT_OBJECT = 10 , AWS_S3_REQUEST_TYPE_CREATE_SESSION = 11 , AWS_S3_REQUEST_TYPE_MAX = 12 , } # [doc = " Invoked to provide response headers received during execution of the meta request, both for\n success and error HTTP status codes.\n\n Return AWS_OP_SUCCESS to continue processing the request.\n\n Return aws_raise_error(E) to cancel the request.\n The error you raise will be reflected in `aws_s3_meta_request_result.error_code`.\n If you're not sure which error to raise, use AWS_ERROR_S3_CANCELED."] pub type aws_s3_meta_request_headers_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , headers : * const aws_http_headers , response_status : :: libc :: c_int , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked to provide the response body as it is received.\n\n Note: If you set `enable_read_backpressure` true on the S3 client,\n you must maintain the flow-control window.\n The flow-control window shrinks as you receive body data via this callback.\n Whenever the flow-control window reaches 0 you will stop downloading data.\n Use aws_s3_meta_request_increment_read_window() to increment the window and keep data flowing.\n Maintain a larger window to keep up a high download throughput,\n parts cannot download in parallel unless the window is large enough to hold multiple parts.\n Maintain a smaller window to limit the amount of data buffered in memory.\n\n If `manual_window_management` is false, you do not need to maintain the flow-control window.\n No back-pressure is applied and data arrives as fast as possible.\n\n Return AWS_OP_SUCCESS to continue processing the request.\n\n Return aws_raise_error(E) to cancel the request.\n The error you raise will be reflected in `aws_s3_meta_request_result.error_code`.\n If you're not sure which error to raise, use AWS_ERROR_S3_CANCELED."] pub type aws_s3_meta_request_receive_body_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , body : * const aws_byte_cursor , range_start : u64 , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked when the entire meta request execution is complete."] pub type aws_s3_meta_request_finish_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , meta_request_result : * const aws_s3_meta_request_result , user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request_receive_body_extra_info { pub range_start : u64 , pub ticket : * mut aws_s3_buffer_ticket , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_receive_body_extra_info"] [:: std :: mem :: size_of :: < aws_s3_meta_request_receive_body_extra_info > () - 16usize] ; ["Alignment of aws_s3_meta_request_receive_body_extra_info"] [:: std :: mem :: align_of :: < aws_s3_meta_request_receive_body_extra_info > () - 8usize] ; ["Offset of field: aws_s3_meta_request_receive_body_extra_info::range_start"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_receive_body_extra_info , range_start) - 0usize] ; ["Offset of field: aws_s3_meta_request_receive_body_extra_info::ticket"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_receive_body_extra_info , ticket) - 8usize] ; } ; impl Default for aws_s3_meta_request_receive_body_extra_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 () } } } pub type aws_s3_meta_request_receive_body_callback_ex_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , body : * const aws_byte_cursor , info : aws_s3_meta_request_receive_body_extra_info , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Information sent in the meta_request progress callback."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_meta_request_progress { pub bytes_transferred : u64 , pub content_length : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_progress"] [:: std :: mem :: size_of :: < aws_s3_meta_request_progress > () - 16usize] ; ["Alignment of aws_s3_meta_request_progress"] [:: std :: mem :: align_of :: < aws_s3_meta_request_progress > () - 8usize] ; ["Offset of field: aws_s3_meta_request_progress::bytes_transferred"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_progress , bytes_transferred) - 0usize] ; ["Offset of field: aws_s3_meta_request_progress::content_length"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_progress , content_length) - 8usize] ; } ; # [doc = " Invoked to report progress of a meta-request.\n For PutObject, progress refers to bytes uploaded.\n For CopyObject, progress refers to bytes copied.\n For GetObject, progress refers to bytes downloaded.\n For anything else, progress refers to response body bytes received."] pub type aws_s3_meta_request_progress_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , progress : * const aws_s3_meta_request_progress , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked to report the telemetry of the meta request once a single request finishes.\n Note: *metrics is only valid for the duration of the callback. If you need to keep it around, use\n `aws_s3_request_metrics_acquire`"] pub type aws_s3_meta_request_telemetry_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , metrics : * mut aws_s3_request_metrics , user_data : * mut :: libc :: c_void) > ; pub type aws_s3_meta_request_shutdown_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; pub type aws_s3_client_shutdown_complete_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " Optional callback, for you to provide the full object checksum after the object was read.\n Client will NOT check the checksum provided before sending it to the server.\n\n @param meta_request  pointer to the aws_s3_meta_request of the upload.\n @param user_data     pointer to the user_data set.\n\n @return A new string with the full object checksum, as it is sent in a PutObject request (base64-encoded):\n         https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#API_PutObject_RequestSyntax\n         If an error occurs, call aws_raise_error(E) with a proper error code and return NULL."] pub type aws_s3_meta_request_full_object_checksum_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , user_data : * mut :: libc :: c_void) -> * mut aws_string > ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_tls_mode { AWS_MR_TLS_ENABLED = 0 , AWS_MR_TLS_DISABLED = 1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_compute_content_md5 { AWS_MR_CONTENT_MD5_DISABLED = 0 , AWS_MR_CONTENT_MD5_ENABLED = 1 , } impl aws_s3_checksum_algorithm { pub const AWS_SCA_CRC32C : aws_s3_checksum_algorithm = aws_s3_checksum_algorithm :: AWS_SCA_INIT ; } impl aws_s3_checksum_algorithm { pub const AWS_SCA_END : aws_s3_checksum_algorithm = aws_s3_checksum_algorithm :: AWS_SCA_CRC64NVME ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_checksum_algorithm { AWS_SCA_NONE = 0 , AWS_SCA_INIT = 1 , AWS_SCA_CRC32 = 2 , AWS_SCA_SHA1 = 3 , AWS_SCA_SHA256 = 4 , AWS_SCA_CRC64NVME = 5 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_checksum_location { AWS_SCL_NONE = 0 , AWS_SCL_HEADER = 1 , AWS_SCL_TRAILER = 2 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_recv_file_options { # [doc = " Create a new file if it doesn't exist, otherwise replace the existing file."] AWS_S3_RECV_FILE_CREATE_OR_REPLACE = 0 , # [doc = " Always create a new file. If the file already exists, AWS_ERROR_S3_RECV_FILE_ALREADY_EXISTS will be raised."] AWS_S3_RECV_FILE_CREATE_NEW = 1 , # [doc = " Create a new file if it doesn't exist, otherwise append to the existing file."] AWS_S3_RECV_FILE_CREATE_OR_APPEND = 2 , # [doc = " Write to an existing file at the specified position, defined by the `recv_file_position`.\n If the file does not exist, AWS_ERROR_S3_RECV_FILE_NOT_FOUND will be raised.\n If `recv_file_position` is not configured, start overwriting data at the beginning of the\n file (byte 0)."] AWS_S3_RECV_FILE_WRITE_TO_POSITION = 3 , } # [doc = " WARNING: experimental/unstable:\n Controls how client performance file I/O operations. Only applies to the file based workload."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_file_io_options { # [doc = " Skip buffering the part in memory before sending the request.\n\n Default to false on small objects, and true when the object size exceed a certain threshold\n`g_streaming_object_size_threshold`."] pub should_stream : bool , # [doc = " The estimated disk throughput. Only be applied when `streaming_upload` is true.\n in gigabits per second (Gbps).\n\n Notes: There are possibilities that cannot reach the all available disk throughput:\n 1. Disk is busy with other applications\n 2. OS Cache may cap the throughput, use `direct_io` to get around this.\n\n Default to throughput_target_gbps."] pub disk_throughput_gbps : f64 , # [doc = " Enable direct IO to bypass the OS cache. Helpful when the disk I/O outperforms the kernel cache.\n Notes:\n - Only supported on linux for now.\n - Only supports upload for now.\n - Check NOTES for O_DIRECT for additional info https://man7.org/linux/man-pages/man2/openat.2.html\n In summary, O_DIRECT is a potentially powerful tool that should be used with caution."] pub direct_io : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_file_io_options"] [:: std :: mem :: size_of :: < aws_s3_file_io_options > () - 24usize] ; ["Alignment of aws_s3_file_io_options"] [:: std :: mem :: align_of :: < aws_s3_file_io_options > () - 8usize] ; ["Offset of field: aws_s3_file_io_options::should_stream"] [:: std :: mem :: offset_of ! (aws_s3_file_io_options , should_stream) - 0usize] ; ["Offset of field: aws_s3_file_io_options::disk_throughput_gbps"] [:: std :: mem :: offset_of ! (aws_s3_file_io_options , disk_throughput_gbps) - 8usize] ; ["Offset of field: aws_s3_file_io_options::direct_io"] [:: std :: mem :: offset_of ! (aws_s3_file_io_options , direct_io) - 16usize] ; } ; # [doc = " Info about a single part, for you to review before the upload completes."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_part_review { pub size : u64 , pub checksum : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_review"] [:: std :: mem :: size_of :: < aws_s3_upload_part_review > () - 24usize] ; ["Alignment of aws_s3_upload_part_review"] [:: std :: mem :: align_of :: < aws_s3_upload_part_review > () - 8usize] ; ["Offset of field: aws_s3_upload_part_review::size"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_review , size) - 0usize] ; ["Offset of field: aws_s3_upload_part_review::checksum"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_review , checksum) - 8usize] ; } ; impl Default for aws_s3_upload_part_review { 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 = " Info for you to review before an upload completes.\n\n WARNING: This feature is experimental/unstable.\n At this time, review is only available for multipart upload\n (when Content-Length is above the `multipart_upload_threshold`,\n or Content-Length not specified)."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_review { pub checksum_algorithm : aws_s3_checksum_algorithm , pub part_count : usize , pub part_array : * mut aws_s3_upload_part_review , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_review"] [:: std :: mem :: size_of :: < aws_s3_upload_review > () - 24usize] ; ["Alignment of aws_s3_upload_review"] [:: std :: mem :: align_of :: < aws_s3_upload_review > () - 8usize] ; ["Offset of field: aws_s3_upload_review::checksum_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_upload_review , checksum_algorithm) - 0usize] ; ["Offset of field: aws_s3_upload_review::part_count"] [:: std :: mem :: offset_of ! (aws_s3_upload_review , part_count) - 8usize] ; ["Offset of field: aws_s3_upload_review::part_array"] [:: std :: mem :: offset_of ! (aws_s3_upload_review , part_array) - 16usize] ; } ; impl Default for aws_s3_upload_review { 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 = " Optional callback, for you to review an upload before it completes.\n For example, you can review each part's checksum and fail the upload if\n you do not agree with them.\n\n @param meta_request pointer to the aws_s3_meta_request of the upload.\n @param info Detailed info about the upload.\n\n Return AWS_OP_SUCCESS to continue processing the request.\n\n Return aws_raise_error(E) to cancel the request.\n The error you raise will be reflected in `aws_s3_meta_request_result.error_code`.\n If you're not sure which error to raise, use AWS_ERROR_S3_CANCELED.\n\n WARNING: This feature is experimental/unstable.\n At this time, the callback is only invoked for multipart upload\n (when Content-Length is above the `multipart_upload_threshold`,\n or Content-Length not specified)."] pub type aws_s3_meta_request_upload_review_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , review : * const aws_s3_upload_review , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " The factory function for S3 client to create a S3 Express credentials provider.\n The S3 client will be the only owner of the S3 Express credentials provider.\n\n During S3 client destruction, S3 client will start the destruction of the provider, and wait the\n on_provider_shutdown_callback to be invoked before the S3 client finish destruction.\n\n Note to implement the factory properly:\n - Make sure `on_provider_shutdown_callback` will be invoked after the provider finish shutdown, otherwise,\n leak will happen.\n - The provider must not acquire a reference to the client; otherwise, a circular reference will cause a deadlock.\n - The `client` provided CANNOT be used within the factory function call or the destructor.\n\n @param allocator    memory allocator to create the provider.\n @param client    The S3 client uses and owns the provider.\n @param on_provider_shutdown_callback    The callback to be invoked when the provider finishes shutdown.\n @param shutdown_user_data    The user data to invoke shutdown callback with\n @param user_data    The user data with the factory\n\n @return The aws_s3express_credentials_provider."] pub type aws_s3express_provider_factory_fn = :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , client : * mut aws_s3_client , on_provider_shutdown_callback : aws_simple_completion_callback , shutdown_user_data : * mut :: libc :: c_void , factory_user_data : * mut :: libc :: c_void) -> * mut aws_s3express_credentials_provider > ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_tcp_keep_alive_options { pub keep_alive_interval_sec : u16 , pub keep_alive_timeout_sec : u16 , pub keep_alive_max_failed_probes : u16 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_tcp_keep_alive_options"] [:: std :: mem :: size_of :: < aws_s3_tcp_keep_alive_options > () - 6usize] ; ["Alignment of aws_s3_tcp_keep_alive_options"] [:: std :: mem :: align_of :: < aws_s3_tcp_keep_alive_options > () - 2usize] ; ["Offset of field: aws_s3_tcp_keep_alive_options::keep_alive_interval_sec"] [:: std :: mem :: offset_of ! (aws_s3_tcp_keep_alive_options , keep_alive_interval_sec) - 0usize] ; ["Offset of field: aws_s3_tcp_keep_alive_options::keep_alive_timeout_sec"] [:: std :: mem :: offset_of ! (aws_s3_tcp_keep_alive_options , keep_alive_timeout_sec) - 2usize] ; ["Offset of field: aws_s3_tcp_keep_alive_options::keep_alive_max_failed_probes"] [:: std :: mem :: offset_of ! (aws_s3_tcp_keep_alive_options , keep_alive_max_failed_probes) - 4usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_client_config { pub max_active_connections_override : u32 , pub region : aws_byte_cursor , pub client_bootstrap : * mut aws_client_bootstrap , pub tls_mode : aws_s3_meta_request_tls_mode , pub tls_connection_options : * const aws_tls_connection_options , # [doc = " Optional.\n If set, this controls how the client interact with file I/O.\n Read `aws_s3_file_io_options` for details.\n  Notes: Only applies to meta requests with `send_filepath` set.\n  TODO: adapt it to `recv_filepath`.\n\n eg:\n - When the file is too large to fit in the buffer, set `should_stream` to avoid buffering the whole parts in\n  memory.\n - When the disk I/O is faster than OS cache, set `direct_io` to bypass the OS cache."] pub fio_opts : * mut aws_s3_file_io_options , # [doc = " Required.\n Configure the signing for the requests made from the client.\n - Credentials or credentials provider is required. Other configs are all optional, and will be default to what\n      needs to sign the request for S3, only overrides when Non-zero/Not-empty is set.\n - To skip signing, you can config it with anonymous credentials.\n - S3 Client will derive the right config for signing process based on this.\n\n Notes:\n - For AWS_SIGNING_ALGORITHM_V4_S3EXPRESS, S3 client will use the credentials in the config to derive the\n S3 Express credentials that are used in the signing process.\n - For other auth algorithm, client may make modifications to signing config before passing it on to signer.\n\n TODO: deprecate this structure from auth, introduce a new S3 specific one."] pub signing_config : * const aws_signing_config_aws , # [doc = " Optional.\n Size of parts the object will be downloaded or uploaded in, in bytes.\n This only affects AWS_S3_META_REQUEST_TYPE_GET_OBJECT and AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n\n If not set, a dynamic default part size will be used based on the throughput target, memory_limit_in_bytes.\n\n The client will adjust the part size for AWS_S3_META_REQUEST_TYPE_PUT_OBJECT if needed for service limits (max\n number of parts per upload is 10,000, minimum upload part size is 5 MiB).\n\n You can also set this per meta-request, via `aws_s3_meta_request_options.part_size`."] pub part_size : u64 , pub max_part_size : u64 , # [doc = " Optional.\n The size threshold in bytes for when to use multipart uploads.\n Uploads larger than this will use the multipart upload strategy.\n Uploads smaller or equal to this will use a single HTTP request.\n This only affects AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n If set, this should be at least `part_size`.\n If not set, maximal of `part_size` and 5 MiB will be used.\n\n You can also set this per meta-request, via `aws_s3_meta_request_options.multipart_upload_threshold`."] pub multipart_upload_threshold : u64 , pub throughput_target_gbps : f64 , pub memory_limit_in_bytes : u64 , pub retry_strategy : * mut aws_retry_strategy , # [doc = " TODO: move MD5 config to checksum config.\n For multi-part upload, content-md5 will be calculated if the AWS_MR_CONTENT_MD5_ENABLED is specified\n     or initial request has content-md5 header.\n For single-part upload, keep the content-md5 in the initial request unchanged."] pub compute_content_md5 : aws_s3_meta_request_compute_content_md5 , pub shutdown_callback : aws_s3_client_shutdown_complete_callback_fn , pub shutdown_callback_user_data : * mut :: libc :: c_void , # [doc = " Optional.\n Proxy configuration for http connection.\n If the connection_type is AWS_HPCT_HTTP_LEGACY, it will be converted to AWS_HPCT_HTTP_TUNNEL if tls_mode is\n ENABLED. Otherwise, it will be converted to AWS_HPCT_HTTP_FORWARD."] pub proxy_options : * const aws_http_proxy_options , # [doc = " Optional.\n Configuration for fetching proxy configuration from environment.\n By Default proxy_ev_settings.aws_http_proxy_env_var_type is set to AWS_HPEV_ENABLE which means read proxy\n configuration from environment.\n Only works when proxy_options is not set. If both are set, configuration from proxy_options is used."] pub proxy_ev_settings : * const proxy_env_var_settings , # [doc = " Optional.\n If set to 0, default value is used."] pub connect_timeout_ms : u32 , # [doc = " Optional.\n Set keepalive to periodically transmit messages for detecting a disconnected peer."] pub tcp_keep_alive_options : * const aws_s3_tcp_keep_alive_options , # [doc = " Optional.\n Configuration options for connection monitoring.\n If the transfer speed falls below the specified minimum_throughput_bytes_per_second, the operation is aborted.\n If set to NULL, default values are used."] pub monitoring_options : * const aws_http_connection_monitoring_options , # [doc = " Enable backpressure and prevent response data from downloading faster than you can handle it.\n\n If false (default), no backpressure is applied and data will download as fast as possible.\n\n If true, each meta request has a flow-control window that shrinks as\n response body data is downloaded (headers do not affect the window).\n `initial_read_window` determines the starting size of each meta request's window.\n\n - You will stop receiving response body data whenever the flow-control window reaches 0\n - If the window size remaining is smaller than the part download, client will buffer the part until\n   the window opens up to delivery the full part.\n - You must call aws_s3_meta_request_increment_read_window() to keep data flowing.\n\n WARNING: This feature is experimental.\n Currently, backpressure is only applied to GetObject requests which are split into multiple parts,\n - If you set body_callback, no more data will be delivered once the window reaches 0.\n - If you set body_callback_ex, you may still receive some data after the window reaches 0. TODO: fix it."] pub enable_read_backpressure : bool , # [doc = " The starting size of each meta request's flow-control window, in bytes.\n Ignored unless `enable_read_backpressure` is true."] pub initial_read_window : usize , # [doc = " To enable S3 Express support or not."] pub enable_s3express : bool , # [doc = " Optional.\n Only used when `enable_s3express` is set.\n\n If set, client will invoke the factory to get the provider to use, when needed.\n\n If not set, client will create a default S3 Express provider under the hood.\n\n NOTE: THE FOLLOWING BEHAVIOR IS EXPERIMENTAL AND UNSTABLE\n Default S3 Express provider will pass the headers allowed in `g_s3_create_session_allowed_headers` to the\n CreateSession call."] pub s3express_provider_override_factory : aws_s3express_provider_factory_fn , pub factory_user_data : * mut :: libc :: c_void , # [doc = " THIS IS AN EXPERIMENTAL AND UNSTABLE API\n (Optional)\n An array of network interface names. The client will distribute the\n connections across network interface names provided in this array. If any interface name is invalid, goes down,\n or has any issues like network access, you will see connection failures.\n\n This option is only supported on Linux, MacOS, and platforms that have either SO_BINDTODEVICE or IP_BOUND_IF. It\n is not supported on Windows. `AWS_ERROR_PLATFORM_NOT_SUPPORTED` will be raised on unsupported platforms. On\n Linux, SO_BINDTODEVICE is used and requires kernel version >= 5.7 or root privileges."] pub network_interface_names_array : * const aws_byte_cursor , pub num_network_interface_names : usize , # [doc = " Experimental (touch at your own risk).\n (Optional)\n Factory function to create buffer pool.\n if not set creates default implementation of the buffer pool."] pub buffer_pool_factory_fn : aws_s3_buffer_pool_factory_fn , pub buffer_pool_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client_config"] [:: std :: mem :: size_of :: < aws_s3_client_config > () - 248usize] ; ["Alignment of aws_s3_client_config"] [:: std :: mem :: align_of :: < aws_s3_client_config > () - 8usize] ; ["Offset of field: aws_s3_client_config::max_active_connections_override"] [:: std :: mem :: offset_of ! (aws_s3_client_config , max_active_connections_override) - 0usize] ; ["Offset of field: aws_s3_client_config::region"] [:: std :: mem :: offset_of ! (aws_s3_client_config , region) - 8usize] ; ["Offset of field: aws_s3_client_config::client_bootstrap"] [:: std :: mem :: offset_of ! (aws_s3_client_config , client_bootstrap) - 24usize] ; ["Offset of field: aws_s3_client_config::tls_mode"] [:: std :: mem :: offset_of ! (aws_s3_client_config , tls_mode) - 32usize] ; ["Offset of field: aws_s3_client_config::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_s3_client_config , tls_connection_options) - 40usize] ; ["Offset of field: aws_s3_client_config::fio_opts"] [:: std :: mem :: offset_of ! (aws_s3_client_config , fio_opts) - 48usize] ; ["Offset of field: aws_s3_client_config::signing_config"] [:: std :: mem :: offset_of ! (aws_s3_client_config , signing_config) - 56usize] ; ["Offset of field: aws_s3_client_config::part_size"] [:: std :: mem :: offset_of ! (aws_s3_client_config , part_size) - 64usize] ; ["Offset of field: aws_s3_client_config::max_part_size"] [:: std :: mem :: offset_of ! (aws_s3_client_config , max_part_size) - 72usize] ; ["Offset of field: aws_s3_client_config::multipart_upload_threshold"] [:: std :: mem :: offset_of ! (aws_s3_client_config , multipart_upload_threshold) - 80usize] ; ["Offset of field: aws_s3_client_config::throughput_target_gbps"] [:: std :: mem :: offset_of ! (aws_s3_client_config , throughput_target_gbps) - 88usize] ; ["Offset of field: aws_s3_client_config::memory_limit_in_bytes"] [:: std :: mem :: offset_of ! (aws_s3_client_config , memory_limit_in_bytes) - 96usize] ; ["Offset of field: aws_s3_client_config::retry_strategy"] [:: std :: mem :: offset_of ! (aws_s3_client_config , retry_strategy) - 104usize] ; ["Offset of field: aws_s3_client_config::compute_content_md5"] [:: std :: mem :: offset_of ! (aws_s3_client_config , compute_content_md5) - 112usize] ; ["Offset of field: aws_s3_client_config::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_client_config , shutdown_callback) - 120usize] ; ["Offset of field: aws_s3_client_config::shutdown_callback_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client_config , shutdown_callback_user_data) - 128usize] ; ["Offset of field: aws_s3_client_config::proxy_options"] [:: std :: mem :: offset_of ! (aws_s3_client_config , proxy_options) - 136usize] ; ["Offset of field: aws_s3_client_config::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_s3_client_config , proxy_ev_settings) - 144usize] ; ["Offset of field: aws_s3_client_config::connect_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_client_config , connect_timeout_ms) - 152usize] ; ["Offset of field: aws_s3_client_config::tcp_keep_alive_options"] [:: std :: mem :: offset_of ! (aws_s3_client_config , tcp_keep_alive_options) - 160usize] ; ["Offset of field: aws_s3_client_config::monitoring_options"] [:: std :: mem :: offset_of ! (aws_s3_client_config , monitoring_options) - 168usize] ; ["Offset of field: aws_s3_client_config::enable_read_backpressure"] [:: std :: mem :: offset_of ! (aws_s3_client_config , enable_read_backpressure) - 176usize] ; ["Offset of field: aws_s3_client_config::initial_read_window"] [:: std :: mem :: offset_of ! (aws_s3_client_config , initial_read_window) - 184usize] ; ["Offset of field: aws_s3_client_config::enable_s3express"] [:: std :: mem :: offset_of ! (aws_s3_client_config , enable_s3express) - 192usize] ; ["Offset of field: aws_s3_client_config::s3express_provider_override_factory"] [:: std :: mem :: offset_of ! (aws_s3_client_config , s3express_provider_override_factory) - 200usize] ; ["Offset of field: aws_s3_client_config::factory_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client_config , factory_user_data) - 208usize] ; ["Offset of field: aws_s3_client_config::network_interface_names_array"] [:: std :: mem :: offset_of ! (aws_s3_client_config , network_interface_names_array) - 216usize] ; ["Offset of field: aws_s3_client_config::num_network_interface_names"] [:: std :: mem :: offset_of ! (aws_s3_client_config , num_network_interface_names) - 224usize] ; ["Offset of field: aws_s3_client_config::buffer_pool_factory_fn"] [:: std :: mem :: offset_of ! (aws_s3_client_config , buffer_pool_factory_fn) - 232usize] ; ["Offset of field: aws_s3_client_config::buffer_pool_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client_config , buffer_pool_user_data) - 240usize] ; } ; impl Default for aws_s3_client_config { 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)] pub struct aws_s3_checksum_config { # [doc = " PUT Object specific *******************************/\n/**\n The location of client added checksum header.\n\n If AWS_SCL_NONE. No request payload checksum will be added.\n\n If AWS_SCL_HEADER, the client will calculate the checksum and add it to the headers.\n\n If AWS_SCL_TRAILER, the payload will be aws_chunked encoded, The client will calculate the checksum and add it to\n the trailer. Note the payload of the original request cannot be aws-chunked encoded already, this will cause an\n error."] pub location : aws_s3_checksum_location , # [doc = " The checksum algorithm used.\n Must be set if location is not AWS_SCL_NONE."] pub checksum_algorithm : aws_s3_checksum_algorithm , # [doc = " Optional.\n Provide the full object checksum. This callback is invoked once, after the entire body has been read.\n sent.\n\n NOTE:\n  - Do not set this callback if the HTTP message already has a checksum header (e.g. x-amz-checksum-crc32). Doing\n      so will raise AWS_ERROR_INVALID_ARGUMENT.\n  - checksum_algorithm must be set to the algorithm you will use.\n\n WARNING: This feature is experimental/unstable.\n At this time, full object checksum callback is only available for multipart upload\n (when Content-Length is above the `multipart_upload_threshold`,\n or Content-Length not specified). Otherwise, it will be ignored."] pub full_object_checksum_callback : aws_s3_meta_request_full_object_checksum_fn , pub user_data : * mut :: libc :: c_void , # [doc = " GET Object specific *******************************/\n/**\n Enable checksum mode header will be attached to GET requests, this will tell s3 to send back checksums headers if\n they exist. Calculate the corresponding checksum on the response bodies. The meta request will finish with a did\n validate field and set the error code to AWS_ERROR_S3_RESPONSE_CHECKSUM_MISMATCH if the calculated\n checksum, and checksum found in the response header do not match."] pub validate_response_checksum : bool , # [doc = " Optional array of `enum aws_s3_checksum_algorithm`.\n\n Ignored when validate_response_checksum is not set.\n If not set all the algorithms will be selected as default behavior.\n Owned by the caller.\n\n The list of algorithms for user to pick up when validate the checksum. Client will pick up the algorithm from the\n list with the priority based on performance, and the algorithm sent by server. The priority based on performance\n is [CRC64NVME, CRC32C, CRC32, SHA1, SHA256].\n\n If the response checksum was validated by client, the result will indicate which algorithm was picked."] pub validate_checksum_algorithms : * const aws_array_list , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_checksum_config"] [:: std :: mem :: size_of :: < aws_s3_checksum_config > () - 40usize] ; ["Alignment of aws_s3_checksum_config"] [:: std :: mem :: align_of :: < aws_s3_checksum_config > () - 8usize] ; ["Offset of field: aws_s3_checksum_config::location"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , location) - 0usize] ; ["Offset of field: aws_s3_checksum_config::checksum_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , checksum_algorithm) - 4usize] ; ["Offset of field: aws_s3_checksum_config::full_object_checksum_callback"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , full_object_checksum_callback) - 8usize] ; ["Offset of field: aws_s3_checksum_config::user_data"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , user_data) - 16usize] ; ["Offset of field: aws_s3_checksum_config::validate_response_checksum"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , validate_response_checksum) - 24usize] ; ["Offset of field: aws_s3_checksum_config::validate_checksum_algorithms"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , validate_checksum_algorithms) - 32usize] ; } ; impl Default for aws_s3_checksum_config { 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 a new meta request, ie, file transfer that will be handled by the high performance client.\n\n There are several ways to pass the request's body data:\n 1) If the data is already in memory, set the body-stream on `message`.\n 2) If the data is on disk, set `send_filepath` for best performance.\n 3) If the data is available, but copying each chunk is asynchronous, set `send_async_stream`.\n 4) If you're not sure when each chunk of data will be available, use `send_using_async_writes`."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request_options { pub type_ : aws_s3_meta_request_type , # [doc = " The S3 operation name (e.g. \"CreateBucket\").\n This MUST be set if type is AWS_S3_META_REQUEST_TYPE_DEFAULT;\n it is automatically populated for other meta-request types.\n The canonical operation names are listed here:\n https://docs.aws.amazon.com/AmazonS3/latest/API/API_Operations_Amazon_Simple_Storage_Service.html\n\n This name is used to fill out details in metrics and error reports.\n It also drives some operation-specific behavior.\n If you pass the wrong name, you risk getting the wrong behavior.\n\n For example, every operation except \"GetObject\" has its response checked\n for error, even if the HTTP status-code was 200 OK\n (see https://repost.aws/knowledge-center/s3-resolve-200-internalerror).\n If you used AWS_S3_META_REQUEST_TYPE_DEFAULT to do GetObject, but mis-named\n it \"Download\", and the object looked like XML with an error code,\n then the meta-request would fail. You may log the full response body,\n and leak sensitive data."] pub operation_name : aws_byte_cursor , # [doc = " Configure the signing for each request created for this meta request. If NULL, options in the client will be\n  used.\n - The credentials will be obtained based on the precedence of:\n      1. `credentials` from `signing_config` in `aws_s3_meta_request_options`\n      2. `credentials_provider` from `signing_config` in `aws_s3_meta_request_options`\n      3. `credentials` from `signing_config` cached in the client\n      4. `credentials_provider` cached in the client\n - To skip signing, you can config it with anonymous credentials.\n - S3 Client will derive the right config for signing process based on this.\n\n Notes:\n - For AWS_SIGNING_ALGORITHM_V4_S3EXPRESS, S3 client will use the credentials in the config to derive the\n S3 Express credentials that are used in the signing process.\n - For other auth algorithm, client may make modifications to signing config before passing it on to signer."] pub signing_config : * const aws_signing_config_aws , pub message : * mut aws_http_message , # [doc = " Optional.\n If set, the received data will be written into this file.\n the `body_callback` will NOT be invoked.\n This gives a better performance when receiving data to write to a file.\n See `aws_s3_recv_file_options` for the configuration on the receive file."] pub recv_filepath : aws_byte_cursor , # [doc = " Optional.\n Default to AWS_S3_RECV_FILE_CREATE_OR_REPLACE.\n This only works with recv_filepath set.\n See `aws_s3_recv_file_options`."] pub recv_file_option : aws_s3_recv_file_options , # [doc = " Optional.\n The specified position to start writing at for the recv file when `recv_file_option` is set to\n AWS_S3_RECV_FILE_WRITE_TO_POSITION, ignored otherwise."] pub recv_file_position : u64 , # [doc = " Set it to be true to delete the receive file on failure, otherwise, the file will be left as-is.\n This only works with recv_filepath set."] pub recv_file_delete_on_failure : bool , # [doc = " Optional.\n If set, this file is sent as the request body.\n This gives the best performance when sending data from a file.\n Do not set if the body is being passed by other means (see note above)."] pub send_filepath : aws_byte_cursor , # [doc = " Optional.\n Overrides the client config if set.\n If set, this controls how the meta request interact with file I/O.\n Read `aws_s3_file_io_options` for details.\n  Notes: Only applies when `send_filepath` is set.\n  TODO: adapt it to `recv_filepath`.\n\n Note: if both client and meta request don't set this, for objects larger than 2TiB, this will be set to a default\n options with `should_stream` to be True and others follow the default to avoid memory issues.\n\n eg:\n - When the file is too large to fit in the buffer, set `should_stream` to avoid buffering the whole parts in\n  memory.\n - When the disk I/O is faster than OS cache, set `direct_io` to bypass the OS cache."] pub fio_opts : * mut aws_s3_file_io_options , # [doc = " Optional - EXPERIMENTAL/UNSTABLE\n If set, the request body comes from this async stream.\n Use this when outgoing data will be produced in asynchronous chunks.\n The S3 client will read from the stream whenever it's ready to upload another chunk.\n\n WARNING: The S3 client can deadlock if many async streams are \"stalled\",\n never completing their async read. If you're not sure when (if ever)\n data will be ready, use `send_using_async_writes` instead.\n\n Do not set if the body is being passed by other means (see note above)."] pub send_async_stream : * mut aws_async_input_stream , # [doc = " Optional - EXPERIMENTAL/UNSTABLE\n Set this to send request body data using the async aws_s3_meta_request_poll_write()\n or aws_s3_meta_request_write() functions.\n Use this when outgoing data will be produced in asynchronous chunks,\n and you're not sure when (if ever) each chunk will be ready.\n\n This only works with AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n\n Do not set if the body is being passed by other means (see note above)."] pub send_using_async_writes : bool , # [doc = " Optional.\n if set, the flexible checksum will be performed by client based on the config.\n\n Notes: checksum can also be added through the http message provided.\n      The checksum in http header will override corresponding the checksum config."] pub checksum_config : * const aws_s3_checksum_config , # [doc = " Optional.\n Size of parts the object will be downloaded or uploaded in, in bytes.\n This only affects AWS_S3_META_REQUEST_TYPE_GET_OBJECT and AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n\n If not set, the value from `aws_s3_client_config.part_size` is used, which defaults to a dynamic value based on\n the throughput target, memory_limit_in_bytes and the requested object size.\n\n The client will adjust the part size for AWS_S3_META_REQUEST_TYPE_PUT_OBJECT if needed for service limits (max\n number of parts per upload is 10,000, minimum upload part size is 5 MiB)."] pub part_size : u64 , # [doc = " Optional - EXPERIMENTAL/UNSTABLE\n Set this to prefer for the dynamic default part_size over the part size set for both client and meta request for\n the best performance under the memory constrain, especially for getting large objects."] pub force_dynamic_part_size : bool , # [doc = " Optional.\n The size threshold in bytes for when to use multipart uploads.\n Uploads larger than this will use the multipart upload strategy.\n Uploads smaller or equal to this will use a single HTTP request.\n This only affects AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n If set, this should be at least `part_size`.\n If not set, `part_size` adjusted by client will be used as the threshold.\n If both `part_size` and `multipart_upload_threshold` are not set,\n the values from `aws_s3_client_config` are used."] pub multipart_upload_threshold : u64 , pub user_data : * mut :: libc :: c_void , # [doc = " Optional.\n Invoked to provide response headers received during execution of the meta request.\n Note: this callback will not be fired for cases when resuming an\n operation that was already completed (ex. pausing put object after it\n uploaded all data and then resuming it)\n See `aws_s3_meta_request_headers_callback_fn`."] pub headers_callback : aws_s3_meta_request_headers_callback_fn , # [doc = " Invoked to provide the response body as it is received.\n See `aws_s3_meta_request_receive_body_callback_fn`."] pub body_callback : aws_s3_meta_request_receive_body_callback_fn , # [doc = " Invoked to provide the response body as it is received.\n Provides extra information as compared to regular callback.\n Note: setting both body_callback and body_callback_ex is not\n considered valid and meta request creation will fail.\n See `aws_s3_meta_request_receive_body_callback_ex_fn`."] pub body_callback_ex : aws_s3_meta_request_receive_body_callback_ex_fn , # [doc = " Invoked when the entire meta request execution is complete.\n See `aws_s3_meta_request_finish_fn`."] pub finish_callback : aws_s3_meta_request_finish_fn , pub shutdown_callback : aws_s3_meta_request_shutdown_fn , # [doc = " Invoked to report progress of the meta request execution.\n See `aws_s3_meta_request_progress_fn`."] pub progress_callback : aws_s3_meta_request_progress_fn , # [doc = " Optional.\n To get telemetry metrics when a single request finishes.\n If set the request will keep track of the metrics from `aws_s3_request_metrics`, and fire the callback when the\n request finishes receiving response.\n See `aws_s3_meta_request_telemetry_fn`"] pub telemetry_callback : aws_s3_meta_request_telemetry_fn , # [doc = " Optional.\n Callback for reviewing an upload before it completes.\n WARNING: experimental/unstable\n See `aws_s3_meta_request_upload_review_fn`"] pub upload_review_callback : aws_s3_meta_request_upload_review_fn , # [doc = " Optional.\n Endpoint override for request. Can be used to override scheme and port of\n the endpoint.\n There is some overlap between Host header and Endpoint and corner cases\n are handled as follows:\n - Only Host header is set - Host is used to construct endpoint. https is\n   default with corresponding port\n - Only endpoint is set - Host header is created from endpoint. Port and\n   Scheme from endpoint is used.\n - Both Host and Endpoint is set - Host header must match Authority of\n   Endpoint uri. Port and Scheme from endpoint is used."] pub endpoint : * const aws_uri , # [doc = " Optional.\n For meta requests that support pause/resume (e.g. PutObject), serialized resume token returned by\n aws_s3_meta_request_pause() can be provided here.\n Note: If PutObject request specifies a checksum algorithm, client will calculate checksums while skipping parts\n from the buffer and compare them them to previously uploaded part checksums."] pub resume_token : * mut aws_s3_meta_request_resume_token , pub object_size_hint : * const u64 , pub copy_source_uri : aws_byte_cursor , pub max_active_connections_override : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_options"] [:: std :: mem :: size_of :: < aws_s3_meta_request_options > () - 272usize] ; ["Alignment of aws_s3_meta_request_options"] [:: std :: mem :: align_of :: < aws_s3_meta_request_options > () - 8usize] ; ["Offset of field: aws_s3_meta_request_options::type_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , type_) - 0usize] ; ["Offset of field: aws_s3_meta_request_options::operation_name"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , operation_name) - 8usize] ; ["Offset of field: aws_s3_meta_request_options::signing_config"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , signing_config) - 24usize] ; ["Offset of field: aws_s3_meta_request_options::message"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , message) - 32usize] ; ["Offset of field: aws_s3_meta_request_options::recv_filepath"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , recv_filepath) - 40usize] ; ["Offset of field: aws_s3_meta_request_options::recv_file_option"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , recv_file_option) - 56usize] ; ["Offset of field: aws_s3_meta_request_options::recv_file_position"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , recv_file_position) - 64usize] ; ["Offset of field: aws_s3_meta_request_options::recv_file_delete_on_failure"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , recv_file_delete_on_failure) - 72usize] ; ["Offset of field: aws_s3_meta_request_options::send_filepath"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , send_filepath) - 80usize] ; ["Offset of field: aws_s3_meta_request_options::fio_opts"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , fio_opts) - 96usize] ; ["Offset of field: aws_s3_meta_request_options::send_async_stream"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , send_async_stream) - 104usize] ; ["Offset of field: aws_s3_meta_request_options::send_using_async_writes"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , send_using_async_writes) - 112usize] ; ["Offset of field: aws_s3_meta_request_options::checksum_config"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , checksum_config) - 120usize] ; ["Offset of field: aws_s3_meta_request_options::part_size"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , part_size) - 128usize] ; ["Offset of field: aws_s3_meta_request_options::force_dynamic_part_size"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , force_dynamic_part_size) - 136usize] ; ["Offset of field: aws_s3_meta_request_options::multipart_upload_threshold"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , multipart_upload_threshold) - 144usize] ; ["Offset of field: aws_s3_meta_request_options::user_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , user_data) - 152usize] ; ["Offset of field: aws_s3_meta_request_options::headers_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , headers_callback) - 160usize] ; ["Offset of field: aws_s3_meta_request_options::body_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , body_callback) - 168usize] ; ["Offset of field: aws_s3_meta_request_options::body_callback_ex"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , body_callback_ex) - 176usize] ; ["Offset of field: aws_s3_meta_request_options::finish_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , finish_callback) - 184usize] ; ["Offset of field: aws_s3_meta_request_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , shutdown_callback) - 192usize] ; ["Offset of field: aws_s3_meta_request_options::progress_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , progress_callback) - 200usize] ; ["Offset of field: aws_s3_meta_request_options::telemetry_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , telemetry_callback) - 208usize] ; ["Offset of field: aws_s3_meta_request_options::upload_review_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , upload_review_callback) - 216usize] ; ["Offset of field: aws_s3_meta_request_options::endpoint"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , endpoint) - 224usize] ; ["Offset of field: aws_s3_meta_request_options::resume_token"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , resume_token) - 232usize] ; ["Offset of field: aws_s3_meta_request_options::object_size_hint"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , object_size_hint) - 240usize] ; ["Offset of field: aws_s3_meta_request_options::copy_source_uri"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , copy_source_uri) - 248usize] ; ["Offset of field: aws_s3_meta_request_options::max_active_connections_override"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , max_active_connections_override) - 264usize] ; } ; impl Default for aws_s3_meta_request_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)] pub struct aws_s3_meta_request_result { pub error_response_headers : * mut aws_http_headers , pub error_response_body : * mut aws_byte_buf , pub error_response_operation_name : * mut aws_string , pub response_status : :: libc :: c_int , pub did_validate : bool , pub validation_algorithm : aws_s3_checksum_algorithm , pub error_code : :: libc :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_result"] [:: std :: mem :: size_of :: < aws_s3_meta_request_result > () - 40usize] ; ["Alignment of aws_s3_meta_request_result"] [:: std :: mem :: align_of :: < aws_s3_meta_request_result > () - 8usize] ; ["Offset of field: aws_s3_meta_request_result::error_response_headers"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , error_response_headers) - 0usize] ; ["Offset of field: aws_s3_meta_request_result::error_response_body"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , error_response_body) - 8usize] ; ["Offset of field: aws_s3_meta_request_result::error_response_operation_name"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , error_response_operation_name) - 16usize] ; ["Offset of field: aws_s3_meta_request_result::response_status"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , response_status) - 24usize] ; ["Offset of field: aws_s3_meta_request_result::did_validate"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , did_validate) - 28usize] ; ["Offset of field: aws_s3_meta_request_result::validation_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , validation_algorithm) - 32usize] ; ["Offset of field: aws_s3_meta_request_result::error_code"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , error_code) - 36usize] ; } ; impl Default for aws_s3_meta_request_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 () } } } unsafe extern "C" { pub fn aws_s3_client_new (allocator : * mut aws_allocator , client_config : * const aws_s3_client_config) -> * mut aws_s3_client ; } unsafe extern "C" { # [doc = " Add a reference, keeping this object alive.\n The reference must be released when you are done with it, or it's memory will never be cleaned up.\n You must not pass in NULL.\n Always returns the same pointer that was passed in."] pub fn aws_s3_client_acquire (client : * mut aws_s3_client) -> * mut aws_s3_client ; } unsafe extern "C" { # [doc = " Release a reference.\n When the reference count drops to 0, this object will be cleaned up.\n It's OK to pass in NULL (nothing happens).\n Always returns NULL."] pub fn aws_s3_client_release (client : * mut aws_s3_client) -> * mut aws_s3_client ; } unsafe extern "C" { pub fn aws_s3_client_make_meta_request (client : * mut aws_s3_client , options : * const aws_s3_meta_request_options) -> * mut aws_s3_meta_request ; } # [doc = " The result of an `aws_s3_meta_request_poll_write()` call.\n Think of this like Rust's `Poll<Result<size_t, int>>`, or C++'s `optional<expected<size_t, int>>`."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_meta_request_poll_write_result { pub is_pending : bool , pub error_code : :: libc :: c_int , pub bytes_processed : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_poll_write_result"] [:: std :: mem :: size_of :: < aws_s3_meta_request_poll_write_result > () - 16usize] ; ["Alignment of aws_s3_meta_request_poll_write_result"] [:: std :: mem :: align_of :: < aws_s3_meta_request_poll_write_result > () - 8usize] ; ["Offset of field: aws_s3_meta_request_poll_write_result::is_pending"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_poll_write_result , is_pending) - 0usize] ; ["Offset of field: aws_s3_meta_request_poll_write_result::error_code"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_poll_write_result , error_code) - 4usize] ; ["Offset of field: aws_s3_meta_request_poll_write_result::bytes_processed"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_poll_write_result , bytes_processed) - 8usize] ; } ; unsafe extern "C" { # [doc = " Attempt to write data.\n\n You must set `aws_s3_meta_request_options.send_using_async_writes` to use this function.\n\n This is a non-blocking poll-style async function, similar to Rust's:\n https://docs.rs/futures/latest/futures/io/trait.AsyncWrite.html#tymethod.poll_write\n If you prefer completion-style async functions, and your data can outlive\n the callstack, use aws_s3_meta_request_write() instead.\n\n Check the returned `result` struct to see what happened:\n 1)   If `result.is_pending == true` then no work was done.\n      The waker callback will be invoked when you can call poll_write() again.\n      Do not call poll_write() again before the waker is invoked.\n\n 2)   Else if `result.error_code != 0` then poll_write() did not succeed\n      and you should not call it again. The meta request is guaranteed to finish soon\n      (you don't need to worry about canceling the meta request yourself after a failed write).\n      A common error code is AWS_ERROR_S3_REQUEST_HAS_COMPLETED, indicating\n      the meta request completed for reasons unrelated to the poll_write() call\n      (e.g. CreateMultipartUpload received a 403 Forbidden response).\n      AWS_ERROR_INVALID_STATE usually indicates that you're calling poll_write()\n      incorrectly (e.g. not waiting for waker callback from previous poll_write() call).\n\n 3)   Else `result.bytes_processed` tells you how much data was processed.\n      `bytes_processed` may be less than the `data.len` you passed in.\n      Continue calling poll_write() with the remaining data until everything is processed.\n      `result.bytes_processed` won't be 0 unless you passed in `data.len` of 0.\n\n @param meta_request  Meta request\n\n @param data          The data to send. The data can be any size.\n                      `result.bytes_processed` indicates how many bytes were\n                      processed by this call.\n\n @param eof           Pass true to signal EOF (end of file).\n                      If poll_write() doesn't process all your data\n                      (`result.is_pending` or `result.byte_processed < data.len`)\n                      then EOF was ignored, and you need to pass it again\n                      to subsequent poll_write() calls.\n\n @param waker         Waker callback.\n                      If `result.is_pending == true`, then the waker will be called\n                      exactly once when it's a good time to call poll_write() again.\n                      If `result.is_pending == false`, the waker will never be called.\n\n @param user_data     Pointer to be passed to the waker callback.\n\n WARNING: This feature is experimental."] pub fn aws_s3_meta_request_poll_write (meta_request : * mut aws_s3_meta_request , data : aws_byte_cursor , eof : bool , waker : aws_simple_completion_callback , user_data : * mut :: libc :: c_void) -> aws_s3_meta_request_poll_write_result ; } unsafe extern "C" { # [doc = " Write the next chunk of data.\n\n You must set `aws_s3_meta_request_options.send_using_async_writes` to use this function.\n\n This function is asynchronous, and returns a future (see <aws/io/future.h>).\n You may not call write() again until the future completes.\n\n If the future completes with an error code, then write() did not succeed\n and you should not call it again. If the future contains any error code,\n the meta request is guaranteed to finish soon (you don't need to worry about\n canceling the meta request yourself after a failed write).\n A common error code is AWS_ERROR_S3_REQUEST_HAS_COMPLETED, indicating\n the meta request completed for reasons unrelated to the write() call\n (e.g. CreateMultipartUpload received a 403 Forbidden response).\n AWS_ERROR_INVALID_STATE usually indicates that you're calling write()\n incorrectly (e.g. not waiting for previous write to complete).\n\n You MUST keep the data in memory until the future completes.\n If you cannot do this, use aws_s3_meta_request_poll_write() instead.\n\n You can wait any length of time between calls to write().\n If there's not enough data to upload a part, the data will be copied\n to a buffer and the future will immediately complete.\n\n @param meta_request  Meta request\n\n @param data          The data to send. The data can be any size.\n\n @param eof           Pass true to signal EOF (end of file).\n                      Do not call write() again after passing true.\n\n This function never returns NULL.\n\n WARNING: This feature is experimental."] pub fn aws_s3_meta_request_write (meta_request : * mut aws_s3_meta_request , data : aws_byte_cursor , eof : bool) -> * mut aws_future_void ; } unsafe extern "C" { # [doc = " Increment the flow-control window, so that response data continues downloading.\n\n If the client was created with `enable_read_backpressure` set true,\n each meta request has a flow-control window that shrinks as response\n body data is downloaded (headers do not affect the size of the window).\n The client's `initial_read_window` determines the starting size of each meta request's window.\n If a meta request's flow-control window reaches 0, no further data will be downloaded.\n If the `initial_read_window` is 0, the request will not start until the window is incremented.\n Maintain a larger window to keep up a high download throughput,\n parts cannot download in parallel unless the window is large enough to hold multiple parts.\n Maintain a smaller window to limit the amount of data buffered in memory.\n\n If `enable_read_backpressure` is false this call will have no effect,\n no backpressure is being applied and data is being downloaded as fast as possible.\n\n WARNING: This feature is experimental.\n Currently, backpressure is applied to GetObject requests,\n - If you set body_callback, no more data will be delivered once the window reaches 0.\n - If you set body_callback_ex, you may still receive some data after the window reaches 0. TODO: fix it."] pub fn aws_s3_meta_request_increment_read_window (meta_request : * mut aws_s3_meta_request , bytes : u64) ; } unsafe extern "C" { pub fn aws_s3_meta_request_cancel (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { # [doc = " Note: pause is currently only supported on upload requests.\n In order to pause an ongoing upload, call aws_s3_meta_request_pause() that\n will return resume token. Token can be used to query the state of operation\n at the pausing time.\n To resume an upload that was paused, supply resume token in the meta\n request options structure member aws_s3_meta_request_options.resume_token.\n The upload can be resumed either from the same client or a different one.\n Corner cases for resume upload are as follows:\n - upload is not MPU - fail with AWS_ERROR_UNSUPPORTED_OPERATION\n - pausing before MPU is created - NULL resume token returned. NULL resume\n   token is equivalent to restarting upload\n - pausing in the middle of part transfer - return resume token. scheduling of\n   new part uploads stops.\n - pausing after completeMPU started - return resume token. if s3 cannot find\n   find associated MPU id when resuming with that token and num of parts\n   uploaded equals to total num parts, then operation is a no op. Otherwise\n   operation fails.\n Note: for no op case the call will succeed and finish/shutdown request callbacks will\n   fire, but on headers callback will not fire.\n Note: similar to cancel pause does not cancel requests already in flight and\n and parts might complete after pause is requested.\n @param meta_request pointer to the aws_s3_meta_request of the upload to be paused\n @param resume_token resume token\n @return either AWS_OP_ERR or AWS_OP_SUCCESS"] pub fn aws_s3_meta_request_pause (meta_request : * mut aws_s3_meta_request , out_resume_token : * mut * mut aws_s3_meta_request_resume_token) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_resume_token_options { pub upload_id : aws_byte_cursor , pub part_size : u64 , pub total_num_parts : usize , # [doc = " Optional.\n\n Note: during resume num_parts_uploaded is used for sanity checking against\n uploads on s3 side.\n In cases where upload id does not exist (already resumed using this token\n or pause called after upload completes, etc...) and num_parts_uploaded\n equals to total num parts, resume will become a noop."] pub num_parts_completed : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_resume_token_options"] [:: std :: mem :: size_of :: < aws_s3_upload_resume_token_options > () - 40usize] ; ["Alignment of aws_s3_upload_resume_token_options"] [:: std :: mem :: align_of :: < aws_s3_upload_resume_token_options > () - 8usize] ; ["Offset of field: aws_s3_upload_resume_token_options::upload_id"] [:: std :: mem :: offset_of ! (aws_s3_upload_resume_token_options , upload_id) - 0usize] ; ["Offset of field: aws_s3_upload_resume_token_options::part_size"] [:: std :: mem :: offset_of ! (aws_s3_upload_resume_token_options , part_size) - 16usize] ; ["Offset of field: aws_s3_upload_resume_token_options::total_num_parts"] [:: std :: mem :: offset_of ! (aws_s3_upload_resume_token_options , total_num_parts) - 24usize] ; ["Offset of field: aws_s3_upload_resume_token_options::num_parts_completed"] [:: std :: mem :: offset_of ! (aws_s3_upload_resume_token_options , num_parts_completed) - 32usize] ; } ; impl Default for aws_s3_upload_resume_token_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 () } } } unsafe extern "C" { # [doc = " Create upload resume token from persisted data.\n Note: Data required for resume token varies per operation."] pub fn aws_s3_meta_request_resume_token_new_upload (allocator : * mut aws_allocator , options : * const aws_s3_upload_resume_token_options) -> * mut aws_s3_meta_request_resume_token ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_acquire (resume_token : * mut aws_s3_meta_request_resume_token) -> * mut aws_s3_meta_request_resume_token ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_release (resume_token : * mut aws_s3_meta_request_resume_token) -> * mut aws_s3_meta_request_resume_token ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_type (resume_token : * mut aws_s3_meta_request_resume_token) -> aws_s3_meta_request_type ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_part_size (resume_token : * mut aws_s3_meta_request_resume_token) -> u64 ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_total_num_parts (resume_token : * mut aws_s3_meta_request_resume_token) -> usize ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_num_parts_completed (resume_token : * mut aws_s3_meta_request_resume_token) -> usize ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_upload_id (resume_token : * mut aws_s3_meta_request_resume_token) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Add a reference, keeping this object alive.\n The reference must be released when you are done with it, or it's memory will never be cleaned up.\n You must not pass in NULL.\n Always returns the same pointer that was passed in."] pub fn aws_s3_meta_request_acquire (meta_request : * mut aws_s3_meta_request) -> * mut aws_s3_meta_request ; } unsafe extern "C" { # [doc = " Release a reference.\n When the reference count drops to 0, this object will be cleaned up.\n It's OK to pass in NULL (nothing happens).\n Always returns NULL."] pub fn aws_s3_meta_request_release (meta_request : * mut aws_s3_meta_request) -> * mut aws_s3_meta_request ; } unsafe extern "C" { # [doc = " Initialize the configuration for a default S3 signing."] pub fn aws_s3_init_default_signing_config (signing_config : * mut aws_signing_config_aws , region : aws_byte_cursor , credentials_provider : * mut aws_credentials_provider) ; } unsafe extern "C" { # [doc = " Return operation name for aws_s3_request_type,\n or empty string if the type doesn't map to an actual operation.\n For example:\n AWS_S3_REQUEST_TYPE_HEAD_OBJECT -> \"HeadObject\"\n AWS_S3_REQUEST_TYPE_UNKNOWN -> \"\"\n AWS_S3_REQUEST_TYPE_MAX -> \"\""] pub fn aws_s3_request_type_operation_name (type_ : aws_s3_request_type) -> * const :: libc :: c_char ; } unsafe extern "C" { # [doc = " Add a reference, keeping this object alive.\n The reference must be released when you are done with it, or it's memory will never be cleaned up.\n Always returns the same pointer that was passed in."] pub fn aws_s3_request_metrics_acquire (metrics : * mut aws_s3_request_metrics) -> * mut aws_s3_request_metrics ; } unsafe extern "C" { # [doc = " Release a reference.\n When the reference count drops to 0, this object will be cleaned up.\n It's OK to pass in NULL (nothing happens).\n Always returns NULL."] pub fn aws_s3_request_metrics_release (metrics : * mut aws_s3_request_metrics) -> * mut aws_s3_request_metrics ; } unsafe extern "C" { # [doc = "  Getters for s3 request metrics ************************************************/\n/**\n Get the request ID from aws_s3_request_metrics.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_request_id will be set to a string. Be warned this string's lifetime is tied to the metrics\n object."] pub fn aws_s3_request_metrics_get_request_id (metrics : * const aws_s3_request_metrics , out_request_id : * mut * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the extended request ID from aws_s3_request_metrics.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_extended_request_id will be set to a string. Be warned this string's lifetime is tied to the\n metrics object."] pub fn aws_s3_request_metrics_get_extended_request_id (metrics : * const aws_s3_request_metrics , out_extended_request_id : * mut * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_start_time : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_end_time : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_total_duration_ns (metrics : * const aws_s3_request_metrics , out_total_duration : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_send_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_send_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_send_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_send_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_sending_duration_ns (metrics : * const aws_s3_request_metrics , out_sending_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_receive_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_receive_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_receive_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_receive_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_sign_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_signing_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_sign_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_signing_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_signing_duration_ns (metrics : * const aws_s3_request_metrics , out_signing_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_mem_acquire_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_mem_acquire_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_mem_acquire_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_mem_acquire_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_mem_acquire_duration_ns (metrics : * const aws_s3_request_metrics , out_mem_acquire_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_delivery_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_delivery_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_delivery_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_delivery_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_delivery_duration_ns (metrics : * const aws_s3_request_metrics , out_delivery_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_receiving_duration_ns (metrics : * const aws_s3_request_metrics , out_receiving_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_response_status_code (metrics : * const aws_s3_request_metrics , out_response_status : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_response_headers (metrics : * const aws_s3_request_metrics , out_response_headers : * mut * mut aws_http_headers) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the path and query of the request.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_request_path_query will be set to a string. Be warned this string's lifetime is tied to the metrics\n object."] pub fn aws_s3_request_metrics_get_request_path_query (metrics : * const aws_s3_request_metrics , out_request_path_query : * mut * const aws_string) ; } unsafe extern "C" { # [doc = " Get the host_address of the request.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_host_address will be set to a string. Be warned this string's lifetime is tied to the metrics\n object."] pub fn aws_s3_request_metrics_get_host_address (metrics : * const aws_s3_request_metrics , out_host_address : * mut * const aws_string) ; } unsafe extern "C" { # [doc = " Get the IP address of the request connected to.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_ip_address will be set to a string. Be warned this string's lifetime is tied to the metrics object."] pub fn aws_s3_request_metrics_get_ip_address (metrics : * const aws_s3_request_metrics , out_ip_address : * mut * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_connection_id (metrics : * const aws_s3_request_metrics , out_connection_ptr : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_request_ptr (metrics : * const aws_s3_request_metrics , out_request_ptr : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_thread_id (metrics : * const aws_s3_request_metrics , out_thread_id : * mut aws_thread_id_t) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_request_stream_id (metrics : * const aws_s3_request_metrics , out_stream_id : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the S3 operation name of the request (e.g. \"HeadObject\").\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_operation_name will be set to a string.\n Be warned this string's lifetime is tied to the metrics object."] pub fn aws_s3_request_metrics_get_operation_name (metrics : * const aws_s3_request_metrics , out_operation_name : * mut * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_request_type (metrics : * const aws_s3_request_metrics , out_request_type : * mut aws_s3_request_type) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_error_code (metrics : * const aws_s3_request_metrics) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_retry_attempt (metrics : * const aws_s3_request_metrics) -> u32 ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_memory_allocated_from_pool (metrics : * const aws_s3_request_metrics) -> bool ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_part_range_start (metrics : * const aws_s3_request_metrics , out_part_range_start : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_part_range_end (metrics : * const aws_s3_request_metrics , out_part_range_end : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_part_number (metrics : * const aws_s3_request_metrics , out_part_number : * mut u32) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_s3_request_first_attempt_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_s3_request_first_attempt_start_time : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_s3_request_last_attempt_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_s3_request_last_attempt_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_s3_request_total_duration_ns (metrics : * const aws_s3_request_metrics , out_request_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_conn_acquire_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_conn_acquire_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_conn_acquire_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_conn_acquire_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_conn_acquire_duration_ns (metrics : * const aws_s3_request_metrics , out_conn_acquire_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_retry_delay_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_retry_delay_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_retry_delay_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_retry_delay_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_retry_delay_duration_ns (metrics : * const aws_s3_request_metrics , out_retry_delay_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_service_call_duration_ns (metrics : * const aws_s3_request_metrics , out_service_call_duration : * mut u64) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_request_context { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_rule_engine { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " Creates a new S3 endpoint resolver.\n Warning: Before using this header, you have to enable it by\n setting cmake config AWS_ENABLE_S3_ENDPOINT_RESOLVER=ON"] pub fn aws_s3_endpoint_resolver_new (allocator : * mut aws_allocator) -> * mut aws_endpoints_rule_engine ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_ruleset { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_partitions_config { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_parameter { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_resolved_endpoint { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_endpoints_parameter_type { AWS_ENDPOINTS_PARAMETER_STRING = 0 , AWS_ENDPOINTS_PARAMETER_BOOLEAN = 1 , AWS_ENDPOINTS_PARAMETER_STRING_ARRAY = 2 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_endpoints_resolved_endpoint_type { AWS_ENDPOINTS_RESOLVED_ENDPOINT = 0 , AWS_ENDPOINTS_RESOLVED_ERROR = 1 , } unsafe extern "C" { pub fn aws_endpoints_get_supported_ruleset_version () -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Warning: The following helpers are intended for use by SDKs that validate correctness of the ruleset at compile time.\n The engine sanity checks the provided ruleset, but does not do extensive checking.\n Some malformed rulesets might fail in unexpected ways."] pub fn aws_endpoints_parameter_get_type (parameter : * const aws_endpoints_parameter) -> aws_endpoints_parameter_type ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_built_in (parameter : * const aws_endpoints_parameter) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_default_string (parameter : * const aws_endpoints_parameter , out_cursor : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_default_boolean (parameter : * const aws_endpoints_parameter , out_bool : * mut * const bool) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_is_required (parameter : * const aws_endpoints_parameter) -> bool ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_documentation (parameter : * const aws_endpoints_parameter) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_parameters_get_is_deprecated (parameter : * const aws_endpoints_parameter) -> bool ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_deprecated_message (parameter : * const aws_endpoints_parameter) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_deprecated_since (parameter : * const aws_endpoints_parameter) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_new_from_string (allocator : * mut aws_allocator , ruleset_json : aws_byte_cursor) -> * mut aws_endpoints_ruleset ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_acquire (ruleset : * mut aws_endpoints_ruleset) -> * mut aws_endpoints_ruleset ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_release (ruleset : * mut aws_endpoints_ruleset) -> * mut aws_endpoints_ruleset ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_get_parameters (ruleset : * mut aws_endpoints_ruleset) -> * const aws_hash_table ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_get_version (ruleset : * const aws_endpoints_ruleset) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_get_service_id (ruleset : * const aws_endpoints_ruleset) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Create new rule engine for a given ruleset.\n In cases of failure NULL is returned and last error is set."] pub fn aws_endpoints_rule_engine_new (allocator : * mut aws_allocator , ruleset : * mut aws_endpoints_ruleset , partitions_config : * mut aws_partitions_config) -> * mut aws_endpoints_rule_engine ; } unsafe extern "C" { pub fn aws_endpoints_rule_engine_acquire (rule_engine : * mut aws_endpoints_rule_engine) -> * mut aws_endpoints_rule_engine ; } unsafe extern "C" { pub fn aws_endpoints_rule_engine_release (rule_engine : * mut aws_endpoints_rule_engine) -> * mut aws_endpoints_rule_engine ; } unsafe extern "C" { pub fn aws_endpoints_request_context_new (allocator : * mut aws_allocator) -> * mut aws_endpoints_request_context ; } unsafe extern "C" { pub fn aws_endpoints_request_context_acquire (request_context : * mut aws_endpoints_request_context) -> * mut aws_endpoints_request_context ; } unsafe extern "C" { pub fn aws_endpoints_request_context_release (request_context : * mut aws_endpoints_request_context) -> * mut aws_endpoints_request_context ; } unsafe extern "C" { pub fn aws_endpoints_request_context_add_string (allocator : * mut aws_allocator , context : * mut aws_endpoints_request_context , name : aws_byte_cursor , value : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_request_context_add_boolean (allocator : * mut aws_allocator , context : * mut aws_endpoints_request_context , name : aws_byte_cursor , value : bool) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_request_context_add_string_array (allocator : * mut aws_allocator , context : * mut aws_endpoints_request_context , name : aws_byte_cursor , value_array : * const aws_byte_cursor , len : usize) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_rule_engine_resolve (engine : * mut aws_endpoints_rule_engine , context : * const aws_endpoints_request_context , out_resolved_endpoint : * mut * mut aws_endpoints_resolved_endpoint) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_acquire (resolved_endpoint : * mut aws_endpoints_resolved_endpoint) -> * mut aws_endpoints_resolved_endpoint ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_release (resolved_endpoint : * mut aws_endpoints_resolved_endpoint) -> * mut aws_endpoints_resolved_endpoint ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_type (resolved_endpoint : * const aws_endpoints_resolved_endpoint) -> aws_endpoints_resolved_endpoint_type ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_url (resolved_endpoint : * const aws_endpoints_resolved_endpoint , out_url : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_properties (resolved_endpoint : * const aws_endpoints_resolved_endpoint , out_properties : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_headers (resolved_endpoint : * const aws_endpoints_resolved_endpoint , out_headers : * mut * const aws_hash_table) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_error (resolved_endpoint : * const aws_endpoints_resolved_endpoint , out_error : * mut aws_byte_cursor) -> :: libc :: c_int ; } pub const AWS_COMMON_HASH_TABLE_ITER_CONTINUE : _bindgen_ty_23 = _bindgen_ty_23 :: AWS_COMMON_HASH_TABLE_ITER_CONTINUE ; pub const AWS_COMMON_HASH_TABLE_ITER_DELETE : _bindgen_ty_23 = _bindgen_ty_23 :: AWS_COMMON_HASH_TABLE_ITER_DELETE ; pub const AWS_COMMON_HASH_TABLE_ITER_ERROR : _bindgen_ty_23 = _bindgen_ty_23 :: AWS_COMMON_HASH_TABLE_ITER_ERROR ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_23 { AWS_COMMON_HASH_TABLE_ITER_CONTINUE = 1 , AWS_COMMON_HASH_TABLE_ITER_DELETE = 2 , AWS_COMMON_HASH_TABLE_ITER_ERROR = 4 , } # [doc = " Hash table data structure. This module provides an automatically resizing\n hash table implementation for general purpose use. The hash table stores a\n mapping between void * keys and values; it is expected that in most cases,\n these will point to a structure elsewhere in the heap, instead of inlining a\n key or value into the hash table element itself.\n\n Currently, this hash table implements a variant of robin hood hashing, but\n we do not guarantee that this won't change in the future.\n\n Associated with each hash function are four callbacks:\n\n   hash_fn - A hash function from the keys to a uint64_t. It is critical that\n      the hash function for a key does not change while the key is in the hash\n      table; violating this results in undefined behavior. Collisions are\n      tolerated, though naturally with reduced performance.\n\n   equals_fn - An equality comparison function. This function must be\n      reflexive and consistent with hash_fn.\n\n   destroy_key_fn, destroy_value_fn - Optional callbacks invoked when the\n      table is cleared or cleaned up and at the caller's option when an element\n      is removed from the table. Either or both may be set to NULL, which\n      has the same effect as a no-op destroy function.\n\n This datastructure can be safely moved between threads, subject to the\n requirements of the underlying allocator. It is also safe to invoke\n non-mutating operations on the hash table from multiple threads. A suitable\n memory barrier must be used when transitioning from single-threaded mutating\n usage to multithreaded usage."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct hash_table_state { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_hash_table { pub p_impl : * mut hash_table_state , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash_table"] [:: std :: mem :: size_of :: < aws_hash_table > () - 8usize] ; ["Alignment of aws_hash_table"] [:: std :: mem :: align_of :: < aws_hash_table > () - 8usize] ; ["Offset of field: aws_hash_table::p_impl"] [:: std :: mem :: offset_of ! (aws_hash_table , p_impl) - 0usize] ; } ; 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\n table may provide pointers to elements stored within the hash table;\n generally, calling code may alter value, but must not alter key (or any\n information used to compute key's hash code).\n\n Pointers to elements within the hash are invalidated whenever an operation\n which may change the number of elements in the hash is invoked (i.e. put,\n delete, clear, and clean_up), regardless of whether the number of elements\n actually changes."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_hash_element { pub key : * const :: libc :: c_void , pub value : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash_element"] [:: std :: mem :: size_of :: < aws_hash_element > () - 16usize] ; ["Alignment of aws_hash_element"] [:: std :: mem :: align_of :: < aws_hash_element > () - 8usize] ; ["Offset of field: aws_hash_element::key"] [:: std :: mem :: offset_of ! (aws_hash_element , key) - 0usize] ; ["Offset of field: aws_hash_element::value"] [:: std :: mem :: offset_of ! (aws_hash_element , value) - 8usize] ; } ; 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 () } } } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_hash_iter_status { AWS_HASH_ITER_STATUS_DONE = 0 , AWS_HASH_ITER_STATUS_DELETE_CALLED = 1 , AWS_HASH_ITER_STATUS_READY_FOR_USE = 2 , } # [repr (C)] # [derive (Debug , Copy , Clone)] 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 : :: libc :: c_int , pub unused_1 : * mut :: libc :: c_void , pub unused_2 : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash_iter"] [:: std :: mem :: size_of :: < aws_hash_iter > () - 64usize] ; ["Alignment of aws_hash_iter"] [:: std :: mem :: align_of :: < aws_hash_iter > () - 8usize] ; ["Offset of field: aws_hash_iter::map"] [:: std :: mem :: offset_of ! (aws_hash_iter , map) - 0usize] ; ["Offset of field: aws_hash_iter::element"] [:: std :: mem :: offset_of ! (aws_hash_iter , element) - 8usize] ; ["Offset of field: aws_hash_iter::slot"] [:: std :: mem :: offset_of ! (aws_hash_iter , slot) - 24usize] ; ["Offset of field: aws_hash_iter::limit"] [:: std :: mem :: offset_of ! (aws_hash_iter , limit) - 32usize] ; ["Offset of field: aws_hash_iter::status"] [:: std :: mem :: offset_of ! (aws_hash_iter , status) - 40usize] ; ["Offset of field: aws_hash_iter::unused_0"] [:: std :: mem :: offset_of ! (aws_hash_iter , unused_0) - 44usize] ; ["Offset of field: aws_hash_iter::unused_1"] [:: std :: mem :: offset_of ! (aws_hash_iter , unused_1) - 48usize] ; ["Offset of field: aws_hash_iter::unused_2"] [:: std :: mem :: offset_of ! (aws_hash_iter , unused_2) - 56usize] ; } ; 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 :: libc :: c_void) -> u64 > ; # [doc = " Prototype for a hash table equality check function pointer.\n\n This type is usually used for a function that compares two hash table\n keys, but note that the same type is used for a function that compares\n two hash table values in aws_hash_table_eq.\n\n Equality functions used in a hash table must be be reflexive (a == a),\n symmetric (a == b => b == a), transitive (a == b, b == c => a == c)\n and consistent (result does not change with time)."] pub type aws_hash_callback_eq_fn = :: std :: option :: Option < unsafe extern "C" fn (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool > ; # [doc = " Prototype for a hash table key or value destructor function pointer.\n\n This function is used to destroy elements in the hash table when the\n table is cleared or cleaned up.\n\n Note that functions which remove individual elements from the hash\n table provide options of whether or not to invoke the destructors\n 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 :: libc :: c_void) > ; unsafe extern "C" { # [doc = " Initializes a hash map with initial capacity for 'size' elements\n without resizing. Uses hash_fn to compute the hash of each element.\n equals_fn to compute equality of two keys.  Whenever an element is\n removed without being returned, destroy_key_fn is run on the pointer\n to the key and destroy_value_fn is run on the pointer to the value.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Deletes every element from map and frees all associated memory.\n destroy_fn will be called for each element.  aws_hash_table_init\n must be called before reusing the hash table.\n\n This method is idempotent."] pub fn aws_hash_table_clean_up (map : * mut aws_hash_table) ; } unsafe extern "C" { # [doc = " Safely swaps two hash tables. Note that we swap the entirety of the hash\n table, including which allocator is associated.\n\n Neither hash table is required to be initialized; if one or both is\n uninitialized, then the uninitialized state is also swapped."] pub fn aws_hash_table_swap (a : * mut aws_hash_table , b : * mut aws_hash_table) ; } unsafe extern "C" { # [doc = " Moves the hash table in 'from' to 'to'. After this move, 'from' will\n be identical to the state of the original 'to' hash table, and 'to'\n will be in the same state as if it had been passed to aws_hash_table_clean_up\n (that is, it will have no memory allocated, and it will be safe to\n either discard it or call aws_hash_table_clean_up again).\n\n Note that 'to' will not be cleaned up. You should make sure that 'to'\n is either uninitialized or cleaned up before moving a hashtable into\n it."] pub fn aws_hash_table_move (to : * mut aws_hash_table , from : * mut aws_hash_table) ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Returns an iterator to be used for iterating through a hash table.\n Iterator will already point to the first element of the table it finds,\n which can be accessed as iter.element.\n\n This function cannot fail, but if there are no elements in the table,\n 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 ; } unsafe extern "C" { # [doc = " Returns true if iterator is done iterating through table, false otherwise.\n 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 ; } unsafe extern "C" { # [doc = " Updates iterator so that it points to next element of hash table.\n\n This and the two previous functions are designed to be used together with\n the following idiom:\n\n for (struct aws_hash_iter iter = aws_hash_iter_begin(&map);\n      !aws_hash_iter_done(&iter); aws_hash_iter_next(&iter)) {\n     const key_type key = *(const key_type *)iter.element.key;\n     value_type value = *(value_type *)iter.element.value;\n     // etc.\n }\n\n Note that calling this on an iter which is \"done\" is idempotent:\n i.e. it will return another iter which is \"done\"."] pub fn aws_hash_iter_next (iter : * mut aws_hash_iter) ; } unsafe extern "C" { # [doc = " Deletes the element currently pointed-to by the hash iterator.\n After calling this method, the element member of the iterator\n should not be accessed until the next call to aws_hash_iter_next.\n\n @param destroy_contents If true, the destructors for the key and value\n  will be called."] pub fn aws_hash_iter_delete (iter : * mut aws_hash_iter , destroy_contents : bool) ; } unsafe extern "C" { # [doc = " Attempts to locate an element at key.  If the element is found, a\n pointer to the value is placed in *p_elem; if it is not found,\n *pElem is set to NULL. Either way, AWS_OP_SUCCESS is returned.\n\n This method does not change the state of the hash table. Therefore, it\n is safe to call _find from multiple threads on the same hash table,\n provided no mutating operations happen in parallel.\n\n Calling code may update the value in the hash table by modifying **pElem\n after a successful find. However, this pointer is not guaranteed to\n remain usable after a subsequent call to _put, _delete, _clear, or\n _clean_up."] pub fn aws_hash_table_find (map : * const aws_hash_table , key : * const :: libc :: c_void , p_elem : * mut * mut aws_hash_element) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Attempts to locate an element at key. If no such element was found,\n creates a new element, with value initialized to NULL. In either case, a\n pointer to the element is placed in *p_elem.\n\n If was_created is non-NULL, *was_created is set to 0 if an existing\n element was found, or 1 is a new element was created.\n\n Returns AWS_OP_SUCCESS if an item was found or created.\n Raises AWS_ERROR_OOM if hash table expansion was required and memory\n allocation failed."] pub fn aws_hash_table_create (map : * mut aws_hash_table , key : * const :: libc :: c_void , p_elem : * mut * mut aws_hash_element , was_created : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Inserts a new element at key, with the given value. If another element\n exists at that key, the old element will be overwritten; both old key and\n value objects will be destroyed.\n\n If was_created is non-NULL, *was_created is set to 0 if an existing\n element was found, or 1 is a new element was created.\n\n Returns AWS_OP_SUCCESS if an item was found or created.\n Raises AWS_ERROR_OOM if hash table expansion was required and memory\n allocation failed."] pub fn aws_hash_table_put (map : * mut aws_hash_table , key : * const :: libc :: c_void , value : * mut :: libc :: c_void , was_created : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes element at key. Always returns AWS_OP_SUCCESS.\n\n If pValue is non-NULL, the existing value (if any) is moved into\n (*value) before removing from the table, and destroy_fn is _not_\n invoked. If pValue is NULL, then (if the element existed) destroy_fn\n will be invoked on the element being removed.\n\n If was_present is non-NULL, it is set to 0 if the element was\n 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 :: libc :: c_void , p_value : * mut aws_hash_element , was_present : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes element already known (typically by find()).\n\n p_value should point to a valid element returned by create() or find().\n\n NOTE: DO NOT call this method from inside of a aws_hash_table_foreach callback, return\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Iterates through every element in the map and invokes the callback on\n that item. Iteration is performed in an arbitrary, implementation-defined\n order, and is not guaranteed to be consistent across invocations.\n\n The callback may change the value associated with the key by overwriting\n the value pointed-to by value. In this case, the on_element_removed\n callback will not be invoked, unless the callback invokes\n AWS_COMMON_HASH_TABLE_ITER_DELETE (in which case the on_element_removed\n is given the updated value).\n\n The callback must return a bitmask of zero or more of the following values\n ORed together:\n\n # AWS_COMMON_HASH_TABLE_ITER_CONTINUE - Continues iteration to the next\n     element (if not set, iteration stops)\n # AWS_COMMON_HASH_TABLE_ITER_DELETE   - Deletes the current value and\n     continues iteration.  destroy_fn will NOT be invoked.\n # AWS_COMMON_HASH_TABLE_ITER_ERROR   - Stop iteration with error.\n     No action will be taken for the current value and the value before this.\n     No rolling back. The deleted value before will NOT be back.\n     aws_hash_table_foreach returns AWS_OP_ERR after stropping the iteration.\n\n Invoking any method which may change the contents of the hashtable\n during iteration results in undefined behavior. However, you may safely\n invoke non-mutating operations during an iteration.\n\n This operation is mutating only if AWS_COMMON_HASH_TABLE_ITER_DELETE\n is returned at some point during iteration. Otherwise, it is non-mutating\n 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 :: libc :: c_void , p_element : * mut aws_hash_element) -> :: libc :: c_int > , context : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Compares two hash tables for equality. Both hash tables must have equivalent\n key comparators; values will be compared using the comparator passed into this\n function. The key hash function does not need to be equivalent between the\n 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 ; } unsafe extern "C" { # [doc = " Removes every element from the hash map. destroy_fn will be called for\n each element."] pub fn aws_hash_table_clear (map : * mut aws_hash_table) ; } unsafe extern "C" { # [doc = " Convenience hash function for NULL-terminated C-strings"] pub fn aws_hash_c_string (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Convenience hash function for struct aws_strings.\n Hash is same as used on the string bytes by aws_hash_c_string."] pub fn aws_hash_string (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Convenience hash function for struct aws_byte_cursor.\n Hash is same as used on the string bytes by aws_hash_c_string."] pub fn aws_hash_byte_cursor_ptr (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Convenience hash function which hashes the pointer value directly,\n without dereferencing.  This can be used in cases where pointer identity\n is desired, or where a uintptr_t is encoded into a const void *."] pub fn aws_hash_ptr (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { pub fn aws_hash_combine (item1 : u64 , item2 : u64) -> u64 ; } unsafe extern "C" { # [doc = " Convenience eq callback for NULL-terminated C-strings"] pub fn aws_hash_callback_c_str_eq (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " Convenience eq callback for AWS strings"] pub fn aws_hash_callback_string_eq (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " Convenience destroy callback for AWS strings"] pub fn aws_hash_callback_string_destroy (a : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Equality function which compares pointer equality."] pub fn aws_ptr_eq (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Helper function to hash keys that are uint64_t values.\n\n The function is not a strong hash function in any sense; it merely reflects\n the uint64 value back.  Do not use this function as a hash if you need\n the properties of a strong hash function."] pub fn aws_hash_uint64_t_by_identity (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Helper function to compare hash keys that are uint64_t values."] pub fn aws_hash_compare_uint64_t_eq (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool ; } # [repr (C)] pub struct aws_mutex { pub mutex_handle : pthread_mutex_t , pub initialized : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_mutex"] [:: std :: mem :: size_of :: < aws_mutex > () - 48usize] ; ["Alignment of aws_mutex"] [:: std :: mem :: align_of :: < aws_mutex > () - 8usize] ; ["Offset of field: aws_mutex::mutex_handle"] [:: std :: mem :: offset_of ! (aws_mutex , mutex_handle) - 0usize] ; ["Offset of field: aws_mutex::initialized"] [:: std :: mem :: offset_of ! (aws_mutex , initialized) - 40usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Initializes a new platform instance of mutex."] pub fn aws_mutex_init (mutex : * mut aws_mutex) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Cleans up internal resources."] pub fn aws_mutex_clean_up (mutex : * mut aws_mutex) ; } unsafe extern "C" { # [doc = " Blocks until it acquires the lock. While on some platforms such as Windows,\n this may behave as a reentrant mutex, you should not treat it like one. On\n platforms it is possible for it to be non-reentrant, it will be."] pub fn aws_mutex_lock (mutex : * mut aws_mutex) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Attempts to acquire the lock but returns immediately if it can not.\n While on some platforms such as Windows, this may behave as a reentrant mutex,\n you should not treat it like one. On platforms it is possible for it to be non-reentrant, it will be.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Releases the lock."] pub fn aws_mutex_unlock (mutex : * mut aws_mutex) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_connection_finish_code { AWS_S3_CONNECTION_FINISH_CODE_SUCCESS = 0 , AWS_S3_CONNECTION_FINISH_CODE_FAILED = 1 , AWS_S3_CONNECTION_FINISH_CODE_RETRY = 2 , } pub type aws_s3_endpoint_shutdown_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_endpoint_options { pub host_name : * mut aws_string , pub shutdown_callback : aws_s3_endpoint_shutdown_fn , pub client_bootstrap : * mut aws_client_bootstrap , pub tls_connection_options : * const aws_tls_connection_options , pub dns_host_address_ttl_seconds : usize , pub client : * mut aws_s3_client , pub max_connections : u32 , pub port : u32 , # [doc = " Optional.\n Proxy configuration for http connection."] pub proxy_config : * mut aws_http_proxy_config , # [doc = " Optional.\n Configuration for fetching proxy configuration from environment.\n By Default proxy_ev_settings.aws_http_proxy_env_var_type is set to AWS_HPEV_ENABLE which means read proxy\n configuration from environment.\n Only works when proxy_config is not set. If both are set, configuration from proxy_config is used."] pub proxy_ev_settings : * mut proxy_env_var_settings , # [doc = " Optional.\n If set to 0, default value is used."] pub connect_timeout_ms : u32 , # [doc = " Optional.\n Set keepalive to periodically transmit messages for detecting a disconnected peer."] pub tcp_keep_alive_options : * mut aws_s3_tcp_keep_alive_options , # [doc = " Optional.\n Configuration options for connection monitoring.\n If the transfer speed falls below the specified minimum_throughput_bytes_per_second, the operation is aborted."] pub monitoring_options : * mut aws_http_connection_monitoring_options , pub network_interface_names_array : * const aws_byte_cursor , pub num_network_interface_names : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_endpoint_options"] [:: std :: mem :: size_of :: < aws_s3_endpoint_options > () - 112usize] ; ["Alignment of aws_s3_endpoint_options"] [:: std :: mem :: align_of :: < aws_s3_endpoint_options > () - 8usize] ; ["Offset of field: aws_s3_endpoint_options::host_name"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , host_name) - 0usize] ; ["Offset of field: aws_s3_endpoint_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , shutdown_callback) - 8usize] ; ["Offset of field: aws_s3_endpoint_options::client_bootstrap"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , client_bootstrap) - 16usize] ; ["Offset of field: aws_s3_endpoint_options::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , tls_connection_options) - 24usize] ; ["Offset of field: aws_s3_endpoint_options::dns_host_address_ttl_seconds"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , dns_host_address_ttl_seconds) - 32usize] ; ["Offset of field: aws_s3_endpoint_options::client"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , client) - 40usize] ; ["Offset of field: aws_s3_endpoint_options::max_connections"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , max_connections) - 48usize] ; ["Offset of field: aws_s3_endpoint_options::port"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , port) - 52usize] ; ["Offset of field: aws_s3_endpoint_options::proxy_config"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , proxy_config) - 56usize] ; ["Offset of field: aws_s3_endpoint_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , proxy_ev_settings) - 64usize] ; ["Offset of field: aws_s3_endpoint_options::connect_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , connect_timeout_ms) - 72usize] ; ["Offset of field: aws_s3_endpoint_options::tcp_keep_alive_options"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , tcp_keep_alive_options) - 80usize] ; ["Offset of field: aws_s3_endpoint_options::monitoring_options"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , monitoring_options) - 88usize] ; ["Offset of field: aws_s3_endpoint_options::network_interface_names_array"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , network_interface_names_array) - 96usize] ; ["Offset of field: aws_s3_endpoint_options::num_network_interface_names"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , num_network_interface_names) - 104usize] ; } ; impl Default for aws_s3_endpoint_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 , Default , Copy , Clone)] pub struct aws_s3_endpoint_system_vtable { pub acquire : :: std :: option :: Option < unsafe extern "C" fn (endpoint : * mut aws_s3_endpoint , already_holding_lock : bool) > , pub release : :: std :: option :: Option < unsafe extern "C" fn (endpoint : * mut aws_s3_endpoint) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_endpoint_system_vtable"] [:: std :: mem :: size_of :: < aws_s3_endpoint_system_vtable > () - 16usize] ; ["Alignment of aws_s3_endpoint_system_vtable"] [:: std :: mem :: align_of :: < aws_s3_endpoint_system_vtable > () - 8usize] ; ["Offset of field: aws_s3_endpoint_system_vtable::acquire"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_system_vtable , acquire) - 0usize] ; ["Offset of field: aws_s3_endpoint_system_vtable::release"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_system_vtable , release) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_endpoint { pub client_synced_data : aws_s3_endpoint__bindgen_ty_1 , pub allocator : * mut aws_allocator , pub host_name : * mut aws_string , pub http_connection_manager : * mut aws_http_connection_manager , pub client : * mut aws_s3_client , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_endpoint__bindgen_ty_1 { pub ref_count : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_endpoint__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_endpoint__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_s3_endpoint__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_endpoint__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_endpoint__bindgen_ty_1::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_endpoint__bindgen_ty_1 , ref_count) - 0usize] ; } ; # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_endpoint"] [:: std :: mem :: size_of :: < aws_s3_endpoint > () - 40usize] ; ["Alignment of aws_s3_endpoint"] [:: std :: mem :: align_of :: < aws_s3_endpoint > () - 8usize] ; ["Offset of field: aws_s3_endpoint::client_synced_data"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , client_synced_data) - 0usize] ; ["Offset of field: aws_s3_endpoint::allocator"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , allocator) - 8usize] ; ["Offset of field: aws_s3_endpoint::host_name"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , host_name) - 16usize] ; ["Offset of field: aws_s3_endpoint::http_connection_manager"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , http_connection_manager) - 24usize] ; ["Offset of field: aws_s3_endpoint::client"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , client) - 32usize] ; } ; impl Default for aws_s3_endpoint { 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)] pub struct aws_s3_connection { pub endpoint : * mut aws_s3_endpoint , pub http_connection : * mut aws_http_connection , pub request : * mut aws_s3_request , pub retry_token : * mut aws_retry_token , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_connection"] [:: std :: mem :: size_of :: < aws_s3_connection > () - 32usize] ; ["Alignment of aws_s3_connection"] [:: std :: mem :: align_of :: < aws_s3_connection > () - 8usize] ; ["Offset of field: aws_s3_connection::endpoint"] [:: std :: mem :: offset_of ! (aws_s3_connection , endpoint) - 0usize] ; ["Offset of field: aws_s3_connection::http_connection"] [:: std :: mem :: offset_of ! (aws_s3_connection , http_connection) - 8usize] ; ["Offset of field: aws_s3_connection::request"] [:: std :: mem :: offset_of ! (aws_s3_connection , request) - 16usize] ; ["Offset of field: aws_s3_connection::retry_token"] [:: std :: mem :: offset_of ! (aws_s3_connection , retry_token) - 24usize] ; } ; impl Default for aws_s3_connection { 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)] pub struct aws_s3_client_vtable { pub meta_request_factory : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client , options : * const aws_s3_meta_request_options) -> * mut aws_s3_meta_request > , pub create_connection_for_request : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client , request : * mut aws_s3_request) > , pub acquire_http_connection : :: std :: option :: Option < unsafe extern "C" fn (conn_manager : * mut aws_http_connection_manager , on_connection_acquired_callback : aws_http_connection_manager_on_connection_setup_fn , user_data : * mut :: libc :: c_void) > , pub get_host_address_count : :: std :: option :: Option < unsafe extern "C" fn (host_resolver : * mut aws_host_resolver , host_name : * const aws_string , flags : u32) -> usize > , pub schedule_process_work_synced : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client) > , pub process_work : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client) > , pub endpoint_shutdown_callback : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client) > , pub finish_destroy : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client) > , pub parallel_input_stream_new_from_file : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , file_name : aws_byte_cursor , reading_elg : * mut aws_event_loop_group , direct_io_read : bool) -> * mut aws_parallel_input_stream > , pub http_connection_make_request : :: std :: option :: Option < unsafe extern "C" fn (client_connection : * mut aws_http_connection , options : * const aws_http_make_request_options) -> * mut aws_http_stream > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client_vtable"] [:: std :: mem :: size_of :: < aws_s3_client_vtable > () - 80usize] ; ["Alignment of aws_s3_client_vtable"] [:: std :: mem :: align_of :: < aws_s3_client_vtable > () - 8usize] ; ["Offset of field: aws_s3_client_vtable::meta_request_factory"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , meta_request_factory) - 0usize] ; ["Offset of field: aws_s3_client_vtable::create_connection_for_request"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , create_connection_for_request) - 8usize] ; ["Offset of field: aws_s3_client_vtable::acquire_http_connection"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , acquire_http_connection) - 16usize] ; ["Offset of field: aws_s3_client_vtable::get_host_address_count"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , get_host_address_count) - 24usize] ; ["Offset of field: aws_s3_client_vtable::schedule_process_work_synced"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , schedule_process_work_synced) - 32usize] ; ["Offset of field: aws_s3_client_vtable::process_work"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , process_work) - 40usize] ; ["Offset of field: aws_s3_client_vtable::endpoint_shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , endpoint_shutdown_callback) - 48usize] ; ["Offset of field: aws_s3_client_vtable::finish_destroy"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , finish_destroy) - 56usize] ; ["Offset of field: aws_s3_client_vtable::parallel_input_stream_new_from_file"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , parallel_input_stream_new_from_file) - 64usize] ; ["Offset of field: aws_s3_client_vtable::http_connection_make_request"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , http_connection_make_request) - 72usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_part_timeout_stats { pub stop_timeout : bool , pub num_successful_upload_requests : u64 , pub initial_request_time : aws_s3_upload_part_timeout_stats__bindgen_ty_1 , pub timeout_rate_tracking : aws_s3_upload_part_timeout_stats__bindgen_ty_2 , pub response_to_first_byte_time : aws_s3_upload_part_timeout_stats__bindgen_ty_3 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_part_timeout_stats__bindgen_ty_1 { pub sum_ns : u64 , pub num_samples : u64 , pub collecting_p90 : bool , pub p90_samples : aws_priority_queue , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_timeout_stats__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_1 > () - 112usize] ; ["Alignment of aws_s3_upload_part_timeout_stats__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_1::sum_ns"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_1 , sum_ns) - 0usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_1::num_samples"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_1 , num_samples) - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_1::collecting_p90"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_1 , collecting_p90) - 16usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_1::p90_samples"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_1 , p90_samples) - 24usize] ; } ; impl Default for aws_s3_upload_part_timeout_stats__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 () } } } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_upload_part_timeout_stats__bindgen_ty_2 { pub num_completed : u64 , pub num_failed : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_timeout_stats__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_2 > () - 16usize] ; ["Alignment of aws_s3_upload_part_timeout_stats__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_2::num_completed"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_2 , num_completed) - 0usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_2::num_failed"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_2 , num_failed) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_upload_part_timeout_stats__bindgen_ty_3 { pub sum_ns : u64 , pub num_samples : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_timeout_stats__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_3 > () - 16usize] ; ["Alignment of aws_s3_upload_part_timeout_stats__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_3::sum_ns"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_3 , sum_ns) - 0usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_3::num_samples"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_3 , num_samples) - 8usize] ; } ; # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_timeout_stats"] [:: std :: mem :: size_of :: < aws_s3_upload_part_timeout_stats > () - 160usize] ; ["Alignment of aws_s3_upload_part_timeout_stats"] [:: std :: mem :: align_of :: < aws_s3_upload_part_timeout_stats > () - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::stop_timeout"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , stop_timeout) - 0usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::num_successful_upload_requests"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , num_successful_upload_requests) - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::initial_request_time"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , initial_request_time) - 16usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::timeout_rate_tracking"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , timeout_rate_tracking) - 128usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::response_to_first_byte_time"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , response_to_first_byte_time) - 144usize] ; } ; impl Default for aws_s3_upload_part_timeout_stats { 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)] pub struct aws_s3_client { pub allocator : * mut aws_allocator , pub buffer_pool : * mut aws_s3_buffer_pool , pub vtable : * mut aws_s3_client_vtable , pub ref_count : aws_ref_count , pub client_bootstrap : * mut aws_client_bootstrap , pub process_work_event_loop : * mut aws_event_loop , pub body_streaming_elg : * mut aws_event_loop_group , pub region : * mut aws_string , pub part_size : usize , pub part_size_set : bool , pub max_part_size : u64 , pub optimal_range_size : u64 , pub fio_options_set : bool , pub fio_opts : aws_s3_file_io_options , pub multipart_upload_threshold : u64 , pub tls_connection_options : * mut aws_tls_connection_options , pub cached_signing_config : * mut aws_cached_signing_config_aws , pub s3express_provider_factory : aws_s3express_provider_factory_fn , pub factory_user_data : * mut :: libc :: c_void , pub s3express_provider : * mut aws_s3express_credentials_provider , pub throughput_target_gbps : f64 , pub ideal_connection_count : u32 , # [doc = " For multi-part upload, content-md5 will be calculated if the AWS_MR_CONTENT_MD5_ENABLED is specified\n     or initial request has content-md5 header.\n For single-part upload, if the content-md5 header is specified, it will remain unchanged. If the header is not\n     specified, and this is set to AWS_MR_CONTENT_MD5_ENABLED, it will be calculated."] pub compute_content_md5 : aws_s3_meta_request_compute_content_md5 , pub max_active_connections_override : u32 , pub max_allowed_connections : aws_atomic_var , pub retry_strategy : * mut aws_retry_strategy , # [doc = " Optional.\n Proxy configuration for http connection."] pub proxy_config : * mut aws_http_proxy_config , # [doc = " Optional.\n Configuration for fetching proxy configuration from environment.\n By Default proxy_ev_settings.aws_http_proxy_env_var_type is set to AWS_HPEV_ENABLE which means read proxy\n configuration from environment.\n Only works when proxy_config is not set. If both are set, configuration from proxy_config is used."] pub proxy_ev_settings : * mut proxy_env_var_settings , # [doc = " Optional.\n If set to 0, default value is used."] pub connect_timeout_ms : u32 , # [doc = " Optional.\n Set keepalive to periodically transmit messages for detecting a disconnected peer."] pub tcp_keep_alive_options : * mut aws_s3_tcp_keep_alive_options , # [doc = " Configuration options for connection monitoring.\n If the transfer speed falls below the specified minimum_throughput_bytes_per_second, the operation is aborted.\n If user passes in NULL, default values are used."] pub monitoring_options : aws_http_connection_monitoring_options , pub proxy_ev_tls_options : * mut aws_tls_connection_options , pub shutdown_callback : aws_s3_client_shutdown_complete_callback_fn , pub shutdown_callback_user_data : * mut :: libc :: c_void , pub enable_read_backpressure : bool , pub initial_read_window : usize , # [doc = " Timeout in ms for upload request for request after sending to the response first byte received."] pub upload_timeout_ms : aws_atomic_var , pub network_interface_names : aws_array_list , pub network_interface_names_cursor_array : * mut aws_byte_cursor , pub num_network_interface_names : usize , pub stats : aws_s3_client__bindgen_ty_1 , pub synced_data : aws_s3_client__bindgen_ty_2 , pub threaded_data : aws_s3_client__bindgen_ty_3 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_client__bindgen_ty_1 { pub num_requests_in_flight : aws_atomic_var , pub num_requests_network_io : [aws_atomic_var ; 4usize] , pub num_requests_stream_queued_waiting : aws_atomic_var , pub num_requests_streaming_response : aws_atomic_var , pub num_requests_streaming_request_body : aws_atomic_var , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_client__bindgen_ty_1 > () - 64usize] ; ["Alignment of aws_s3_client__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_client__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_in_flight"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_in_flight) - 0usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_network_io"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_network_io) - 8usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_stream_queued_waiting"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_stream_queued_waiting) - 40usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_streaming_response"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_streaming_response) - 48usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_streaming_request_body"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_streaming_request_body) - 56usize] ; } ; impl Default for aws_s3_client__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 () } } } # [repr (C)] pub struct aws_s3_client__bindgen_ty_2 { pub lock : aws_mutex , pub endpoints : aws_hash_table , pub num_failed_prepare_requests : u32 , pub pending_meta_request_work : aws_linked_list , pub prepared_requests : aws_linked_list , pub process_work_task : aws_task , pub trim_buffer_pool_task : aws_task , pub endpoints_cleanup_task : aws_task , pub num_endpoints_allocated : u32 , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub upload_part_stats : aws_s3_upload_part_timeout_stats , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_client__bindgen_ty_2 > () - 488usize] ; ["Alignment of aws_s3_client__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_client__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::lock"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , lock) - 0usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::endpoints"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , endpoints) - 48usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::num_failed_prepare_requests"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , num_failed_prepare_requests) - 56usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::pending_meta_request_work"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , pending_meta_request_work) - 64usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::prepared_requests"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , prepared_requests) - 96usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::process_work_task"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , process_work_task) - 128usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::trim_buffer_pool_task"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , trim_buffer_pool_task) - 192usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::endpoints_cleanup_task"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , endpoints_cleanup_task) - 256usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::num_endpoints_allocated"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , num_endpoints_allocated) - 320usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::upload_part_stats"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , upload_part_stats) - 328usize] ; } ; impl Default for aws_s3_client__bindgen_ty_2 { 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 () } } } impl aws_s3_client__bindgen_ty_2 { # [inline] pub fn active (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_active (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn active_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_active_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn start_destroy_executing (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_start_destroy_executing (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub unsafe fn start_destroy_executing_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 1usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_start_destroy_executing_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 1usize , 1u8 , val as u64 ,) } } # [inline] pub fn process_work_task_scheduled (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_process_work_task_scheduled (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub unsafe fn process_work_task_scheduled_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 2usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_process_work_task_scheduled_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 2usize , 1u8 , val as u64 ,) } } # [inline] pub fn process_work_task_in_progress (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_process_work_task_in_progress (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (3usize , 1u8 , val as u64) } } # [inline] pub unsafe fn process_work_task_in_progress_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 3usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_process_work_task_in_progress_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 3usize , 1u8 , val as u64 ,) } } # [inline] pub fn body_streaming_elg_allocated (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (4usize , 1u8) as u32) } } # [inline] pub fn set_body_streaming_elg_allocated (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (4usize , 1u8 , val as u64) } } # [inline] pub unsafe fn body_streaming_elg_allocated_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 4usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_body_streaming_elg_allocated_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 4usize , 1u8 , val as u64 ,) } } # [inline] pub fn s3express_provider_active (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (5usize , 1u8) as u32) } } # [inline] pub fn set_s3express_provider_active (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (5usize , 1u8 , val as u64) } } # [inline] pub unsafe fn s3express_provider_active_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 5usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_s3express_provider_active_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 5usize , 1u8 , val as u64 ,) } } # [inline] pub fn finish_destroy (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 1u8) as u32) } } # [inline] pub fn set_finish_destroy (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (6usize , 1u8 , val as u64) } } # [inline] pub unsafe fn finish_destroy_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 6usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_finish_destroy_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 6usize , 1u8 , val as u64 ,) } } # [inline] pub fn endpoints_cleanup_task_scheduled (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (7usize , 1u8) as u32) } } # [inline] pub fn set_endpoints_cleanup_task_scheduled (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (7usize , 1u8 , val as u64) } } # [inline] pub unsafe fn endpoints_cleanup_task_scheduled_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 7usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_endpoints_cleanup_task_scheduled_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 7usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (active : u32 , start_destroy_executing : u32 , process_work_task_scheduled : u32 , process_work_task_in_progress : u32 , body_streaming_elg_allocated : u32 , s3express_provider_active : u32 , finish_destroy : u32 , endpoints_cleanup_task_scheduled : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let active : u32 = unsafe { :: std :: mem :: transmute (active) } ; active as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let start_destroy_executing : u32 = unsafe { :: std :: mem :: transmute (start_destroy_executing) } ; start_destroy_executing as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let process_work_task_scheduled : u32 = unsafe { :: std :: mem :: transmute (process_work_task_scheduled) } ; process_work_task_scheduled as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let process_work_task_in_progress : u32 = unsafe { :: std :: mem :: transmute (process_work_task_in_progress) } ; process_work_task_in_progress as u64 }) ; __bindgen_bitfield_unit . set (4usize , 1u8 , { let body_streaming_elg_allocated : u32 = unsafe { :: std :: mem :: transmute (body_streaming_elg_allocated) } ; body_streaming_elg_allocated as u64 }) ; __bindgen_bitfield_unit . set (5usize , 1u8 , { let s3express_provider_active : u32 = unsafe { :: std :: mem :: transmute (s3express_provider_active) } ; s3express_provider_active as u64 }) ; __bindgen_bitfield_unit . set (6usize , 1u8 , { let finish_destroy : u32 = unsafe { :: std :: mem :: transmute (finish_destroy) } ; finish_destroy as u64 }) ; __bindgen_bitfield_unit . set (7usize , 1u8 , { let endpoints_cleanup_task_scheduled : u32 = unsafe { :: std :: mem :: transmute (endpoints_cleanup_task_scheduled) } ; endpoints_cleanup_task_scheduled as u64 }) ; __bindgen_bitfield_unit } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_client__bindgen_ty_3 { pub request_queue : aws_linked_list , pub meta_requests : aws_linked_list , pub request_queue_size : u32 , pub num_requests_being_prepared : u32 , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub __bindgen_padding_0 : [u8 ; 7usize] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_client__bindgen_ty_3 > () - 80usize] ; ["Alignment of aws_s3_client__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_client__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_client__bindgen_ty_3::request_queue"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_3 , request_queue) - 0usize] ; ["Offset of field: aws_s3_client__bindgen_ty_3::meta_requests"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_3 , meta_requests) - 32usize] ; ["Offset of field: aws_s3_client__bindgen_ty_3::request_queue_size"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_3 , request_queue_size) - 64usize] ; ["Offset of field: aws_s3_client__bindgen_ty_3::num_requests_being_prepared"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_3 , num_requests_being_prepared) - 68usize] ; } ; impl Default for aws_s3_client__bindgen_ty_3 { 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 () } } } impl aws_s3_client__bindgen_ty_3 { # [inline] pub fn trim_buffer_pool_task_scheduled (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_trim_buffer_pool_task_scheduled (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn trim_buffer_pool_task_scheduled_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_trim_buffer_pool_task_scheduled_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (trim_buffer_pool_task_scheduled : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let trim_buffer_pool_task_scheduled : u32 = unsafe { :: std :: mem :: transmute (trim_buffer_pool_task_scheduled) } ; trim_buffer_pool_task_scheduled as u64 }) ; __bindgen_bitfield_unit } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client"] [:: std :: mem :: size_of :: < aws_s3_client > () - 1032usize] ; ["Alignment of aws_s3_client"] [:: std :: mem :: align_of :: < aws_s3_client > () - 8usize] ; ["Offset of field: aws_s3_client::allocator"] [:: std :: mem :: offset_of ! (aws_s3_client , allocator) - 0usize] ; ["Offset of field: aws_s3_client::buffer_pool"] [:: std :: mem :: offset_of ! (aws_s3_client , buffer_pool) - 8usize] ; ["Offset of field: aws_s3_client::vtable"] [:: std :: mem :: offset_of ! (aws_s3_client , vtable) - 16usize] ; ["Offset of field: aws_s3_client::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_client , ref_count) - 24usize] ; ["Offset of field: aws_s3_client::client_bootstrap"] [:: std :: mem :: offset_of ! (aws_s3_client , client_bootstrap) - 48usize] ; ["Offset of field: aws_s3_client::process_work_event_loop"] [:: std :: mem :: offset_of ! (aws_s3_client , process_work_event_loop) - 56usize] ; ["Offset of field: aws_s3_client::body_streaming_elg"] [:: std :: mem :: offset_of ! (aws_s3_client , body_streaming_elg) - 64usize] ; ["Offset of field: aws_s3_client::region"] [:: std :: mem :: offset_of ! (aws_s3_client , region) - 72usize] ; ["Offset of field: aws_s3_client::part_size"] [:: std :: mem :: offset_of ! (aws_s3_client , part_size) - 80usize] ; ["Offset of field: aws_s3_client::part_size_set"] [:: std :: mem :: offset_of ! (aws_s3_client , part_size_set) - 88usize] ; ["Offset of field: aws_s3_client::max_part_size"] [:: std :: mem :: offset_of ! (aws_s3_client , max_part_size) - 96usize] ; ["Offset of field: aws_s3_client::optimal_range_size"] [:: std :: mem :: offset_of ! (aws_s3_client , optimal_range_size) - 104usize] ; ["Offset of field: aws_s3_client::fio_options_set"] [:: std :: mem :: offset_of ! (aws_s3_client , fio_options_set) - 112usize] ; ["Offset of field: aws_s3_client::fio_opts"] [:: std :: mem :: offset_of ! (aws_s3_client , fio_opts) - 120usize] ; ["Offset of field: aws_s3_client::multipart_upload_threshold"] [:: std :: mem :: offset_of ! (aws_s3_client , multipart_upload_threshold) - 144usize] ; ["Offset of field: aws_s3_client::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_s3_client , tls_connection_options) - 152usize] ; ["Offset of field: aws_s3_client::cached_signing_config"] [:: std :: mem :: offset_of ! (aws_s3_client , cached_signing_config) - 160usize] ; ["Offset of field: aws_s3_client::s3express_provider_factory"] [:: std :: mem :: offset_of ! (aws_s3_client , s3express_provider_factory) - 168usize] ; ["Offset of field: aws_s3_client::factory_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client , factory_user_data) - 176usize] ; ["Offset of field: aws_s3_client::s3express_provider"] [:: std :: mem :: offset_of ! (aws_s3_client , s3express_provider) - 184usize] ; ["Offset of field: aws_s3_client::throughput_target_gbps"] [:: std :: mem :: offset_of ! (aws_s3_client , throughput_target_gbps) - 192usize] ; ["Offset of field: aws_s3_client::ideal_connection_count"] [:: std :: mem :: offset_of ! (aws_s3_client , ideal_connection_count) - 200usize] ; ["Offset of field: aws_s3_client::compute_content_md5"] [:: std :: mem :: offset_of ! (aws_s3_client , compute_content_md5) - 204usize] ; ["Offset of field: aws_s3_client::max_active_connections_override"] [:: std :: mem :: offset_of ! (aws_s3_client , max_active_connections_override) - 208usize] ; ["Offset of field: aws_s3_client::max_allowed_connections"] [:: std :: mem :: offset_of ! (aws_s3_client , max_allowed_connections) - 216usize] ; ["Offset of field: aws_s3_client::retry_strategy"] [:: std :: mem :: offset_of ! (aws_s3_client , retry_strategy) - 224usize] ; ["Offset of field: aws_s3_client::proxy_config"] [:: std :: mem :: offset_of ! (aws_s3_client , proxy_config) - 232usize] ; ["Offset of field: aws_s3_client::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_s3_client , proxy_ev_settings) - 240usize] ; ["Offset of field: aws_s3_client::connect_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_client , connect_timeout_ms) - 248usize] ; ["Offset of field: aws_s3_client::tcp_keep_alive_options"] [:: std :: mem :: offset_of ! (aws_s3_client , tcp_keep_alive_options) - 256usize] ; ["Offset of field: aws_s3_client::monitoring_options"] [:: std :: mem :: offset_of ! (aws_s3_client , monitoring_options) - 264usize] ; ["Offset of field: aws_s3_client::proxy_ev_tls_options"] [:: std :: mem :: offset_of ! (aws_s3_client , proxy_ev_tls_options) - 296usize] ; ["Offset of field: aws_s3_client::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_client , shutdown_callback) - 304usize] ; ["Offset of field: aws_s3_client::shutdown_callback_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client , shutdown_callback_user_data) - 312usize] ; ["Offset of field: aws_s3_client::enable_read_backpressure"] [:: std :: mem :: offset_of ! (aws_s3_client , enable_read_backpressure) - 320usize] ; ["Offset of field: aws_s3_client::initial_read_window"] [:: std :: mem :: offset_of ! (aws_s3_client , initial_read_window) - 328usize] ; ["Offset of field: aws_s3_client::upload_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_client , upload_timeout_ms) - 336usize] ; ["Offset of field: aws_s3_client::network_interface_names"] [:: std :: mem :: offset_of ! (aws_s3_client , network_interface_names) - 344usize] ; ["Offset of field: aws_s3_client::network_interface_names_cursor_array"] [:: std :: mem :: offset_of ! (aws_s3_client , network_interface_names_cursor_array) - 384usize] ; ["Offset of field: aws_s3_client::num_network_interface_names"] [:: std :: mem :: offset_of ! (aws_s3_client , num_network_interface_names) - 392usize] ; ["Offset of field: aws_s3_client::stats"] [:: std :: mem :: offset_of ! (aws_s3_client , stats) - 400usize] ; ["Offset of field: aws_s3_client::synced_data"] [:: std :: mem :: offset_of ! (aws_s3_client , synced_data) - 464usize] ; ["Offset of field: aws_s3_client::threaded_data"] [:: std :: mem :: offset_of ! (aws_s3_client , threaded_data) - 952usize] ; } ; impl Default for aws_s3_client { 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)] pub struct aws_s3_meta_request_resume_token { pub allocator : * mut aws_allocator , pub ref_count : aws_ref_count , pub type_ : aws_s3_meta_request_type , pub multipart_upload_id : * mut aws_string , pub part_size : usize , pub total_num_parts : usize , pub num_parts_completed : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_resume_token"] [:: std :: mem :: size_of :: < aws_s3_meta_request_resume_token > () - 72usize] ; ["Alignment of aws_s3_meta_request_resume_token"] [:: std :: mem :: align_of :: < aws_s3_meta_request_resume_token > () - 8usize] ; ["Offset of field: aws_s3_meta_request_resume_token::allocator"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , allocator) - 0usize] ; ["Offset of field: aws_s3_meta_request_resume_token::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , ref_count) - 8usize] ; ["Offset of field: aws_s3_meta_request_resume_token::type_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , type_) - 32usize] ; ["Offset of field: aws_s3_meta_request_resume_token::multipart_upload_id"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , multipart_upload_id) - 40usize] ; ["Offset of field: aws_s3_meta_request_resume_token::part_size"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , part_size) - 48usize] ; ["Offset of field: aws_s3_meta_request_resume_token::total_num_parts"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , total_num_parts) - 56usize] ; ["Offset of field: aws_s3_meta_request_resume_token::num_parts_completed"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , num_parts_completed) - 64usize] ; } ; impl Default for aws_s3_meta_request_resume_token { 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 () } } } unsafe extern "C" { pub fn aws_s3_client_notify_connection_finished (client : * mut aws_s3_client , connection : * mut aws_s3_connection , error_code : :: libc :: c_int , finish_code : aws_s3_connection_finish_code) ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_new (allocator : * mut aws_allocator) -> * mut aws_s3_meta_request_resume_token ; } unsafe extern "C" { pub fn aws_s3_set_dns_ttl (ttl : usize) ; } unsafe extern "C" { pub fn aws_s3_client_get_max_requests_prepare (client : * mut aws_s3_client) -> u32 ; } unsafe extern "C" { pub fn aws_s3_client_get_max_active_connections (client : * mut aws_s3_client , meta_request : * mut aws_s3_meta_request) -> u32 ; } unsafe extern "C" { pub fn aws_s3_client_get_max_requests_in_flight (client : * mut aws_s3_client) -> u32 ; } unsafe extern "C" { pub fn aws_s3_client_queue_requests_threaded (client : * mut aws_s3_client , request_list : * mut aws_linked_list , queue_front : bool) -> u32 ; } unsafe extern "C" { pub fn aws_s3_client_dequeue_request_threaded (client : * mut aws_s3_client) -> * mut aws_s3_request ; } unsafe extern "C" { pub fn aws_s3_client_schedule_process_work (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_client_update_meta_requests_threaded (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_client_update_connections_threaded (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_endpoint_new (allocator : * mut aws_allocator , options : * const aws_s3_endpoint_options) -> * mut aws_s3_endpoint ; } unsafe extern "C" { pub fn aws_s3_client_lock_synced_data (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_client_unlock_synced_data (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_endpoint_set_system_vtable (vtable : * const aws_s3_endpoint_system_vtable) ; } unsafe extern "C" { pub fn aws_s3_endpoint_acquire (endpoint : * mut aws_s3_endpoint , already_holding_lock : bool) -> * mut aws_s3_endpoint ; } unsafe extern "C" { pub fn aws_s3_endpoint_release (endpoint : * mut aws_s3_endpoint) ; } unsafe extern "C" { pub fn aws_s3_endpoint_destroy (endpoint : * mut aws_s3_endpoint) ; } unsafe extern "C" { pub static g_min_num_connections : u32 ; } unsafe extern "C" { pub static g_expect_timeout_offset_ms : usize ; } unsafe extern "C" { pub fn aws_s3_client_update_upload_part_timeout (client : * mut aws_s3_client , finished_upload_part_request : * mut aws_s3_request , finished_error_code : :: libc :: c_int) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_default_buffer_ticket { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_default_buffer_pool_usage_stats { pub mem_limit : usize , pub primary_cutoff : usize , pub primary_allocated : usize , pub primary_num_blocks : usize , pub primary_used : usize , pub primary_reserved : usize , pub secondary_used : usize , pub secondary_reserved : usize , pub special_blocks_allocated : usize , pub special_blocks_num : usize , pub special_blocks_reserved : usize , pub special_blocks_used : usize , pub forced_used : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_default_buffer_pool_usage_stats"] [:: std :: mem :: size_of :: < aws_s3_default_buffer_pool_usage_stats > () - 104usize] ; ["Alignment of aws_s3_default_buffer_pool_usage_stats"] [:: std :: mem :: align_of :: < aws_s3_default_buffer_pool_usage_stats > () - 8usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::mem_limit"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , mem_limit) - 0usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_cutoff"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_cutoff) - 8usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_allocated"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_allocated) - 16usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_num_blocks"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_num_blocks) - 24usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_used) - 32usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_reserved) - 40usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::secondary_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , secondary_used) - 48usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::secondary_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , secondary_reserved) - 56usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::special_blocks_allocated"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , special_blocks_allocated) - 64usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::special_blocks_num"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , special_blocks_num) - 72usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::special_blocks_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , special_blocks_reserved) - 80usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::special_blocks_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , special_blocks_used) - 88usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::forced_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , forced_used) - 96usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct s3_special_block_list { pub allocator : * mut aws_allocator , pub buffer_size : usize , pub blocks : aws_array_list , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of s3_special_block_list"] [:: std :: mem :: size_of :: < s3_special_block_list > () - 56usize] ; ["Alignment of s3_special_block_list"] [:: std :: mem :: align_of :: < s3_special_block_list > () - 8usize] ; ["Offset of field: s3_special_block_list::allocator"] [:: std :: mem :: offset_of ! (s3_special_block_list , allocator) - 0usize] ; ["Offset of field: s3_special_block_list::buffer_size"] [:: std :: mem :: offset_of ! (s3_special_block_list , buffer_size) - 8usize] ; ["Offset of field: s3_special_block_list::blocks"] [:: std :: mem :: offset_of ! (s3_special_block_list , blocks) - 16usize] ; } ; impl Default for s3_special_block_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 () } } } # [repr (C)] pub struct aws_s3_default_buffer_pool { pub base_allocator : * mut aws_allocator , pub mutex : aws_mutex , pub block_size : usize , pub chunk_size : usize , pub primary_size_cutoff : usize , pub mem_limit : usize , pub primary_allocated : usize , pub primary_reserved : usize , pub primary_used : usize , pub special_blocks_allocated : usize , pub special_blocks_reserved : usize , pub special_blocks_used : usize , pub secondary_reserved : usize , pub secondary_used : usize , pub forced_used : usize , pub blocks : aws_array_list , pub pending_reserves : aws_linked_list , pub special_blocks : aws_hash_table , pub force_keeping_special_blocks : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_default_buffer_pool"] [:: std :: mem :: size_of :: < aws_s3_default_buffer_pool > () - 248usize] ; ["Alignment of aws_s3_default_buffer_pool"] [:: std :: mem :: align_of :: < aws_s3_default_buffer_pool > () - 8usize] ; ["Offset of field: aws_s3_default_buffer_pool::base_allocator"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , base_allocator) - 0usize] ; ["Offset of field: aws_s3_default_buffer_pool::mutex"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , mutex) - 8usize] ; ["Offset of field: aws_s3_default_buffer_pool::block_size"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , block_size) - 56usize] ; ["Offset of field: aws_s3_default_buffer_pool::chunk_size"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , chunk_size) - 64usize] ; ["Offset of field: aws_s3_default_buffer_pool::primary_size_cutoff"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , primary_size_cutoff) - 72usize] ; ["Offset of field: aws_s3_default_buffer_pool::mem_limit"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , mem_limit) - 80usize] ; ["Offset of field: aws_s3_default_buffer_pool::primary_allocated"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , primary_allocated) - 88usize] ; ["Offset of field: aws_s3_default_buffer_pool::primary_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , primary_reserved) - 96usize] ; ["Offset of field: aws_s3_default_buffer_pool::primary_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , primary_used) - 104usize] ; ["Offset of field: aws_s3_default_buffer_pool::special_blocks_allocated"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , special_blocks_allocated) - 112usize] ; ["Offset of field: aws_s3_default_buffer_pool::special_blocks_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , special_blocks_reserved) - 120usize] ; ["Offset of field: aws_s3_default_buffer_pool::special_blocks_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , special_blocks_used) - 128usize] ; ["Offset of field: aws_s3_default_buffer_pool::secondary_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , secondary_reserved) - 136usize] ; ["Offset of field: aws_s3_default_buffer_pool::secondary_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , secondary_used) - 144usize] ; ["Offset of field: aws_s3_default_buffer_pool::forced_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , forced_used) - 152usize] ; ["Offset of field: aws_s3_default_buffer_pool::blocks"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , blocks) - 160usize] ; ["Offset of field: aws_s3_default_buffer_pool::pending_reserves"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , pending_reserves) - 200usize] ; ["Offset of field: aws_s3_default_buffer_pool::special_blocks"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , special_blocks) - 232usize] ; ["Offset of field: aws_s3_default_buffer_pool::force_keeping_special_blocks"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , force_keeping_special_blocks) - 240usize] ; } ; impl Default for aws_s3_default_buffer_pool { 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)] pub struct s3_pending_reserve { pub node : aws_linked_list_node , pub ticket_future : * mut aws_future_s3_buffer_ticket , pub ticket : * mut aws_s3_default_buffer_ticket , pub meta : aws_s3_buffer_pool_reserve_meta , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of s3_pending_reserve"] [:: std :: mem :: size_of :: < s3_pending_reserve > () - 64usize] ; ["Alignment of s3_pending_reserve"] [:: std :: mem :: align_of :: < s3_pending_reserve > () - 8usize] ; ["Offset of field: s3_pending_reserve::node"] [:: std :: mem :: offset_of ! (s3_pending_reserve , node) - 0usize] ; ["Offset of field: s3_pending_reserve::ticket_future"] [:: std :: mem :: offset_of ! (s3_pending_reserve , ticket_future) - 16usize] ; ["Offset of field: s3_pending_reserve::ticket"] [:: std :: mem :: offset_of ! (s3_pending_reserve , ticket) - 24usize] ; ["Offset of field: s3_pending_reserve::meta"] [:: std :: mem :: offset_of ! (s3_pending_reserve , meta) - 32usize] ; } ; impl Default for s3_pending_reserve { 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)] pub struct s3_buffer_pool_block { pub block_size : usize , pub block_ptr : * mut u8 , pub alloc_bit_mask : u16 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of s3_buffer_pool_block"] [:: std :: mem :: size_of :: < s3_buffer_pool_block > () - 24usize] ; ["Alignment of s3_buffer_pool_block"] [:: std :: mem :: align_of :: < s3_buffer_pool_block > () - 8usize] ; ["Offset of field: s3_buffer_pool_block::block_size"] [:: std :: mem :: offset_of ! (s3_buffer_pool_block , block_size) - 0usize] ; ["Offset of field: s3_buffer_pool_block::block_ptr"] [:: std :: mem :: offset_of ! (s3_buffer_pool_block , block_ptr) - 8usize] ; ["Offset of field: s3_buffer_pool_block::alloc_bit_mask"] [:: std :: mem :: offset_of ! (s3_buffer_pool_block , alloc_bit_mask) - 16usize] ; } ; impl Default for s3_buffer_pool_block { 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 () } } } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_new (allocator : * mut aws_allocator , config : aws_s3_buffer_pool_config) -> * mut aws_s3_buffer_pool ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_destroy (buffer_pool : * mut aws_s3_buffer_pool) ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_reserve (buffer_pool : * mut aws_s3_buffer_pool , meta : aws_s3_buffer_pool_reserve_meta) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_acquire_buffer (buffer_pool : * mut aws_s3_buffer_pool , ticket : * mut aws_s3_default_buffer_ticket) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_get_usage (buffer_pool : * mut aws_s3_buffer_pool) -> aws_s3_default_buffer_pool_usage_stats ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_trim (buffer_pool : * mut aws_s3_buffer_pool) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_signable { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_signing_result { _unused : [u8 ; 0] , } # [doc = " Gets called by the signing function when the signing is complete.\n\n Note that result will be destroyed after this function returns, so either copy it,\n or do all necessary adjustments inside the callback.\n\n When performing event or chunk signing, you will need to copy out the signature value in order\n to correctly configure the signable that wraps the event or chunk you want signed next.  The signature is\n found in the \"signature\" property on the signing result.  This value must be added as the\n \"previous-signature\" property on the next signable."] pub type aws_signing_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (result : * mut aws_signing_result , error_code : :: libc :: c_int , userdata : * mut :: libc :: c_void) > ; unsafe extern "C" { # [doc = " (Asynchronous) entry point to sign something (a request, a chunk, an event) with an AWS signing process.\n Depending on the configuration, the signing process may or may not complete synchronously.\n\n @param allocator memory allocator to use throughout the signing process\n @param signable the thing to be signed.  See signable.h for common constructors for signables that\n wrap different types.\n @param base_config pointer to a signing configuration, currently this must be of type aws_signing_config_aws\n @param on_complete completion callback to be invoked when signing has finished\n @param user_data opaque user data that will be passed to the completion callback\n\n @return AWS_OP_SUCCESS if the signing attempt was *initiated* successfully, AWS_OP_ERR otherwise"] pub fn aws_sign_request_aws (allocator : * mut aws_allocator , signable : * const aws_signable , base_config : * const aws_signing_config_base , on_complete : aws_signing_complete_fn , userdata : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Test-only API used for cross-library signing verification tests\n\n Verifies:\n  (1) The canonical request generated during sigv4a signing of the request matches what is passed in\n  (2) The signature passed in is a valid ECDSA signature of the hashed string-to-sign derived from the\n  canonical request\n\n  @param allocator memory allocator to use throughout the signing verification process\n  @param signable the thing to be signed.  See signable.h for common constructors for signables that\n wrap different types.\n  @param base_config pointer to a signing configuration, currently this must be of type aws_signing_config_aws\n  @param expected_canonical_request_cursor expected result when building the canonical request\n  @param signature_cursor the actual signature computed from a previous signing of the signable\n  @param ecc_key_pub_x the x coordinate of the public part of the ecc key to verify the signature\n  @param ecc_key_pub_y the y coordinate of the public part of the ecc key to verify the signature\n\n  @return AWS_OP_SUCCESS if the signing attempt was *initiated* successfully, AWS_OP_ERR otherwise"] pub fn aws_verify_sigv4a_signing (allocator : * mut aws_allocator , signable : * const aws_signable , base_config : * const aws_signing_config_base , expected_canonical_request_cursor : aws_byte_cursor , signature_cursor : aws_byte_cursor , ecc_key_pub_x : aws_byte_cursor , ecc_key_pub_y : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Another helper function to check a computed sigv4a signature."] pub fn aws_validate_v4a_authorization_value (allocator : * mut aws_allocator , ecc_key : * mut aws_ecc_key_pair , string_to_sign_cursor : aws_byte_cursor , signature_value_cursor : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes any padding added to the end of a sigv4a signature.  Signature must be hex-encoded.\n @param signature signature to remove padding from\n @return cursor that ranges over only the valid hex encoding of the sigv4a signature"] pub fn aws_trim_padded_sigv4a_signature (signature : aws_byte_cursor) -> aws_byte_cursor ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_request_checksum_context { _unused : [u8 ; 0] , } unsafe extern "C" { pub static s_checksum_algo_priority_list : [aws_s3_checksum_algorithm ; 5usize] ; } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_checksum_vtable { pub destroy : :: std :: option :: Option < unsafe extern "C" fn (checksum : * mut aws_s3_checksum) > , pub update : :: std :: option :: Option < unsafe extern "C" fn (checksum : * mut aws_s3_checksum , buf : * const aws_byte_cursor) -> :: libc :: c_int > , pub finalize : :: std :: option :: Option < unsafe extern "C" fn (checksum : * mut aws_s3_checksum , out : * mut aws_byte_buf) -> :: libc :: c_int > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_checksum_vtable"] [:: std :: mem :: size_of :: < aws_checksum_vtable > () - 24usize] ; ["Alignment of aws_checksum_vtable"] [:: std :: mem :: align_of :: < aws_checksum_vtable > () - 8usize] ; ["Offset of field: aws_checksum_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_checksum_vtable , destroy) - 0usize] ; ["Offset of field: aws_checksum_vtable::update"] [:: std :: mem :: offset_of ! (aws_checksum_vtable , update) - 8usize] ; ["Offset of field: aws_checksum_vtable::finalize"] [:: std :: mem :: offset_of ! (aws_checksum_vtable , finalize) - 16usize] ; } ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_s3_checksum { pub allocator : * mut aws_allocator , pub vtable : * mut aws_checksum_vtable , pub digest_size : usize , pub algorithm : aws_s3_checksum_algorithm , pub good : bool , pub impl_ : aws_s3_checksum__bindgen_ty_1 , } # [repr (C)] # [derive (Copy , Clone)] pub union aws_s3_checksum__bindgen_ty_1 { pub hash : * mut aws_hash , pub crc_val_32bit : u32 , pub crc_val_64bit : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_checksum__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_checksum__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_s3_checksum__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_checksum__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_checksum__bindgen_ty_1::hash"] [:: std :: mem :: offset_of ! (aws_s3_checksum__bindgen_ty_1 , hash) - 0usize] ; ["Offset of field: aws_s3_checksum__bindgen_ty_1::crc_val_32bit"] [:: std :: mem :: offset_of ! (aws_s3_checksum__bindgen_ty_1 , crc_val_32bit) - 0usize] ; ["Offset of field: aws_s3_checksum__bindgen_ty_1::crc_val_64bit"] [:: std :: mem :: offset_of ! (aws_s3_checksum__bindgen_ty_1 , crc_val_64bit) - 0usize] ; } ; impl Default for aws_s3_checksum__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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_checksum"] [:: std :: mem :: size_of :: < aws_s3_checksum > () - 40usize] ; ["Alignment of aws_s3_checksum"] [:: std :: mem :: align_of :: < aws_s3_checksum > () - 8usize] ; ["Offset of field: aws_s3_checksum::allocator"] [:: std :: mem :: offset_of ! (aws_s3_checksum , allocator) - 0usize] ; ["Offset of field: aws_s3_checksum::vtable"] [:: std :: mem :: offset_of ! (aws_s3_checksum , vtable) - 8usize] ; ["Offset of field: aws_s3_checksum::digest_size"] [:: std :: mem :: offset_of ! (aws_s3_checksum , digest_size) - 16usize] ; ["Offset of field: aws_s3_checksum::algorithm"] [:: std :: mem :: offset_of ! (aws_s3_checksum , algorithm) - 24usize] ; ["Offset of field: aws_s3_checksum::good"] [:: std :: mem :: offset_of ! (aws_s3_checksum , good) - 28usize] ; ["Offset of field: aws_s3_checksum::impl_"] [:: std :: mem :: offset_of ! (aws_s3_checksum , impl_) - 32usize] ; } ; impl Default for aws_s3_checksum { 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)] pub struct aws_s3_meta_request_checksum_config_storage { pub allocator : * mut aws_allocator , pub full_object_checksum : aws_byte_buf , pub has_full_object_checksum : bool , pub full_object_checksum_callback : aws_s3_meta_request_full_object_checksum_fn , pub user_data : * mut :: libc :: c_void , pub location : aws_s3_checksum_location , pub checksum_algorithm : aws_s3_checksum_algorithm , pub validate_response_checksum : bool , pub response_checksum_algorithms : aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 { pub crc64nvme : bool , pub crc32c : bool , pub crc32 : bool , pub sha1 : bool , pub sha256 : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_checksum_config_storage__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 > () - 5usize] ; ["Alignment of aws_s3_meta_request_checksum_config_storage__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 > () - 1usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::crc64nvme"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , crc64nvme) - 0usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::crc32c"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , crc32c) - 1usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::crc32"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , crc32) - 2usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::sha1"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , sha1) - 3usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::sha256"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , sha256) - 4usize] ; } ; # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_checksum_config_storage"] [:: std :: mem :: size_of :: < aws_s3_meta_request_checksum_config_storage > () - 80usize] ; ["Alignment of aws_s3_meta_request_checksum_config_storage"] [:: std :: mem :: align_of :: < aws_s3_meta_request_checksum_config_storage > () - 8usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::allocator"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , allocator) - 0usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::full_object_checksum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , full_object_checksum) - 8usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::has_full_object_checksum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , has_full_object_checksum) - 40usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::full_object_checksum_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , full_object_checksum_callback) - 48usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::user_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , user_data) - 56usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::location"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , location) - 64usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::checksum_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , checksum_algorithm) - 68usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::validate_response_checksum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , validate_response_checksum) - 72usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::response_checksum_algorithms"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , response_checksum_algorithms) - 73usize] ; } ; impl Default for aws_s3_meta_request_checksum_config_storage { 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 () } } } unsafe extern "C" { # [doc = " Helper stream that takes in a stream and the checksum context to help finalize the checksum from the underlying\n stream.\n The context will be only finalized when the checksum stream has read to the end of stream.\n\n Note: seek this stream will immediately fail, as it would prevent an accurate calculation of the\n checksum.\n\n @param allocator\n @param existing_stream The real content to read from. Destroying the checksum stream destroys the existing stream.\n                        outputs the checksum of existing stream to checksum_output upon destruction. Will be kept\n                        alive by the checksum stream\n @param context         Checksum context to keep and get checksum requirements from."] pub fn aws_checksum_stream_new_with_context (allocator : * mut aws_allocator , existing_stream : * mut aws_input_stream , context : * mut aws_s3_upload_request_checksum_context) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Helper stream that takes in a stream to keep track of the checksum of the underlying stream during read.\n Invoke `aws_checksum_stream_finalize_checksum` to get the checksum of the data has been read so far.\n\n Note: seek this stream will immediately fail, as it would prevent an accurate calculation of the\n checksum.\n\n @param allocator\n @param existing_stream The real content to read from. Destroying the checksum stream destroys the existing stream.\n                        outputs the checksum of existing stream to checksum_output upon destruction. Will be kept\n                        alive by the checksum stream\n @param algorithm       Checksum algorithm to use."] pub fn aws_checksum_stream_new (allocator : * mut aws_allocator , existing_stream : * mut aws_input_stream , algorithm : aws_s3_checksum_algorithm) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Finalize the checksum has read so far to the output checksum buf with base64 encoding.\n Not thread safe."] pub fn aws_checksum_stream_finalize_checksum (checksum_stream : * mut aws_input_stream , checksum_buf : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " TODO: properly support chunked encoding.\n Creates a chunked encoding stream that wraps an existing stream and adds checksum trailers.\n\n This function creates a stream that:\n 1. Encodes the input stream wraps the existing_stream with aws-chunked encoded.\n 2. Calculates a checksum of the stream content (if not already calculated)\n 3. Appends the checksum as a trailer at the end of the aws-chunked stream\n\n Note: This stream does not support seeking operations, as seeking would prevent\n accurate checksum calculation and corrupt the chunked encoding format.\n\n @param allocator         Memory allocator to use for stream creation and internal buffers\n @param existing_stream   The input stream to be chunked and checksummed. This stream\n                          will be acquired by the chunk stream and released when the\n                          chunk stream is destroyed. Must not be NULL.\n @param checksum_context  Context containing checksum configuration and state. Must not be NULL.\n                          The context contains:\n                          - algorithm: The checksum algorithm to use (CRC32, CRC32C, etc.)\n                          - base64_checksum: Buffer for the calculated checksum result\n                          - checksum_calculated: Whether checksum is pre-calculated or needs calculation\n                          - encoded_checksum_size: Expected size of the base64-encoded checksum\n\n                          If checksum_calculated is false, the stream will wrap existing_stream\n                          with a checksum stream to calculate the checksum during reading.\n                          If checksum_calculated is true, the existing checksum value will be used.\n\n @return A new input stream that provides chunked encoding with checksum trailers,\n         or NULL if creation fails. The returned stream must be released with\n         aws_input_stream_release() when no longer needed.\n\n @note The total length of the returned stream includes:\n       - Chunk size header (hex representation + \\r\\n)\n       - Original stream content\n       - Final chunk marker (0\\r\\n or \\r\\n0\\r\\n)\n       - Checksum trailer (header name + : + base64 checksum + \\r\\n\\r\\n)"] pub fn aws_chunk_stream_new (allocator : * mut aws_allocator , existing_stream : * mut aws_input_stream , context : * mut aws_s3_upload_request_checksum_context) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Get the size of the checksum output corresponding to the aws_s3_checksum_algorithm enum value."] pub fn aws_get_digest_size_from_checksum_algorithm (algorithm : aws_s3_checksum_algorithm) -> usize ; } unsafe extern "C" { # [doc = " Get header name to use for algorithm (e.g. \"x-amz-checksum-crc32\")"] pub fn aws_get_http_header_name_from_checksum_algorithm (algorithm : aws_s3_checksum_algorithm) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get algorithm's name (e.g. \"CRC32\"), to be used as the value of headers like `x-amz-checksum-algorithm`"] pub fn aws_get_checksum_algorithm_name (algorithm : aws_s3_checksum_algorithm) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the name of checksum algorithm to be used as the details of the parts were uploaded. Referring to\n https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompletedPart.html#AmazonS3-Type-CompletedPart"] pub fn aws_get_completed_part_name_from_checksum_algorithm (algorithm : aws_s3_checksum_algorithm) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " create a new aws_checksum corresponding to the aws_s3_checksum_algorithm enum value."] pub fn aws_checksum_new (allocator : * mut aws_allocator , algorithm : aws_s3_checksum_algorithm) -> * mut aws_s3_checksum ; } unsafe extern "C" { # [doc = " Compute an aws_checksum corresponding to the provided enum, passing a function pointer around instead of using a\n conditional would be faster, but would be a negligible improvement compared to the cost of processing data twice\n which would be the only time this function would be used, and would be harder to follow."] pub fn aws_checksum_compute (allocator : * mut aws_allocator , algorithm : aws_s3_checksum_algorithm , input : * const aws_byte_cursor , output : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Cleans up and deallocates checksum."] pub fn aws_checksum_destroy (checksum : * mut aws_s3_checksum) ; } unsafe extern "C" { # [doc = " Updates the running checksum with to_checksum. this can be called multiple times."] pub fn aws_checksum_update (checksum : * mut aws_s3_checksum , to_checksum : * const aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Completes the checksum computation and writes the final digest to output.\n Allocation of output is the caller's responsibility."] pub fn aws_checksum_finalize (checksum : * mut aws_s3_checksum , output : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_meta_request_checksum_config_storage_init (allocator : * mut aws_allocator , internal_config : * mut aws_s3_meta_request_checksum_config_storage , config : * const aws_s3_checksum_config , message : * const aws_http_message , log_id : * const :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_meta_request_checksum_config_storage_cleanup (internal_config : * mut aws_s3_meta_request_checksum_config_storage) ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_request_flags { AWS_S3_REQUEST_FLAG_RECORD_RESPONSE_HEADERS = 1 , AWS_S3_REQUEST_FLAG_ALWAYS_SEND = 2 , AWS_S3_REQUEST_FLAG_ALLOCATE_BUFFER_FROM_POOL = 4 , } # [doc = " Information sent in the telemetry_callback after each aws_s3_request finished/retried from meta request."] # [repr (C)] pub struct aws_s3_request_metrics { pub allocator : * mut aws_allocator , pub time_metrics : aws_s3_request_metrics__bindgen_ty_1 , pub req_resp_info_metrics : aws_s3_request_metrics__bindgen_ty_2 , pub crt_info_metrics : aws_s3_request_metrics__bindgen_ty_3 , pub part_info_metrics : aws_s3_request_metrics__bindgen_ty_4 , pub ref_count : aws_ref_count , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_request_metrics__bindgen_ty_1 { pub s3_request_first_attempt_start_timestamp_ns : i64 , pub s3_request_last_attempt_end_timestamp_ns : i64 , pub s3_request_total_duration_ns : i64 , pub start_timestamp_ns : i64 , pub end_timestamp_ns : i64 , pub total_duration_ns : i64 , pub send_start_timestamp_ns : i64 , pub send_end_timestamp_ns : i64 , pub sending_duration_ns : i64 , pub receive_start_timestamp_ns : i64 , pub receive_end_timestamp_ns : i64 , pub receiving_duration_ns : i64 , pub sign_start_timestamp_ns : i64 , pub sign_end_timestamp_ns : i64 , pub signing_duration_ns : i64 , pub mem_acquire_start_timestamp_ns : i64 , pub mem_acquire_end_timestamp_ns : i64 , pub mem_acquire_duration_ns : i64 , pub deliver_start_timestamp_ns : i64 , pub deliver_end_timestamp_ns : i64 , pub deliver_duration_ns : i64 , pub conn_acquire_start_timestamp_ns : i64 , pub conn_acquire_end_timestamp_ns : i64 , pub conn_acquire_duration_ns : i64 , pub retry_delay_start_timestamp_ns : i64 , pub retry_delay_end_timestamp_ns : i64 , pub retry_delay_duration_ns : i64 , pub service_call_duration_ns : i64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_request_metrics__bindgen_ty_1 > () - 224usize] ; ["Alignment of aws_s3_request_metrics__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_request_metrics__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::s3_request_first_attempt_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , s3_request_first_attempt_start_timestamp_ns) - 0usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::s3_request_last_attempt_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , s3_request_last_attempt_end_timestamp_ns) - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::s3_request_total_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , s3_request_total_duration_ns) - 16usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , start_timestamp_ns) - 24usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , end_timestamp_ns) - 32usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::total_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , total_duration_ns) - 40usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::send_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , send_start_timestamp_ns) - 48usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::send_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , send_end_timestamp_ns) - 56usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::sending_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , sending_duration_ns) - 64usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::receive_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , receive_start_timestamp_ns) - 72usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::receive_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , receive_end_timestamp_ns) - 80usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::receiving_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , receiving_duration_ns) - 88usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::sign_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , sign_start_timestamp_ns) - 96usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::sign_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , sign_end_timestamp_ns) - 104usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::signing_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , signing_duration_ns) - 112usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::mem_acquire_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , mem_acquire_start_timestamp_ns) - 120usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::mem_acquire_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , mem_acquire_end_timestamp_ns) - 128usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::mem_acquire_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , mem_acquire_duration_ns) - 136usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::deliver_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , deliver_start_timestamp_ns) - 144usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::deliver_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , deliver_end_timestamp_ns) - 152usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::deliver_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , deliver_duration_ns) - 160usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::conn_acquire_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , conn_acquire_start_timestamp_ns) - 168usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::conn_acquire_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , conn_acquire_end_timestamp_ns) - 176usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::conn_acquire_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , conn_acquire_duration_ns) - 184usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::retry_delay_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , retry_delay_start_timestamp_ns) - 192usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::retry_delay_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , retry_delay_end_timestamp_ns) - 200usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::retry_delay_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , retry_delay_duration_ns) - 208usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::service_call_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , service_call_duration_ns) - 216usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_request_metrics__bindgen_ty_2 { pub response_status : :: libc :: c_int , pub response_headers : * mut aws_http_headers , pub request_path_query : * mut aws_string , pub host_address : * mut aws_string , pub request_id : * mut aws_string , pub extended_request_id : * mut aws_string , pub operation_name : * mut aws_string , pub request_type : aws_s3_request_type , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_request_metrics__bindgen_ty_2 > () - 64usize] ; ["Alignment of aws_s3_request_metrics__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_request_metrics__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::response_status"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , response_status) - 0usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::response_headers"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , response_headers) - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::request_path_query"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , request_path_query) - 16usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::host_address"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , host_address) - 24usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::request_id"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , request_id) - 32usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::extended_request_id"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , extended_request_id) - 40usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::operation_name"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , operation_name) - 48usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::request_type"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , request_type) - 56usize] ; } ; impl Default for aws_s3_request_metrics__bindgen_ty_2 { 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)] pub struct aws_s3_request_metrics__bindgen_ty_3 { pub ip_address : * mut aws_string , pub connection_ptr : * mut :: libc :: c_void , pub request_ptr : * mut :: libc :: c_void , pub thread_id : aws_thread_id_t , pub stream_id : u32 , pub error_code : :: libc :: c_int , pub retry_attempt : u32 , pub memory_allocated_from_pool : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_request_metrics__bindgen_ty_3 > () - 48usize] ; ["Alignment of aws_s3_request_metrics__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_request_metrics__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::ip_address"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , ip_address) - 0usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::connection_ptr"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , connection_ptr) - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::request_ptr"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , request_ptr) - 16usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::thread_id"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , thread_id) - 24usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::stream_id"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , stream_id) - 32usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::error_code"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , error_code) - 36usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::retry_attempt"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , retry_attempt) - 40usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::memory_allocated_from_pool"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , memory_allocated_from_pool) - 44usize] ; } ; impl Default for aws_s3_request_metrics__bindgen_ty_3 { 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)] pub struct aws_s3_request_metrics__bindgen_ty_4 { pub part_range_start : u64 , pub part_range_end : u64 , pub part_number : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics__bindgen_ty_4"] [:: std :: mem :: size_of :: < aws_s3_request_metrics__bindgen_ty_4 > () - 24usize] ; ["Alignment of aws_s3_request_metrics__bindgen_ty_4"] [:: std :: mem :: align_of :: < aws_s3_request_metrics__bindgen_ty_4 > () - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_4::part_range_start"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_4 , part_range_start) - 0usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_4::part_range_end"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_4 , part_range_end) - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_4::part_number"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_4 , part_number) - 16usize] ; } ; # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics"] [:: std :: mem :: size_of :: < aws_s3_request_metrics > () - 392usize] ; ["Alignment of aws_s3_request_metrics"] [:: std :: mem :: align_of :: < aws_s3_request_metrics > () - 8usize] ; ["Offset of field: aws_s3_request_metrics::allocator"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , allocator) - 0usize] ; ["Offset of field: aws_s3_request_metrics::time_metrics"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , time_metrics) - 8usize] ; ["Offset of field: aws_s3_request_metrics::req_resp_info_metrics"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , req_resp_info_metrics) - 232usize] ; ["Offset of field: aws_s3_request_metrics::crt_info_metrics"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , crt_info_metrics) - 296usize] ; ["Offset of field: aws_s3_request_metrics::part_info_metrics"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , part_info_metrics) - 344usize] ; ["Offset of field: aws_s3_request_metrics::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , ref_count) - 368usize] ; } ; impl Default for aws_s3_request_metrics { 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)] pub struct aws_s3_request { pub node : aws_linked_list_node , pub retry_start_timestamp_ns : i64 , pub retry_end_timestamp_ns : i64 , pub cancellable_http_streams_list_node : aws_linked_list_node , pub pending_buffer_future_list_node : aws_linked_list_node , pub synced_data : aws_s3_request__bindgen_ty_1 , pub ref_count : aws_ref_count , pub allocator : * mut aws_allocator , pub meta_request : * mut aws_s3_meta_request , pub buffer_size : usize , pub request_body : aws_byte_buf , pub fio_streaming : bool , pub request_body_stream : * mut aws_input_stream , pub content_length : u64 , # [doc = " Ticket to acquire the buffer."] pub ticket : * mut aws_s3_buffer_ticket , pub part_range_start : u64 , pub part_range_end : u64 , pub part_number : u32 , pub upload_timeout_ms : usize , pub num_times_prepared : u32 , pub request_level_response_header_checksum : aws_byte_buf , pub request_level_running_response_sum : * mut aws_s3_checksum , pub validation_algorithm : aws_s3_checksum_algorithm , pub did_validate : bool , pub checksum_match : bool , pub request_tag : :: libc :: c_int , pub request_type : aws_s3_request_type , pub operation_name : * mut aws_string , pub send_data : aws_s3_request__bindgen_ty_2 , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub __bindgen_padding_0 : [u8 ; 7usize] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_request__bindgen_ty_1 { pub cancellable_http_stream : * mut aws_http_stream , pub buffer_future : * mut aws_future_s3_buffer_ticket , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_request__bindgen_ty_1 > () - 16usize] ; ["Alignment of aws_s3_request__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_request__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_request__bindgen_ty_1::cancellable_http_stream"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_1 , cancellable_http_stream) - 0usize] ; ["Offset of field: aws_s3_request__bindgen_ty_1::buffer_future"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_1 , buffer_future) - 8usize] ; } ; impl Default for aws_s3_request__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 () } } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_request__bindgen_ty_2 { pub message : * mut aws_http_message , pub signable : * mut aws_signable , pub response_headers : * mut aws_http_headers , pub response_body : aws_byte_buf , pub response_status : :: libc :: c_int , pub request_id : * mut aws_string , pub amz_id_2 : * mut aws_string , pub metrics : * mut aws_s3_request_metrics , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub __bindgen_padding_0 : [u8 ; 7usize] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_request__bindgen_ty_2 > () - 96usize] ; ["Alignment of aws_s3_request__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_request__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::message"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , message) - 0usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::signable"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , signable) - 8usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::response_headers"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , response_headers) - 16usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::response_body"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , response_body) - 24usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::response_status"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , response_status) - 56usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::request_id"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , request_id) - 64usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::amz_id_2"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , amz_id_2) - 72usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::metrics"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , metrics) - 80usize] ; } ; impl Default for aws_s3_request__bindgen_ty_2 { 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 () } } } impl aws_s3_request__bindgen_ty_2 { # [inline] pub fn require_streaming_unsigned_payload_header (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_require_streaming_unsigned_payload_header (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn require_streaming_unsigned_payload_header_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_require_streaming_unsigned_payload_header_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (require_streaming_unsigned_payload_header : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let require_streaming_unsigned_payload_header : u32 = unsafe { :: std :: mem :: transmute (require_streaming_unsigned_payload_header) } ; require_streaming_unsigned_payload_header as u64 }) ; __bindgen_bitfield_unit } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request"] [:: std :: mem :: size_of :: < aws_s3_request > () - 400usize] ; ["Alignment of aws_s3_request"] [:: std :: mem :: align_of :: < aws_s3_request > () - 8usize] ; ["Offset of field: aws_s3_request::node"] [:: std :: mem :: offset_of ! (aws_s3_request , node) - 0usize] ; ["Offset of field: aws_s3_request::retry_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request , retry_start_timestamp_ns) - 16usize] ; ["Offset of field: aws_s3_request::retry_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request , retry_end_timestamp_ns) - 24usize] ; ["Offset of field: aws_s3_request::cancellable_http_streams_list_node"] [:: std :: mem :: offset_of ! (aws_s3_request , cancellable_http_streams_list_node) - 32usize] ; ["Offset of field: aws_s3_request::pending_buffer_future_list_node"] [:: std :: mem :: offset_of ! (aws_s3_request , pending_buffer_future_list_node) - 48usize] ; ["Offset of field: aws_s3_request::synced_data"] [:: std :: mem :: offset_of ! (aws_s3_request , synced_data) - 64usize] ; ["Offset of field: aws_s3_request::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_request , ref_count) - 80usize] ; ["Offset of field: aws_s3_request::allocator"] [:: std :: mem :: offset_of ! (aws_s3_request , allocator) - 104usize] ; ["Offset of field: aws_s3_request::meta_request"] [:: std :: mem :: offset_of ! (aws_s3_request , meta_request) - 112usize] ; ["Offset of field: aws_s3_request::buffer_size"] [:: std :: mem :: offset_of ! (aws_s3_request , buffer_size) - 120usize] ; ["Offset of field: aws_s3_request::request_body"] [:: std :: mem :: offset_of ! (aws_s3_request , request_body) - 128usize] ; ["Offset of field: aws_s3_request::fio_streaming"] [:: std :: mem :: offset_of ! (aws_s3_request , fio_streaming) - 160usize] ; ["Offset of field: aws_s3_request::request_body_stream"] [:: std :: mem :: offset_of ! (aws_s3_request , request_body_stream) - 168usize] ; ["Offset of field: aws_s3_request::content_length"] [:: std :: mem :: offset_of ! (aws_s3_request , content_length) - 176usize] ; ["Offset of field: aws_s3_request::ticket"] [:: std :: mem :: offset_of ! (aws_s3_request , ticket) - 184usize] ; ["Offset of field: aws_s3_request::part_range_start"] [:: std :: mem :: offset_of ! (aws_s3_request , part_range_start) - 192usize] ; ["Offset of field: aws_s3_request::part_range_end"] [:: std :: mem :: offset_of ! (aws_s3_request , part_range_end) - 200usize] ; ["Offset of field: aws_s3_request::part_number"] [:: std :: mem :: offset_of ! (aws_s3_request , part_number) - 208usize] ; ["Offset of field: aws_s3_request::upload_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_request , upload_timeout_ms) - 216usize] ; ["Offset of field: aws_s3_request::num_times_prepared"] [:: std :: mem :: offset_of ! (aws_s3_request , num_times_prepared) - 224usize] ; ["Offset of field: aws_s3_request::request_level_response_header_checksum"] [:: std :: mem :: offset_of ! (aws_s3_request , request_level_response_header_checksum) - 232usize] ; ["Offset of field: aws_s3_request::request_level_running_response_sum"] [:: std :: mem :: offset_of ! (aws_s3_request , request_level_running_response_sum) - 264usize] ; ["Offset of field: aws_s3_request::validation_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_request , validation_algorithm) - 272usize] ; ["Offset of field: aws_s3_request::did_validate"] [:: std :: mem :: offset_of ! (aws_s3_request , did_validate) - 276usize] ; ["Offset of field: aws_s3_request::checksum_match"] [:: std :: mem :: offset_of ! (aws_s3_request , checksum_match) - 277usize] ; ["Offset of field: aws_s3_request::request_tag"] [:: std :: mem :: offset_of ! (aws_s3_request , request_tag) - 280usize] ; ["Offset of field: aws_s3_request::request_type"] [:: std :: mem :: offset_of ! (aws_s3_request , request_type) - 284usize] ; ["Offset of field: aws_s3_request::operation_name"] [:: std :: mem :: offset_of ! (aws_s3_request , operation_name) - 288usize] ; ["Offset of field: aws_s3_request::send_data"] [:: std :: mem :: offset_of ! (aws_s3_request , send_data) - 296usize] ; } ; impl Default for aws_s3_request { 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 () } } } impl aws_s3_request { # [inline] pub fn record_response_headers (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_record_response_headers (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn record_response_headers_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_record_response_headers_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn should_allocate_buffer_from_pool (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_should_allocate_buffer_from_pool (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub unsafe fn should_allocate_buffer_from_pool_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 1usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_should_allocate_buffer_from_pool_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 1usize , 1u8 , val as u64 ,) } } # [inline] pub fn tracked_by_client (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_tracked_by_client (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub unsafe fn tracked_by_client_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 2usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_tracked_by_client_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 2usize , 1u8 , val as u64 ,) } } # [inline] pub fn always_send (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_always_send (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (3usize , 1u8 , val as u64) } } # [inline] pub unsafe fn always_send_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 3usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_always_send_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 3usize , 1u8 , val as u64 ,) } } # [inline] pub fn discovers_object_size (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (4usize , 1u8) as u32) } } # [inline] pub fn set_discovers_object_size (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (4usize , 1u8 , val as u64) } } # [inline] pub unsafe fn discovers_object_size_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 4usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_discovers_object_size_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 4usize , 1u8 , val as u64 ,) } } # [inline] pub fn is_noop (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (5usize , 1u8) as u32) } } # [inline] pub fn set_is_noop (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (5usize , 1u8 , val as u64) } } # [inline] pub unsafe fn is_noop_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 5usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_is_noop_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 5usize , 1u8 , val as u64 ,) } } # [inline] pub fn was_previously_uploaded (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 1u8) as u32) } } # [inline] pub fn set_was_previously_uploaded (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (6usize , 1u8 , val as u64) } } # [inline] pub unsafe fn was_previously_uploaded_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 6usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_was_previously_uploaded_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 6usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (record_response_headers : u32 , should_allocate_buffer_from_pool : u32 , tracked_by_client : u32 , always_send : u32 , discovers_object_size : u32 , is_noop : u32 , was_previously_uploaded : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let record_response_headers : u32 = unsafe { :: std :: mem :: transmute (record_response_headers) } ; record_response_headers as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let should_allocate_buffer_from_pool : u32 = unsafe { :: std :: mem :: transmute (should_allocate_buffer_from_pool) } ; should_allocate_buffer_from_pool as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let tracked_by_client : u32 = unsafe { :: std :: mem :: transmute (tracked_by_client) } ; tracked_by_client as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let always_send : u32 = unsafe { :: std :: mem :: transmute (always_send) } ; always_send as u64 }) ; __bindgen_bitfield_unit . set (4usize , 1u8 , { let discovers_object_size : u32 = unsafe { :: std :: mem :: transmute (discovers_object_size) } ; discovers_object_size as u64 }) ; __bindgen_bitfield_unit . set (5usize , 1u8 , { let is_noop : u32 = unsafe { :: std :: mem :: transmute (is_noop) } ; is_noop as u64 }) ; __bindgen_bitfield_unit . set (6usize , 1u8 , { let was_previously_uploaded : u32 = unsafe { :: std :: mem :: transmute (was_previously_uploaded) } ; was_previously_uploaded as u64 }) ; __bindgen_bitfield_unit } } unsafe extern "C" { pub fn aws_s3_request_new (meta_request : * mut aws_s3_meta_request , request_tag : :: libc :: c_int , request_type : aws_s3_request_type , part_number : u32 , flags : u32) -> * mut aws_s3_request ; } unsafe extern "C" { pub fn aws_s3_request_setup_send_data (request : * mut aws_s3_request , message : * mut aws_http_message) ; } unsafe extern "C" { pub fn aws_s3_request_clean_up_send_data (request : * mut aws_s3_request) ; } unsafe extern "C" { pub fn aws_s3_request_acquire (request : * mut aws_s3_request) -> * mut aws_s3_request ; } unsafe extern "C" { pub fn aws_s3_request_release (request : * mut aws_s3_request) -> * mut aws_s3_request ; } unsafe extern "C" { pub fn aws_s3_request_metrics_new (allocator : * mut aws_allocator) -> * mut aws_s3_request_metrics ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_state { AWS_S3_META_REQUEST_STATE_ACTIVE = 0 , AWS_S3_META_REQUEST_STATE_FINISHED = 1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_update_flags { AWS_S3_META_REQUEST_UPDATE_FLAG_CONSERVATIVE = 2 , } pub type aws_s3_meta_request_prepare_request_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_s3_prepare_request_payload { pub allocator : * mut aws_allocator , pub request : * mut aws_s3_request , pub task : aws_task , pub asyncstep_prepare_request : * mut aws_future_void , pub callback : aws_s3_meta_request_prepare_request_callback_fn , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_prepare_request_payload"] [:: std :: mem :: size_of :: < aws_s3_prepare_request_payload > () - 104usize] ; ["Alignment of aws_s3_prepare_request_payload"] [:: std :: mem :: align_of :: < aws_s3_prepare_request_payload > () - 8usize] ; ["Offset of field: aws_s3_prepare_request_payload::allocator"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , allocator) - 0usize] ; ["Offset of field: aws_s3_prepare_request_payload::request"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , request) - 8usize] ; ["Offset of field: aws_s3_prepare_request_payload::task"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , task) - 16usize] ; ["Offset of field: aws_s3_prepare_request_payload::asyncstep_prepare_request"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , asyncstep_prepare_request) - 80usize] ; ["Offset of field: aws_s3_prepare_request_payload::callback"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , callback) - 88usize] ; ["Offset of field: aws_s3_prepare_request_payload::user_data"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , user_data) - 96usize] ; } ; impl Default for aws_s3_prepare_request_payload { 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 (Copy , Clone)] pub struct aws_s3_meta_request_event { pub type_ : aws_s3_meta_request_event_aws_s3_meta_request_event_type , pub u : aws_s3_meta_request_event__bindgen_ty_1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_event_aws_s3_meta_request_event_type { AWS_S3_META_REQUEST_EVENT_RESPONSE_BODY = 0 , AWS_S3_META_REQUEST_EVENT_PROGRESS = 1 , AWS_S3_META_REQUEST_EVENT_TELEMETRY = 2 , } # [repr (C)] # [derive (Copy , Clone)] pub union aws_s3_meta_request_event__bindgen_ty_1 { pub response_body : aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 , pub progress : aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 , pub telemetry : aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 { pub completed_request : * mut aws_s3_request , pub bytes_delivered : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 > () - 16usize] ; ["Alignment of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1::completed_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 , completed_request) - 0usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1::bytes_delivered"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 , bytes_delivered) - 8usize] ; } ; impl Default for aws_s3_meta_request_event__bindgen_ty_1__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 () } } } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 { pub info : aws_s3_meta_request_progress , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 > () - 16usize] ; ["Alignment of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2::info"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 , info) - 0usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 { pub metrics : * mut aws_s3_request_metrics , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 > () - 8usize] ; ["Alignment of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3::metrics"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 , metrics) - 0usize] ; } ; impl Default for aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 { 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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event__bindgen_ty_1 > () - 16usize] ; ["Alignment of aws_s3_meta_request_event__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1::response_body"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1 , response_body) - 0usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1::progress"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1 , progress) - 0usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1::telemetry"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1 , telemetry) - 0usize] ; } ; impl Default for aws_s3_meta_request_event__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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event > () - 24usize] ; ["Alignment of aws_s3_meta_request_event"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event::type_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event , type_) - 0usize] ; ["Offset of field: aws_s3_meta_request_event::u"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event , u) - 8usize] ; } ; impl Default for aws_s3_meta_request_event { 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)] pub struct aws_s3_meta_request_vtable { pub update : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , flags : u32 , out_request : * mut * mut aws_s3_request) -> bool > , pub schedule_prepare_request : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , callback : aws_s3_meta_request_prepare_request_callback_fn , user_data : * mut :: libc :: c_void) > , pub prepare_request : :: std :: option :: Option < unsafe extern "C" fn (request : * mut aws_s3_request) -> * mut aws_future_void > , pub init_signing_date_time : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , date_time : * mut aws_date_time) > , pub sign_request : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , on_signing_complete : aws_signing_complete_fn , user_data : * mut :: libc :: c_void) > , pub send_request_finish : :: std :: option :: Option < unsafe extern "C" fn (connection : * mut aws_s3_connection , stream : * mut aws_http_stream , error_code : :: libc :: c_int) > , pub finished_request : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , error_code : :: libc :: c_int) > , pub finish : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request) > , pub destroy : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut aws_s3_meta_request) > , pub pause : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , resume_token : * mut * mut aws_s3_meta_request_resume_token) -> :: libc :: c_int > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_vtable"] [:: std :: mem :: size_of :: < aws_s3_meta_request_vtable > () - 80usize] ; ["Alignment of aws_s3_meta_request_vtable"] [:: std :: mem :: align_of :: < aws_s3_meta_request_vtable > () - 8usize] ; ["Offset of field: aws_s3_meta_request_vtable::update"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , update) - 0usize] ; ["Offset of field: aws_s3_meta_request_vtable::schedule_prepare_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , schedule_prepare_request) - 8usize] ; ["Offset of field: aws_s3_meta_request_vtable::prepare_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , prepare_request) - 16usize] ; ["Offset of field: aws_s3_meta_request_vtable::init_signing_date_time"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , init_signing_date_time) - 24usize] ; ["Offset of field: aws_s3_meta_request_vtable::sign_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , sign_request) - 32usize] ; ["Offset of field: aws_s3_meta_request_vtable::send_request_finish"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , send_request_finish) - 40usize] ; ["Offset of field: aws_s3_meta_request_vtable::finished_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , finished_request) - 48usize] ; ["Offset of field: aws_s3_meta_request_vtable::finish"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , finish) - 56usize] ; ["Offset of field: aws_s3_meta_request_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , destroy) - 64usize] ; ["Offset of field: aws_s3_meta_request_vtable::pause"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , pause) - 72usize] ; } ; # [doc = " This represents one meta request, ie, one accelerated file transfer.  One S3 meta request can represent multiple S3\n requests."] # [repr (C)] pub struct aws_s3_meta_request { pub allocator : * mut aws_allocator , pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , pub vtable : * mut aws_s3_meta_request_vtable , pub initial_request_message : * mut aws_http_message , pub request_body_async_stream : * mut aws_async_input_stream , pub request_body_parallel_stream : * mut aws_parallel_input_stream , pub request_body_using_async_writes : bool , pub part_size : usize , pub max_active_connections_override : u32 , pub cached_signing_config : * mut aws_cached_signing_config_aws , pub client : * mut aws_s3_client , pub endpoint : * mut aws_s3_endpoint , pub num_requests_network : aws_atomic_var , pub io_event_loop : * mut aws_event_loop , pub user_data : * mut :: libc :: c_void , pub headers_callback : aws_s3_meta_request_headers_callback_fn , pub body_callback : aws_s3_meta_request_receive_body_callback_fn , pub body_callback_ex : aws_s3_meta_request_receive_body_callback_ex_fn , pub finish_callback : aws_s3_meta_request_finish_fn , pub shutdown_callback : aws_s3_meta_request_shutdown_fn , pub progress_callback : aws_s3_meta_request_progress_fn , pub telemetry_callback : aws_s3_meta_request_telemetry_fn , pub upload_review_callback : aws_s3_meta_request_upload_review_fn , pub type_ : aws_s3_meta_request_type , pub s3express_session_host : * mut aws_string , pub is_express : bool , pub buffer_pool_optimized : bool , pub num_request_being_prepared : aws_atomic_var , pub synced_data : aws_s3_meta_request__bindgen_ty_1 , pub client_process_work_threaded_data : aws_s3_meta_request__bindgen_ty_2 , pub io_threaded_data : aws_s3_meta_request__bindgen_ty_3 , pub should_compute_content_md5 : bool , pub checksum_config : aws_s3_meta_request_checksum_config_storage , pub meta_request_level_response_header_checksum : aws_byte_buf , pub meta_request_level_running_response_sum : * mut aws_s3_checksum , pub recv_file : * mut FILE , pub recv_filepath : * mut aws_string , pub recv_file_delete_on_failure : bool , pub fio_opts : aws_s3_file_io_options , } # [repr (C)] pub struct aws_s3_meta_request__bindgen_ty_1 { pub lock : aws_mutex , pub pending_body_streaming_requests : aws_priority_queue , pub state : aws_s3_meta_request_state , pub read_window_running_total : u64 , pub next_streaming_part : u32 , pub num_parts_delivery_sent : u32 , pub num_parts_delivery_completed : u32 , pub event_delivery_task : aws_task , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub event_delivery_array : aws_array_list , pub event_delivery_active : bool , pub finish_result : aws_s3_meta_request_result , pub _bitfield_align_2 : [u8 ; 0] , pub _bitfield_2 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub cancellable_http_streams_list : aws_linked_list , pub pending_buffer_futures : aws_linked_list , pub async_write : aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data { pub ready_to_send : bool , pub eof : bool , pub buffered_data : aws_byte_buf , pub buffered_data_ticket : * mut aws_s3_buffer_ticket , pub waker : aws_simple_completion_callback , pub waker_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data"] [:: std :: mem :: size_of :: < aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data > () - 64usize] ; ["Alignment of aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data"] [:: std :: mem :: align_of :: < aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data > () - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::ready_to_send"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , ready_to_send) - 0usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::eof"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , eof) - 1usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::buffered_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , buffered_data) - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::buffered_data_ticket"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , buffered_data_ticket) - 40usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::waker"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , waker) - 48usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::waker_user_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , waker_user_data) - 56usize] ; } ; impl Default for aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_meta_request__bindgen_ty_1 > () - 464usize] ; ["Alignment of aws_s3_meta_request__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_meta_request__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::lock"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , lock) - 0usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::pending_body_streaming_requests"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , pending_body_streaming_requests) - 48usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::state"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , state) - 136usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::read_window_running_total"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , read_window_running_total) - 144usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::next_streaming_part"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , next_streaming_part) - 152usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::num_parts_delivery_sent"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , num_parts_delivery_sent) - 156usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::num_parts_delivery_completed"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , num_parts_delivery_completed) - 160usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::event_delivery_task"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , event_delivery_task) - 168usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::event_delivery_array"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , event_delivery_array) - 240usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::event_delivery_active"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , event_delivery_active) - 280usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::finish_result"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , finish_result) - 288usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::cancellable_http_streams_list"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , cancellable_http_streams_list) - 336usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::pending_buffer_futures"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , pending_buffer_futures) - 368usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::async_write"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , async_write) - 400usize] ; } ; impl Default for aws_s3_meta_request__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 () } } } impl aws_s3_meta_request__bindgen_ty_1 { # [inline] pub fn event_delivery_task_scheduled (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_event_delivery_task_scheduled (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn event_delivery_task_scheduled_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_event_delivery_task_scheduled_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (event_delivery_task_scheduled : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let event_delivery_task_scheduled : u32 = unsafe { :: std :: mem :: transmute (event_delivery_task_scheduled) } ; event_delivery_task_scheduled as u64 }) ; __bindgen_bitfield_unit } # [inline] pub fn finish_result_set (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_2 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_finish_result_set (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_2 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn finish_result_set_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_2) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_finish_result_set_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_2) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_2 (finish_result_set : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let finish_result_set : u32 = unsafe { :: std :: mem :: transmute (finish_result_set) } ; finish_result_set as u64 }) ; __bindgen_bitfield_unit } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request__bindgen_ty_2 { pub node : aws_linked_list_node , pub scheduled : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_meta_request__bindgen_ty_2 > () - 24usize] ; ["Alignment of aws_s3_meta_request__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_meta_request__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_2::node"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_2 , node) - 0usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_2::scheduled"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_2 , scheduled) - 16usize] ; } ; impl Default for aws_s3_meta_request__bindgen_ty_2 { 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)] pub struct aws_s3_meta_request__bindgen_ty_3 { pub event_delivery_array : aws_array_list , pub next_deliver_range_start : u64 , pub num_bytes_delivery_completed : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_meta_request__bindgen_ty_3 > () - 56usize] ; ["Alignment of aws_s3_meta_request__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_meta_request__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_3::event_delivery_array"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_3 , event_delivery_array) - 0usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_3::next_deliver_range_start"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_3 , next_deliver_range_start) - 40usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_3::num_bytes_delivery_completed"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_3 , num_bytes_delivery_completed) - 48usize] ; } ; impl Default for aws_s3_meta_request__bindgen_ty_3 { 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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request"] [:: std :: mem :: size_of :: < aws_s3_meta_request > () - 960usize] ; ["Alignment of aws_s3_meta_request"] [:: std :: mem :: align_of :: < aws_s3_meta_request > () - 8usize] ; ["Offset of field: aws_s3_meta_request::allocator"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , allocator) - 0usize] ; ["Offset of field: aws_s3_meta_request::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , ref_count) - 8usize] ; ["Offset of field: aws_s3_meta_request::impl_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , impl_) - 32usize] ; ["Offset of field: aws_s3_meta_request::vtable"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , vtable) - 40usize] ; ["Offset of field: aws_s3_meta_request::initial_request_message"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , initial_request_message) - 48usize] ; ["Offset of field: aws_s3_meta_request::request_body_async_stream"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , request_body_async_stream) - 56usize] ; ["Offset of field: aws_s3_meta_request::request_body_parallel_stream"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , request_body_parallel_stream) - 64usize] ; ["Offset of field: aws_s3_meta_request::request_body_using_async_writes"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , request_body_using_async_writes) - 72usize] ; ["Offset of field: aws_s3_meta_request::part_size"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , part_size) - 80usize] ; ["Offset of field: aws_s3_meta_request::max_active_connections_override"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , max_active_connections_override) - 88usize] ; ["Offset of field: aws_s3_meta_request::cached_signing_config"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , cached_signing_config) - 96usize] ; ["Offset of field: aws_s3_meta_request::client"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , client) - 104usize] ; ["Offset of field: aws_s3_meta_request::endpoint"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , endpoint) - 112usize] ; ["Offset of field: aws_s3_meta_request::num_requests_network"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , num_requests_network) - 120usize] ; ["Offset of field: aws_s3_meta_request::io_event_loop"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , io_event_loop) - 128usize] ; ["Offset of field: aws_s3_meta_request::user_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , user_data) - 136usize] ; ["Offset of field: aws_s3_meta_request::headers_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , headers_callback) - 144usize] ; ["Offset of field: aws_s3_meta_request::body_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , body_callback) - 152usize] ; ["Offset of field: aws_s3_meta_request::body_callback_ex"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , body_callback_ex) - 160usize] ; ["Offset of field: aws_s3_meta_request::finish_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , finish_callback) - 168usize] ; ["Offset of field: aws_s3_meta_request::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , shutdown_callback) - 176usize] ; ["Offset of field: aws_s3_meta_request::progress_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , progress_callback) - 184usize] ; ["Offset of field: aws_s3_meta_request::telemetry_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , telemetry_callback) - 192usize] ; ["Offset of field: aws_s3_meta_request::upload_review_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , upload_review_callback) - 200usize] ; ["Offset of field: aws_s3_meta_request::type_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , type_) - 208usize] ; ["Offset of field: aws_s3_meta_request::s3express_session_host"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , s3express_session_host) - 216usize] ; ["Offset of field: aws_s3_meta_request::is_express"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , is_express) - 224usize] ; ["Offset of field: aws_s3_meta_request::buffer_pool_optimized"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , buffer_pool_optimized) - 225usize] ; ["Offset of field: aws_s3_meta_request::num_request_being_prepared"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , num_request_being_prepared) - 232usize] ; ["Offset of field: aws_s3_meta_request::synced_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , synced_data) - 240usize] ; ["Offset of field: aws_s3_meta_request::client_process_work_threaded_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , client_process_work_threaded_data) - 704usize] ; ["Offset of field: aws_s3_meta_request::io_threaded_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , io_threaded_data) - 728usize] ; ["Offset of field: aws_s3_meta_request::should_compute_content_md5"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , should_compute_content_md5) - 784usize] ; ["Offset of field: aws_s3_meta_request::checksum_config"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , checksum_config) - 792usize] ; ["Offset of field: aws_s3_meta_request::meta_request_level_response_header_checksum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , meta_request_level_response_header_checksum) - 872usize] ; ["Offset of field: aws_s3_meta_request::meta_request_level_running_response_sum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , meta_request_level_running_response_sum) - 904usize] ; ["Offset of field: aws_s3_meta_request::recv_file"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , recv_file) - 912usize] ; ["Offset of field: aws_s3_meta_request::recv_filepath"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , recv_filepath) - 920usize] ; ["Offset of field: aws_s3_meta_request::recv_file_delete_on_failure"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , recv_file_delete_on_failure) - 928usize] ; ["Offset of field: aws_s3_meta_request::fio_opts"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , fio_opts) - 936usize] ; } ; impl Default for aws_s3_meta_request { 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)] pub struct aws_s3_mpu_part_info { pub size : u64 , pub etag : * mut aws_string , pub checksum_context : * mut aws_s3_upload_request_checksum_context , pub was_previously_uploaded : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_mpu_part_info"] [:: std :: mem :: size_of :: < aws_s3_mpu_part_info > () - 32usize] ; ["Alignment of aws_s3_mpu_part_info"] [:: std :: mem :: align_of :: < aws_s3_mpu_part_info > () - 8usize] ; ["Offset of field: aws_s3_mpu_part_info::size"] [:: std :: mem :: offset_of ! (aws_s3_mpu_part_info , size) - 0usize] ; ["Offset of field: aws_s3_mpu_part_info::etag"] [:: std :: mem :: offset_of ! (aws_s3_mpu_part_info , etag) - 8usize] ; ["Offset of field: aws_s3_mpu_part_info::checksum_context"] [:: std :: mem :: offset_of ! (aws_s3_mpu_part_info , checksum_context) - 16usize] ; ["Offset of field: aws_s3_mpu_part_info::was_previously_uploaded"] [:: std :: mem :: offset_of ! (aws_s3_mpu_part_info , was_previously_uploaded) - 24usize] ; } ; impl Default for aws_s3_mpu_part_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 () } } } unsafe extern "C" { pub fn aws_s3_meta_request_init_base (allocator : * mut aws_allocator , client : * mut aws_s3_client , part_size : usize , should_compute_content_md5 : bool , should_default_streaming : bool , options : * const aws_s3_meta_request_options , impl_ : * mut :: libc :: c_void , vtable : * mut aws_s3_meta_request_vtable , base_type : * mut aws_s3_meta_request) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_meta_request_is_active (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_is_finished (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_has_finish_result (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_lock_synced_data (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_unlock_synced_data (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_update (meta_request : * mut aws_s3_meta_request , flags : u32 , out_request : * mut * mut aws_s3_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_prepare_request (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , callback : aws_s3_meta_request_prepare_request_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_s3_meta_request_send_request (meta_request : * mut aws_s3_meta_request , connection : * mut aws_s3_connection) ; } unsafe extern "C" { pub fn aws_s3_meta_request_init_signing_date_time_default (meta_request : * mut aws_s3_meta_request , date_time : * mut aws_date_time) ; } unsafe extern "C" { pub fn aws_s3_meta_request_sign_request_default_impl (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , on_signing_complete : aws_signing_complete_fn , user_data : * mut :: libc :: c_void , disable_s3_express_signing : bool) ; } unsafe extern "C" { pub fn aws_s3_meta_request_sign_request_default (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , on_signing_complete : aws_signing_complete_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_s3_meta_request_send_request_finish_default (connection : * mut aws_s3_connection , stream : * mut aws_http_stream , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_finished_request (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_stream_response_body_synced (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_add_event_for_delivery_synced (meta_request : * mut aws_s3_meta_request , event : * const aws_s3_meta_request_event) ; } unsafe extern "C" { pub fn aws_s3_meta_request_are_events_out_for_delivery_synced (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_cancel_cancellable_requests_synced (meta_request : * mut aws_s3_meta_request , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_cancel_pending_buffer_futures_synced (meta_request : * mut aws_s3_meta_request , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_read_body (meta_request : * mut aws_s3_meta_request , offset : u64 , buffer : * mut aws_byte_buf) -> * mut aws_future_bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_set_fail_synced (meta_request : * mut aws_s3_meta_request , failed_request : * mut aws_s3_request , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_set_success_synced (meta_request : * mut aws_s3_meta_request , response_status : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_has_finish_result_synced (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_finish (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_finish_default (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_result_setup (meta_request : * mut aws_s3_meta_request , result : * mut aws_s3_meta_request_result , failed_request : * mut aws_s3_request , response_status : :: libc :: c_int , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_result_clean_up (meta_request : * mut aws_s3_meta_request , result : * mut aws_s3_meta_request_result) ; } unsafe extern "C" { pub fn aws_s3_meta_request_checksum_config_has_algorithm (meta_request : * mut aws_s3_meta_request , algorithm : aws_s3_checksum_algorithm) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_schedule_prepare_request_default_impl (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , parallel : bool , callback : aws_s3_meta_request_prepare_request_callback_fn , user_data : * mut :: libc :: c_void) ; } pub type __builtin_va_list = [__va_list_tag ; 1usize] ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct __va_list_tag { pub gp_offset : :: libc :: c_uint , pub fp_offset : :: libc :: c_uint , pub overflow_arg_area : * mut :: libc :: c_void , pub reg_save_area : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of __va_list_tag"] [:: std :: mem :: size_of :: < __va_list_tag > () - 24usize] ; ["Alignment of __va_list_tag"] [:: std :: mem :: align_of :: < __va_list_tag > () - 8usize] ; ["Offset of field: __va_list_tag::gp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , gp_offset) - 0usize] ; ["Offset of field: __va_list_tag::fp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , fp_offset) - 4usize] ; ["Offset of field: __va_list_tag::overflow_arg_area"] [:: std :: mem :: offset_of ! (__va_list_tag , overflow_arg_area) - 8usize] ; ["Offset of field: __va_list_tag::reg_save_area"] [:: std :: mem :: offset_of ! (__va_list_tag , reg_save_area) - 16usize] ; } ; impl Default for __va_list_tag { 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 = " (Optional)\n Use a cached merged profile collection. A merge collection has both config file\n (~/.aws/config) and credentials file based profile collection (~/.aws/credentials) using\n `aws_profile_collection_new_from_merge`.\n If this option is provided, `config_file_name_override` and `credentials_file_name_override` will be ignored."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_profile_collection { pub _address : u8 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_tls_ctx { pub _address : u8 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_parallel_input_stream { pub _address : u8 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_cached_signing_config_aws { pub _address : u8 , }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     +                +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unclosed HTML tag `bool`
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/mountpoint-s3-crt-sys-ba8805edaea6a745/out/bindings.rs:5:165288
[INFO] [stdout]   |
[INFO] [stdout] 5 | ..., result : bool) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_get_...
[INFO] [stdout]   |                                                                  ^^^^^^
[INFO] [stdout]   |
[INFO] [stdout] help: try marking as source code
[INFO] [stdout]   |
[INFO] [stdout] 5 | # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > where Storage : AsRef < [u8] > + AsMut < [u8] >, { # [inline] fn extract_bit (byte : u8 , index : usize) -> bool { let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn get_bit (& self , index : usize) -> bool { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = self . storage . as_ref () [byte_index] ; Self :: extract_bit (byte , index) } # [inline] pub unsafe fn raw_get_bit (this : * const Self , index : usize) -> bool { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { * (core :: ptr :: addr_of ! ((* this) . storage) as * const u8) . offset (byte_index as isize) } ; Self :: extract_bit (byte , index) } # [inline] fn change_bit (byte : u8 , index : usize , val : bool) -> u8 { let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { byte | mask } else { byte & ! mask } } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; * byte = Self :: change_bit (* byte , index , val) ; } # [inline] pub unsafe fn raw_set_bit (this : * mut Self , index : usize , val : bool) { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { (core :: ptr :: addr_of_mut ! ((* this) . storage) as * mut u8) . offset (byte_index as isize) } ; unsafe { * byte = Self :: change_bit (* byte , index , val) } ; } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; val |= 1 << index ; } } val } # [inline] pub unsafe fn raw_get (this : * const Self , bit_offset : usize , bit_width : u8 ,) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if unsafe { Self :: raw_get_bit (this , i + bit_offset) } { let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; val |= 1 << index ; } } val } # [inline] pub fn set (& mut self , bit_offset : usize , bit_width : u8 , val : u64) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } # [inline] pub unsafe fn raw_set (this : * mut Self , bit_offset : usize , bit_width : u8 , val : u64 ,) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; unsafe { Self :: raw_set_bit (this , index + bit_offset , val_bit_is_set) } ; } } } pub const PRInSTR : & [u8 ; 5] = b"%.*s\0" ; pub const AWS_PACKAGE_SLOTS : i32 = 32 ; pub const AWS_C_COMMON_PACKAGE_ID : i32 = 0 ; pub const AWS_OP_SUCCESS : i32 = 0 ; pub const AWS_OP_ERR : i32 = - 1 ; pub const AWS_ERROR_ENUM_STRIDE_BITS : i32 = 10 ; pub const AWS_ERROR_ENUM_STRIDE : i32 = 1024 ; pub const SIZE_BITS : i32 = 64 ; pub const AWS_C_IO_PACKAGE_ID : i32 = 1 ; pub const AWS_THREAD_NAME_RECOMMENDED_STRLEN : i32 = 15 ; pub const AWS_THREAD_ONCE_STATIC_INIT : i32 = 0 ; pub const AWS_LOG_LEVEL_NONE : i32 = 0 ; pub const AWS_LOG_LEVEL_FATAL : i32 = 1 ; pub const AWS_LOG_LEVEL_ERROR : i32 = 2 ; pub const AWS_LOG_LEVEL_WARN : i32 = 3 ; pub const AWS_LOG_LEVEL_INFO : i32 = 4 ; pub const AWS_LOG_LEVEL_DEBUG : i32 = 5 ; pub const AWS_LOG_LEVEL_TRACE : i32 = 6 ; pub const AWS_C_SDKUTILS_PACKAGE_ID : i32 = 15 ; pub const AWS_C_AUTH_PACKAGE_ID : i32 = 6 ; pub const AWS_C_HTTP_PACKAGE_ID : i32 = 2 ; pub const AWS_SHA512_LEN : i32 = 64 ; pub const AWS_SHA256_LEN : i32 = 32 ; pub const AWS_SHA1_LEN : i32 = 20 ; pub const AWS_MD5_LEN : i32 = 16 ; pub const AWS_HTTP2_DEFAULT_MAX_CLOSED_STREAMS : i32 = 32 ; pub const AWS_HTTP2_PING_DATA_SIZE : i32 = 8 ; pub const AWS_HTTP2_SETTINGS_COUNT : i32 = 6 ; pub const AWS_C_S3_PACKAGE_ID : i32 = 14 ; pub const AWS_S3_CLIENT_VERSION : & [u8 ; 6] = b"0.1.x\0" ; pub const AWS_CACHE_LINE : _bindgen_ty_18 = _bindgen_ty_18 :: AWS_CACHE_LINE ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_18 { AWS_CACHE_LINE = 64 , } pub type __gnuc_va_list = __builtin_va_list ; pub type va_list = __gnuc_va_list ; unsafe extern "C" { pub fn aws_fatal_assert (cond_str : * const :: libc :: c_char , file : * const :: libc :: c_char , line : :: libc :: c_int) -> ! ; } pub type pthread_once_t = :: libc :: 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)] pub struct aws_allocator { pub mem_acquire : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , size : usize) -> * mut :: libc :: c_void > , pub mem_release : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , ptr : * mut :: libc :: c_void) > , pub mem_realloc : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , oldptr : * mut :: libc :: c_void , oldsize : usize , newsize : usize) -> * mut :: libc :: c_void > , pub mem_calloc : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , num : usize , size : usize) -> * mut :: libc :: c_void > , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_allocator"] [:: std :: mem :: size_of :: < aws_allocator > () - 40usize] ; ["Alignment of aws_allocator"] [:: std :: mem :: align_of :: < aws_allocator > () - 8usize] ; ["Offset of field: aws_allocator::mem_acquire"] [:: std :: mem :: offset_of ! (aws_allocator , mem_acquire) - 0usize] ; ["Offset of field: aws_allocator::mem_release"] [:: std :: mem :: offset_of ! (aws_allocator , mem_release) - 8usize] ; ["Offset of field: aws_allocator::mem_realloc"] [:: std :: mem :: offset_of ! (aws_allocator , mem_realloc) - 16usize] ; ["Offset of field: aws_allocator::mem_calloc"] [:: std :: mem :: offset_of ! (aws_allocator , mem_calloc) - 24usize] ; ["Offset of field: aws_allocator::impl_"] [:: std :: mem :: offset_of ! (aws_allocator , impl_) - 32usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Inexpensive (constant time) check of data-structure invariants."] pub fn aws_allocator_is_valid (alloc : * const aws_allocator) -> bool ; } unsafe extern "C" { pub fn aws_default_allocator () -> * mut aws_allocator ; } unsafe extern "C" { pub fn aws_aligned_allocator () -> * mut aws_allocator ; } unsafe 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\n NULL. In later versions, if allocator->mem_acquire() returns NULL, this function will assert and exit. To handle\n conditions where OOM is not a fatal error, allocator->mem_acquire() is responsible for finding/reclaiming/running a\n GC etc...before returning."] pub fn aws_mem_acquire (allocator : * mut aws_allocator , size : usize) -> * mut :: libc :: c_void ; } unsafe 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\n to zero. In versions v0.6.8 and prior, this function was allowed to return NULL.\n In later versions, if allocator->mem_calloc() returns NULL, this function will assert and exit. To handle\n conditions where OOM is not a fatal error, allocator->mem_calloc() is responsible for finding/reclaiming/running a\n GC etc...before returning."] pub fn aws_mem_calloc (allocator : * mut aws_allocator , num : usize , size : usize) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Allocates many chunks of bytes into a single block. Expects to be called with alternating void ** (dest), size_t\n (size). The first void ** will be set to the root of the allocation. Alignment is assumed to be sizeof(intmax_t).\n\n This is useful for allocating structs using the pimpl pattern, as you may allocate the public object and impl object\n in the same contiguous block of memory.\n\n Returns a pointer to the allocation.\n\n In versions v0.6.8 and prior, this function was allowed to return\n NULL. In later versions, if allocator->mem_acquire() returns NULL, this function will assert and exit. To handle\n conditions where OOM is not a fatal error, allocator->mem_acquire() is responsible for finding/reclaiming/running a\n GC etc...before returning."] pub fn aws_mem_acquire_many (allocator : * mut aws_allocator , count : usize , ...) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Releases ptr back to whatever allocated it.\n Nothing happens if ptr is NULL."] pub fn aws_mem_release (allocator : * mut aws_allocator , ptr : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Attempts to adjust the size of the pointed-to memory buffer from oldsize to\n newsize. The pointer (*ptr) may be changed if the memory needs to be\n reallocated.\n\n In versions v0.6.8 and prior, this function was allowed to return\n NULL. In later versions, if allocator->mem_realloc() returns NULL, this function will assert and exit. To handle\n conditions where OOM is not a fatal error, allocator->mem_realloc() is responsible for finding/reclaiming/running a\n GC etc...before returning."] pub fn aws_mem_realloc (allocator : * mut aws_allocator , ptr : * mut * mut :: libc :: c_void , oldsize : usize , newsize : usize) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_mem_trace_level { AWS_MEMTRACE_NONE = 0 , AWS_MEMTRACE_BYTES = 1 , AWS_MEMTRACE_STACKS = 2 , } unsafe 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 ; } unsafe extern "C" { pub fn aws_mem_tracer_destroy (trace_allocator : * mut aws_allocator) -> * mut aws_allocator ; } unsafe extern "C" { pub fn aws_mem_tracer_dump (trace_allocator : * mut aws_allocator) ; } unsafe extern "C" { pub fn aws_mem_tracer_bytes (trace_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_mem_tracer_count (trace_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_small_block_allocator_new (allocator : * mut aws_allocator , multi_threaded : bool) -> * mut aws_allocator ; } unsafe extern "C" { pub fn aws_small_block_allocator_destroy (sba_allocator : * mut aws_allocator) ; } unsafe extern "C" { pub fn aws_small_block_allocator_bytes_active (sba_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_small_block_allocator_bytes_reserved (sba_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_small_block_allocator_page_size (sba_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_small_block_allocator_page_size_available (sba_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_explicit_aligned_allocator_new (alignment : usize) -> * mut aws_allocator ; } unsafe extern "C" { pub fn aws_explicit_aligned_allocator_destroy (aligned_alloc : * mut aws_allocator) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_error_info { pub error_code : :: libc :: c_int , pub literal_name : * const :: libc :: c_char , pub error_str : * const :: libc :: c_char , pub lib_name : * const :: libc :: c_char , pub formatted_name : * const :: libc :: c_char , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_error_info"] [:: std :: mem :: size_of :: < aws_error_info > () - 40usize] ; ["Alignment of aws_error_info"] [:: std :: mem :: align_of :: < aws_error_info > () - 8usize] ; ["Offset of field: aws_error_info::error_code"] [:: std :: mem :: offset_of ! (aws_error_info , error_code) - 0usize] ; ["Offset of field: aws_error_info::literal_name"] [:: std :: mem :: offset_of ! (aws_error_info , literal_name) - 8usize] ; ["Offset of field: aws_error_info::error_str"] [:: std :: mem :: offset_of ! (aws_error_info , error_str) - 16usize] ; ["Offset of field: aws_error_info::lib_name"] [:: std :: mem :: offset_of ! (aws_error_info , lib_name) - 24usize] ; ["Offset of field: aws_error_info::formatted_name"] [:: std :: mem :: offset_of ! (aws_error_info , formatted_name) - 32usize] ; } ; 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)] pub struct aws_error_info_list { pub error_list : * const aws_error_info , pub count : u16 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_error_info_list"] [:: std :: mem :: size_of :: < aws_error_info_list > () - 16usize] ; ["Alignment of aws_error_info_list"] [:: std :: mem :: align_of :: < aws_error_info_list > () - 8usize] ; ["Offset of field: aws_error_info_list::error_list"] [:: std :: mem :: offset_of ! (aws_error_info_list , error_list) - 0usize] ; ["Offset of field: aws_error_info_list::count"] [:: std :: mem :: offset_of ! (aws_error_info_list , count) - 8usize] ; } ; 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 : :: libc :: c_int , ctx : * mut :: libc :: c_void) > ; unsafe extern "C" { pub fn aws_last_error () -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_error_str (err : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { pub fn aws_error_name (err : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { pub fn aws_error_lib_name (err : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { pub fn aws_error_debug_str (err : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { pub fn aws_raise_error_private (err : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_raise_error (err : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_reset_error () ; } unsafe extern "C" { pub fn aws_restore_error (err : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_set_global_error_handler_fn (handler : aws_error_handler_fn , ctx : * mut :: libc :: c_void) -> aws_error_handler_fn ; } unsafe extern "C" { pub fn aws_set_thread_local_error_handler_fn (handler : aws_error_handler_fn , ctx : * mut :: libc :: c_void) -> aws_error_handler_fn ; } unsafe extern "C" { # [doc = " TODO: this needs to be a private function (wait till we have the cmake story\n better before moving it though). It should be external for the purpose of\n other libs we own, but customers should not be able to hit it without going\n out of their way to do so."] pub fn aws_register_error_info (error_info : * const aws_error_info_list) ; } unsafe extern "C" { pub fn aws_unregister_error_info (error_info : * const aws_error_info_list) ; } unsafe extern "C" { # [doc = " Convert a c library io error into an aws error, and raise it.\n If no conversion is found, fallback_aws_error_code is raised.\n Always returns AWS_OP_ERR."] pub fn aws_translate_and_raise_io_error_or (error_no : :: libc :: c_int , fallback_aws_error_code : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Convert a c library io error into an aws error, and raise it.\n If no conversion is found, AWS_ERROR_SYS_CALL_FAILURE is raised.\n Always returns AWS_OP_ERR."] pub fn aws_translate_and_raise_io_error (error_no : :: libc :: c_int) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_common_error { AWS_ERROR_SUCCESS = 0 , AWS_ERROR_OOM = 1 , AWS_ERROR_NO_SPACE = 2 , AWS_ERROR_UNKNOWN = 3 , AWS_ERROR_SHORT_BUFFER = 4 , AWS_ERROR_OVERFLOW_DETECTED = 5 , AWS_ERROR_UNSUPPORTED_OPERATION = 6 , AWS_ERROR_INVALID_BUFFER_SIZE = 7 , AWS_ERROR_INVALID_HEX_STR = 8 , AWS_ERROR_INVALID_BASE64_STR = 9 , AWS_ERROR_INVALID_INDEX = 10 , AWS_ERROR_THREAD_INVALID_SETTINGS = 11 , AWS_ERROR_THREAD_INSUFFICIENT_RESOURCE = 12 , AWS_ERROR_THREAD_NO_PERMISSIONS = 13 , AWS_ERROR_THREAD_NOT_JOINABLE = 14 , AWS_ERROR_THREAD_NO_SUCH_THREAD_ID = 15 , AWS_ERROR_THREAD_DEADLOCK_DETECTED = 16 , AWS_ERROR_MUTEX_NOT_INIT = 17 , AWS_ERROR_MUTEX_TIMEOUT = 18 , AWS_ERROR_MUTEX_CALLER_NOT_OWNER = 19 , AWS_ERROR_MUTEX_FAILED = 20 , AWS_ERROR_COND_VARIABLE_INIT_FAILED = 21 , AWS_ERROR_COND_VARIABLE_TIMED_OUT = 22 , AWS_ERROR_COND_VARIABLE_ERROR_UNKNOWN = 23 , AWS_ERROR_CLOCK_FAILURE = 24 , AWS_ERROR_LIST_EMPTY = 25 , AWS_ERROR_DEST_COPY_TOO_SMALL = 26 , AWS_ERROR_LIST_EXCEEDS_MAX_SIZE = 27 , AWS_ERROR_LIST_STATIC_MODE_CANT_SHRINK = 28 , AWS_ERROR_PRIORITY_QUEUE_FULL = 29 , AWS_ERROR_PRIORITY_QUEUE_EMPTY = 30 , AWS_ERROR_PRIORITY_QUEUE_BAD_NODE = 31 , AWS_ERROR_HASHTBL_ITEM_NOT_FOUND = 32 , AWS_ERROR_INVALID_DATE_STR = 33 , AWS_ERROR_INVALID_ARGUMENT = 34 , AWS_ERROR_RANDOM_GEN_FAILED = 35 , AWS_ERROR_MALFORMED_INPUT_STRING = 36 , AWS_ERROR_UNIMPLEMENTED = 37 , AWS_ERROR_INVALID_STATE = 38 , AWS_ERROR_ENVIRONMENT_GET = 39 , AWS_ERROR_ENVIRONMENT_SET = 40 , AWS_ERROR_ENVIRONMENT_UNSET = 41 , AWS_ERROR_STREAM_UNSEEKABLE = 42 , AWS_ERROR_NO_PERMISSION = 43 , AWS_ERROR_FILE_INVALID_PATH = 44 , AWS_ERROR_MAX_FDS_EXCEEDED = 45 , AWS_ERROR_SYS_CALL_FAILURE = 46 , AWS_ERROR_C_STRING_BUFFER_NOT_NULL_TERMINATED = 47 , AWS_ERROR_STRING_MATCH_NOT_FOUND = 48 , AWS_ERROR_DIVIDE_BY_ZERO = 49 , AWS_ERROR_INVALID_FILE_HANDLE = 50 , AWS_ERROR_OPERATION_INTERUPTED = 51 , AWS_ERROR_DIRECTORY_NOT_EMPTY = 52 , AWS_ERROR_PLATFORM_NOT_SUPPORTED = 53 , AWS_ERROR_INVALID_UTF8 = 54 , AWS_ERROR_GET_HOME_DIRECTORY_FAILED = 55 , AWS_ERROR_INVALID_XML = 56 , AWS_ERROR_FILE_OPEN_FAILURE = 57 , AWS_ERROR_FILE_READ_FAILURE = 58 , AWS_ERROR_FILE_WRITE_FAILURE = 59 , AWS_ERROR_INVALID_CBOR = 60 , AWS_ERROR_CBOR_UNEXPECTED_TYPE = 61 , AWS_ERROR_END_COMMON_RANGE = 1023 , } unsafe extern "C" { # [doc = " Returns whether each byte is zero."] pub fn aws_is_mem_zeroed (buf : * const :: libc :: c_void , bufsize : usize) -> bool ; } unsafe extern "C" { # [doc = " Securely zeroes a memory buffer. This function will attempt to ensure that\n the compiler will not optimize away this zeroing operation."] pub fn aws_secure_zero (pBuf : * mut :: libc :: c_void , bufsize : usize) ; } unsafe extern "C" { # [doc = " Initializes internal data structures used by aws-c-common.\n Must be called before using any functionality in aws-c-common."] pub fn aws_common_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Shuts down the internal data structures used by aws-c-common."] pub fn aws_common_library_clean_up () ; } unsafe extern "C" { pub fn aws_common_fatal_assert_library_initialized () ; } unsafe extern "C" { # [doc = " Multiplies a * b. If the result overflows, returns 2^64 - 1."] pub fn aws_mul_u64_saturating (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { # [doc = " If a * b overflows, returns AWS_OP_ERR; otherwise multiplies\n a * b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_mul_u64_checked (a : u64 , b : u64 , r : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Multiplies a * b. If the result overflows, returns 2^32 - 1."] pub fn aws_mul_u32_saturating (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { # [doc = " If a * b overflows, returns AWS_OP_ERR; otherwise multiplies\n a * b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_mul_u32_checked (a : u32 , b : u32 , r : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Adds a + b.  If the result overflows returns 2^64 - 1."] pub fn aws_add_u64_saturating (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { # [doc = " If a + b overflows, returns AWS_OP_ERR; otherwise adds\n a + b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_add_u64_checked (a : u64 , b : u64 , r : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Adds a + b. If the result overflows returns 2^32 - 1."] pub fn aws_add_u32_saturating (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { # [doc = " If a + b overflows, returns AWS_OP_ERR; otherwise adds\n a + b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_add_u32_checked (a : u32 , b : u32 , r : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Subtracts a - b. If the result overflows returns 0."] pub fn aws_sub_u64_saturating (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { # [doc = " If a - b overflows, returns AWS_OP_ERR; otherwise subtracts\n a - b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_sub_u64_checked (a : u64 , b : u64 , r : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Subtracts a - b. If the result overflows returns 0."] pub fn aws_sub_u32_saturating (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { # [doc = " If a - b overflows, returns AWS_OP_ERR; otherwise subtracts\n a - b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_sub_u32_checked (a : u32 , b : u32 , r : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Multiplies a * b. If the result overflows, returns SIZE_MAX."] pub fn aws_mul_size_saturating (a : usize , b : usize) -> usize ; } unsafe extern "C" { # [doc = " Multiplies a * b and returns the result in *r. If the result\n overflows, returns AWS_OP_ERR; otherwise returns AWS_OP_SUCCESS."] pub fn aws_mul_size_checked (a : usize , b : usize , r : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Adds a + b.  If the result overflows returns SIZE_MAX."] pub fn aws_add_size_saturating (a : usize , b : usize) -> usize ; } unsafe extern "C" { # [doc = " Adds a + b and returns the result in *r. If the result\n overflows, returns AWS_OP_ERR; otherwise returns AWS_OP_SUCCESS."] pub fn aws_add_size_checked (a : usize , b : usize , r : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Adds [num] arguments (expected to be of size_t), and returns the result in *r.\n 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 , ...) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Subtracts a - b. If the result overflows returns 0."] pub fn aws_sub_size_saturating (a : usize , b : usize) -> usize ; } unsafe extern "C" { # [doc = " If a - b overflows, returns AWS_OP_ERR; otherwise subtracts\n a - b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_sub_size_checked (a : usize , b : usize , r : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Function to check if x is power of 2"] pub fn aws_is_power_of_two (x : usize) -> bool ; } unsafe extern "C" { # [doc = " Function to find the smallest result that is power of 2 >= n. Returns AWS_OP_ERR if this cannot\n be done without overflow"] pub fn aws_round_up_to_power_of_two (n : usize , result : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Counts the number of leading 0 bits in an integer. 0 will return the size of the integer in bits."] pub fn aws_clz_u32 (n : u32) -> usize ; } unsafe extern "C" { pub fn aws_clz_i32 (n : i32) -> usize ; } unsafe extern "C" { pub fn aws_clz_u64 (n : u64) -> usize ; } unsafe extern "C" { pub fn aws_clz_i64 (n : i64) -> usize ; } unsafe extern "C" { pub fn aws_clz_size (n : usize) -> usize ; } unsafe extern "C" { # [doc = " Counts the number of trailing 0 bits in an integer. 0 will return the size of the integer in bits."] pub fn aws_ctz_u32 (n : u32) -> usize ; } unsafe extern "C" { pub fn aws_ctz_i32 (n : i32) -> usize ; } unsafe extern "C" { pub fn aws_ctz_u64 (n : u64) -> usize ; } unsafe extern "C" { pub fn aws_ctz_i64 (n : i64) -> usize ; } unsafe extern "C" { pub fn aws_ctz_size (n : usize) -> usize ; } unsafe extern "C" { pub fn aws_min_u8 (a : u8 , b : u8) -> u8 ; } unsafe extern "C" { pub fn aws_max_u8 (a : u8 , b : u8) -> u8 ; } unsafe extern "C" { pub fn aws_min_i8 (a : i8 , b : i8) -> i8 ; } unsafe extern "C" { pub fn aws_max_i8 (a : i8 , b : i8) -> i8 ; } unsafe extern "C" { pub fn aws_min_u16 (a : u16 , b : u16) -> u16 ; } unsafe extern "C" { pub fn aws_max_u16 (a : u16 , b : u16) -> u16 ; } unsafe extern "C" { pub fn aws_min_i16 (a : i16 , b : i16) -> i16 ; } unsafe extern "C" { pub fn aws_max_i16 (a : i16 , b : i16) -> i16 ; } unsafe extern "C" { pub fn aws_min_u32 (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { pub fn aws_max_u32 (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { pub fn aws_min_i32 (a : i32 , b : i32) -> i32 ; } unsafe extern "C" { pub fn aws_max_i32 (a : i32 , b : i32) -> i32 ; } unsafe extern "C" { pub fn aws_min_u64 (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { pub fn aws_max_u64 (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { pub fn aws_min_i64 (a : i64 , b : i64) -> i64 ; } unsafe extern "C" { pub fn aws_max_i64 (a : i64 , b : i64) -> i64 ; } unsafe extern "C" { pub fn aws_min_size (a : usize , b : usize) -> usize ; } unsafe extern "C" { pub fn aws_max_size (a : usize , b : usize) -> usize ; } unsafe extern "C" { pub fn aws_min_int (a : :: libc :: c_int , b : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_max_int (a : :: libc :: c_int , b : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_min_float (a : f32 , b : f32) -> f32 ; } unsafe extern "C" { pub fn aws_max_float (a : f32 , b : f32) -> f32 ; } unsafe extern "C" { pub fn aws_min_double (a : f64 , b : f64) -> f64 ; } unsafe extern "C" { pub fn aws_max_double (a : f64 , b : f64) -> f64 ; } pub const AWS_ARRAY_LIST_DEBUG_FILL : _bindgen_ty_19 = _bindgen_ty_19 :: AWS_ARRAY_LIST_DEBUG_FILL ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_19 { AWS_ARRAY_LIST_DEBUG_FILL = 221 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_array_list { pub alloc : * mut aws_allocator , pub current_size : usize , pub length : usize , pub item_size : usize , pub data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_array_list"] [:: std :: mem :: size_of :: < aws_array_list > () - 40usize] ; ["Alignment of aws_array_list"] [:: std :: mem :: align_of :: < aws_array_list > () - 8usize] ; ["Offset of field: aws_array_list::alloc"] [:: std :: mem :: offset_of ! (aws_array_list , alloc) - 0usize] ; ["Offset of field: aws_array_list::current_size"] [:: std :: mem :: offset_of ! (aws_array_list , current_size) - 8usize] ; ["Offset of field: aws_array_list::length"] [:: std :: mem :: offset_of ! (aws_array_list , length) - 16usize] ; ["Offset of field: aws_array_list::item_size"] [:: std :: mem :: offset_of ! (aws_array_list , item_size) - 24usize] ; ["Offset of field: aws_array_list::data"] [:: std :: mem :: offset_of ! (aws_array_list , data) - 32usize] ; } ; 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.\n\n a and b should be cast to pointers to the element type held in the list\n before being dereferenced. The function should compare the elements and\n return a positive number if a > b, zero if a = b, and a negative number\n if a < b."] pub type aws_array_list_comparator_fn = :: std :: option :: Option < unsafe extern "C" fn (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> :: libc :: c_int > ; unsafe extern "C" { # [doc = " Initializes an array list with an array of size initial_item_allocation * item_size. In this mode, the array size\n will grow by a factor of 2 upon insertion if space is not available. initial_item_allocation is the number of\n elements you want space allocated for. item_size is the size of each element in bytes. Mixing items types is not\n supported by this API."] pub fn aws_array_list_init_dynamic (list : * mut aws_array_list , alloc : * mut aws_allocator , initial_item_allocation : usize , item_size : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes an array list with a preallocated array of void *. item_count is the number of elements in the array,\n and item_size is the size in bytes of each element. Mixing items types is not supported\n by this API. Once this list is full, new items will be rejected."] pub fn aws_array_list_init_static (list : * mut aws_array_list , raw_array : * mut :: libc :: c_void , item_count : usize , item_size : usize) ; } unsafe extern "C" { # [doc = " Initializes an array list with a preallocated array of *already-initialized* elements. item_count is the number of\n elements in the array, and item_size is the size in bytes of each element.\n\n Once initialized, nothing further can be added to the list, since it will be full and cannot resize.\n\n Primary use case is to treat an already-initialized C array as an array list."] pub fn aws_array_list_init_static_from_initialized (list : * mut aws_array_list , raw_array : * mut :: libc :: c_void , item_count : usize , item_size : usize) ; } unsafe extern "C" { # [doc = " Set of properties of a valid aws_array_list."] pub fn aws_array_list_is_valid (list : * const aws_array_list) -> bool ; } unsafe extern "C" { # [doc = " Deallocates any memory that was allocated for this list, and resets list for reuse or deletion."] pub fn aws_array_list_clean_up (list : * mut aws_array_list) ; } unsafe extern "C" { # [doc = " Erases and then deallocates any memory that was allocated for this list, and resets list for reuse or deletion."] pub fn aws_array_list_clean_up_secure (list : * mut aws_array_list) ; } unsafe extern "C" { # [doc = " Pushes the memory pointed to by val onto the end of internal list"] pub fn aws_array_list_push_back (list : * mut aws_array_list , val : * const :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the element at the front of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised"] pub fn aws_array_list_front (list : * const aws_array_list , val : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Pushes the memory pointed to by val onto the front of internal list.\n This call results in shifting all of the elements in the list. Avoid this call unless that\n is intended behavior."] pub fn aws_array_list_push_front (list : * mut aws_array_list , val : * const :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Deletes the element at the front of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised.\n This call results in shifting all of the elements at the end of the array to the front. Avoid this call unless that\n is intended behavior."] pub fn aws_array_list_pop_front (list : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Delete N elements from the front of the list.\n Remaining elements are shifted to the front of the list.\n If the list has less than N elements, the list is cleared.\n This call is more efficient than calling aws_array_list_pop_front() N times."] pub fn aws_array_list_pop_front_n (list : * mut aws_array_list , n : usize) ; } unsafe extern "C" { # [doc = " Deletes the element this index in the list if it exists.\n If element does not exist, AWS_ERROR_INVALID_INDEX will be raised.\n This call results in shifting all remaining elements towards the front.\n Avoid this call unless that is intended behavior."] pub fn aws_array_list_erase (list : * mut aws_array_list , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the element at the end of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised."] pub fn aws_array_list_back (list : * const aws_array_list , val : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Deletes the element at the end of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised."] pub fn aws_array_list_pop_back (list : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Clears all elements in the array and resets length to zero. Size does not change in this operation."] pub fn aws_array_list_clear (list : * mut aws_array_list) ; } unsafe 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) -> :: libc :: c_int ; } unsafe 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\n in to will be overwritten in this copy."] pub fn aws_array_list_copy (from : * const aws_array_list , to : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Swap contents between two dynamic lists. Both lists must use the same allocator."] pub fn aws_array_list_swap_contents (list_a : * mut aws_array_list , list_b : * mut aws_array_list) ; } unsafe extern "C" { # [doc = " Returns the number of elements that can fit in the internal array. If list is initialized in dynamic mode,\n the capacity changes over time."] pub fn aws_array_list_capacity (list : * const aws_array_list) -> usize ; } unsafe extern "C" { # [doc = " Returns the number of elements in the internal array."] pub fn aws_array_list_length (list : * const aws_array_list) -> usize ; } unsafe extern "C" { # [doc = " Copies the memory at index to val. If element does not exist, AWS_ERROR_INVALID_INDEX will be raised."] pub fn aws_array_list_get_at (list : * const aws_array_list , val : * mut :: libc :: c_void , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the memory address of the element at index to *val. If element does not exist, AWS_ERROR_INVALID_INDEX will be\n raised."] pub fn aws_array_list_get_at_ptr (list : * const aws_array_list , val : * mut * mut :: libc :: c_void , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Ensures that the array list has enough capacity to store a value at the specified index. If there is not already\n enough capacity, and the list is in dynamic mode, this function will attempt to allocate more memory, expanding the\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the the memory pointed to by val into the array at index. If in dynamic mode, the size will grow by a factor\n of two when the array is full. In static mode, AWS_ERROR_INVALID_INDEX will be raised if the index is past the bounds\n of the array."] pub fn aws_array_list_set_at (list : * mut aws_array_list , val : * const :: libc :: c_void , index : usize) -> :: libc :: c_int ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Sort elements in the list in-place according to the comparator function."] pub fn aws_array_list_sort (list : * mut aws_array_list , compare_fn : aws_array_list_comparator_fn) ; } unsafe extern "C" { # [doc = " Returns 1 if machine is big endian, 0 if little endian.\n If you compile with even -O1 optimization, this check is completely optimized\n out at compile time and code which calls \"if (aws_is_big_endian())\" will do\n the right thing without branching."] pub fn aws_is_big_endian () -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Convert 64 bit integer from host to network byte order."] pub fn aws_hton64 (x : u64) -> u64 ; } unsafe extern "C" { # [doc = " Convert 64 bit integer from network to host byte order."] pub fn aws_ntoh64 (x : u64) -> u64 ; } unsafe extern "C" { # [doc = " Convert 32 bit integer from host to network byte order."] pub fn aws_hton32 (x : u32) -> u32 ; } unsafe extern "C" { # [doc = " Convert 32 bit float from host to network byte order."] pub fn aws_htonf32 (x : f32) -> f32 ; } unsafe extern "C" { # [doc = " Convert 64 bit double from host to network byte order."] pub fn aws_htonf64 (x : f64) -> f64 ; } unsafe extern "C" { # [doc = " Convert 32 bit integer from network to host byte order."] pub fn aws_ntoh32 (x : u32) -> u32 ; } unsafe extern "C" { # [doc = " Convert 32 bit float from network to host byte order."] pub fn aws_ntohf32 (x : f32) -> f32 ; } unsafe extern "C" { # [doc = " Convert 32 bit float from network to host byte order."] pub fn aws_ntohf64 (x : f64) -> f64 ; } unsafe extern "C" { # [doc = " Convert 16 bit integer from host to network byte order."] pub fn aws_hton16 (x : u16) -> u16 ; } unsafe extern "C" { # [doc = " Convert 16 bit integer from network to host byte order."] pub fn aws_ntoh16 (x : u16) -> u16 ; } # [doc = " Represents a length-delimited binary string or buffer. If byte buffer points\n to constant memory or memory that should otherwise not be freed by this\n struct, set allocator to NULL and free function will be a no-op.\n\n This structure used to define the output for all functions that write to a buffer.\n\n Note that this structure allocates memory at the buffer pointer only. The\n struct itself does not get dynamically allocated and must be either\n maintained or copied to avoid losing access to the memory."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_byte_buf { pub len : usize , pub buffer : * mut u8 , pub capacity : usize , pub allocator : * mut aws_allocator , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_byte_buf"] [:: std :: mem :: size_of :: < aws_byte_buf > () - 32usize] ; ["Alignment of aws_byte_buf"] [:: std :: mem :: align_of :: < aws_byte_buf > () - 8usize] ; ["Offset of field: aws_byte_buf::len"] [:: std :: mem :: offset_of ! (aws_byte_buf , len) - 0usize] ; ["Offset of field: aws_byte_buf::buffer"] [:: std :: mem :: offset_of ! (aws_byte_buf , buffer) - 8usize] ; ["Offset of field: aws_byte_buf::capacity"] [:: std :: mem :: offset_of ! (aws_byte_buf , capacity) - 16usize] ; ["Offset of field: aws_byte_buf::allocator"] [:: std :: mem :: offset_of ! (aws_byte_buf , allocator) - 24usize] ; } ; 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.\n\n This structure is used to define buffers for reading."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_byte_cursor { pub len : usize , pub ptr : * mut u8 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_byte_cursor"] [:: std :: mem :: size_of :: < aws_byte_cursor > () - 16usize] ; ["Alignment of aws_byte_cursor"] [:: std :: mem :: align_of :: < aws_byte_cursor > () - 8usize] ; ["Offset of field: aws_byte_cursor::len"] [:: std :: mem :: offset_of ! (aws_byte_cursor , len) - 0usize] ; ["Offset of field: aws_byte_cursor::ptr"] [:: std :: mem :: offset_of ! (aws_byte_cursor , ptr) - 8usize] ; } ; 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 > ; unsafe extern "C" { # [doc = " Compare two arrays.\n Return whether their contents are equivalent.\n NULL may be passed as the array pointer if its length is declared to be 0."] pub fn aws_array_eq (array_a : * const :: libc :: c_void , len_a : usize , array_b : * const :: libc :: c_void , len_b : usize) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of two arrays.\n Return whether their contents are equivalent.\n NULL may be passed as the array pointer if its length is declared to be 0.\n The \"C\" locale is used for comparing upper and lowercase letters.\n Data is assumed to be ASCII text, UTF-8 will work fine too."] pub fn aws_array_eq_ignore_case (array_a : * const :: libc :: c_void , len_a : usize , array_b : * const :: libc :: c_void , len_b : usize) -> bool ; } unsafe extern "C" { # [doc = " Compare an array and a null-terminated string.\n Returns true if their contents are equivalent.\n The array should NOT contain a null-terminator, or the comparison will always return false.\n 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 :: libc :: c_void , array_len : usize , c_str : * const :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of an array and a null-terminated string.\n Return whether their contents are equivalent.\n The array should NOT contain a null-terminator, or the comparison will always return false.\n NULL may be passed as the array pointer if its length is declared to be 0.\n The \"C\" locale is used for comparing upper and lowercase letters.\n Data is assumed to be ASCII text, UTF-8 will work fine too."] pub fn aws_array_eq_c_str_ignore_case (array : * const :: libc :: c_void , array_len : usize , c_str : * const :: libc :: c_char) -> bool ; } unsafe extern "C" { pub fn aws_byte_buf_init (buf : * mut aws_byte_buf , allocator : * mut aws_allocator , capacity : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes an aws_byte_buf structure base on another valid one.\n Requires: *src and *allocator are valid objects.\n Ensures: *dest is a valid aws_byte_buf with a new backing array dest->buffer\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Reads 'filename' into 'out_buf'. If successful, 'out_buf' is allocated and filled with the data;\n It is your responsibility to call 'aws_byte_buf_clean_up()' on it. Otherwise, 'out_buf' remains\n unused. In the very unfortunate case where some API needs to treat out_buf as a c_string, a null terminator\n 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 :: libc :: c_char) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Same as aws_byte_buf_init_from_file(), but for reading \"special files\" like /proc/cpuinfo.\n These files don't accurately report their size, so size_hint is used as initial buffer size,\n and the buffer grows until the while file is read."] pub fn aws_byte_buf_init_from_file_with_size_hint (out_buf : * mut aws_byte_buf , alloc : * mut aws_allocator , filename : * const :: libc :: c_char , size_hint : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Evaluates the set of properties that define the shape of all valid aws_byte_buf structures.\n 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 ; } unsafe extern "C" { # [doc = " Evaluates the set of properties that define the shape of all valid aws_byte_cursor structures.\n 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 ; } unsafe extern "C" { # [doc = " Copies src buffer into dest and sets the correct len and capacity.\n A new memory zone is allocated for dest->buffer. When dest is no longer needed it will have to be cleaned-up using\n aws_byte_buf_clean_up(dest).\n Dest capacity and len will be equal to the src len. Allocator of the dest will be identical with parameter allocator.\n If src buffer is null the dest will have a null buffer with a len and a capacity of 0\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Init buffer with contents of multiple cursors, and update cursors to reference the memory stored in the buffer.\n Each cursor arg must be an `struct aws_byte_cursor *`. NULL must be passed as the final arg.\n NOTE: Do not append/grow/resize buffers initialized this way, or the cursors will end up referencing invalid memory.\n Returns AWS_OP_SUCCESS in case of success.\n 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 , ...) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_byte_buf_clean_up (buf : * mut aws_byte_buf) ; } unsafe extern "C" { # [doc = " Equivalent to calling aws_byte_buf_secure_zero and then aws_byte_buf_clean_up\n on the buffer."] pub fn aws_byte_buf_clean_up_secure (buf : * mut aws_byte_buf) ; } unsafe extern "C" { # [doc = " Resets the len of the buffer to 0, but does not free the memory. The buffer can then be reused.\n 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) ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Compare two aws_byte_buf structures.\n Return whether their contents are equivalent."] pub fn aws_byte_buf_eq (a : * const aws_byte_buf , b : * const aws_byte_buf) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of two aws_byte_buf structures.\n Return whether their contents are equivalent.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 ; } unsafe extern "C" { # [doc = " Compare an aws_byte_buf and a null-terminated string.\n Returns true if their contents are equivalent.\n 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 :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of an aws_byte_buf and a null-terminated string.\n Return whether their contents are equivalent.\n The buffer should NOT contain a null-terminator, or the comparison will always return false.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " No copies, no buffer allocations. Iterates over input_str, and returns the\n next substring between split_on instances relative to previous substr.\n Behaves similar to strtok with substr being used as state for next split.\n\n Returns true each time substr is set and false when there is no more splits\n (substr is set to empty in that case).\n\n Example usage.\n struct aws_byte_cursor substr = {0};\n while (aws_byte_cursor_next_split(&input_str, ';', &substr)) {\n   // ...use substr...\n }\n\n Note: It is the user's responsibility zero-initialize substr before the first call.\n\n Edge case rules are as follows:\n empty input will have single empty split. ex. \"\" splits into \"\"\n if input starts with split_on then first split is empty. ex \";A\" splits into \"\", \"A\"\n adjacent split tokens result in empty split. ex \"A;;B\" splits into \"A\", \"\", \"B\"\n If the input ends with split_on, last split is empty. ex. \"A;\" splits into \"A\", \"\"\n\n It is the user's responsibility to make sure the input buffer stays in memory\n long enough to use the results."] pub fn aws_byte_cursor_next_split (input_str : * const aws_byte_cursor , split_on : :: libc :: c_char , substr : * mut aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " No copies, no buffer allocations. Fills in output with a list of\n aws_byte_cursor instances where buffer is an offset into the input_str and\n len is the length of that string in the original buffer.\n\n Edge case rules are as follows:\n if the input begins with split_on, an empty cursor will be the first entry in\n output. if the input has two adjacent split_on tokens, an empty cursor will\n be inserted into the output. if the input ends with split_on, an empty cursor\n will be appended to the output.\n\n It is the user's responsibility to properly initialize output. Recommended number of preallocated elements from\n output is your most likely guess for the upper bound of the number of elements resulting from the split.\n\n The type that will be stored in output is struct aws_byte_cursor (you'll need\n this for the item size param).\n\n It is the user's responsibility to make sure the input buffer stays in memory\n long enough to use the results."] pub fn aws_byte_cursor_split_on_char (input_str : * const aws_byte_cursor , split_on : :: libc :: c_char , output : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " No copies, no buffer allocations. Fills in output with a list of aws_byte_cursor instances where buffer is\n an offset into the input_str and len is the length of that string in the original buffer. N is the max number of\n splits, if this value is zero, it will add all splits to the output.\n\n Edge case rules are as follows:\n if the input begins with split_on, an empty cursor will be the first entry in output\n if the input has two adjacent split_on tokens, an empty cursor will be inserted into the output.\n if the input ends with split_on, an empty cursor will be appended to the output.\n\n It is the user's responsibility to properly initialize output. Recommended number of preallocated elements from\n output is your most likely guess for the upper bound of the number of elements resulting from the split.\n\n If the output array is not large enough, input_str will be updated to point to the first character after the last\n processed split_on instance.\n\n The type that will be stored in output is struct aws_byte_cursor (you'll need this for the item size param).\n\n 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 : :: libc :: c_char , n : usize , output : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Search for an exact byte match inside a cursor. The first match will be returned. Returns AWS_OP_SUCCESS\n on successful match and first_find will be set to the offset in input_str, and length will be the remaining length\n from input_str past the returned offset. If the match was not found, AWS_OP_ERR will be returned and\n 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) -> :: libc :: c_int ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Copies from to to. If to is too small, AWS_ERROR_DEST_COPY_TOO_SMALL will be\n returned. dest->len will contain the amount of data actually copied to dest.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies from to to while converting bytes via the passed in lookup table.\n If to is too small, AWS_ERROR_DEST_COPY_TOO_SMALL will be\n returned. to->len will contain its original size plus the amount of data actually copied to to.\n\n from and to should not be the same buffer (overlap is not handled)\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies from to to. If to is too small, the buffer will be grown appropriately and\n the old contents copied to, before the new contents are appended.\n\n If the grow fails (overflow or OOM), then an error will be returned.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies `from` to `to`. If `to` is too small, the buffer will be grown appropriately and\n the old contents copied over, before the new contents are appended.\n\n If the grow fails (overflow or OOM), then an error will be returned.\n\n If the buffer is grown, the old buffer will be securely cleared before getting freed.\n\n `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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies a single byte into `to`. If `to` is too small, the buffer will be grown appropriately and\n the old contents copied over, before the byte is appended.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies a single byte into `to`. If `to` is too small, the buffer will be grown appropriately and\n the old contents copied over, before the byte is appended.\n\n If the grow fails (overflow or OOM), then an error will be returned.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copy contents of cursor to buffer, then update cursor to reference the memory stored in the buffer.\n If buffer is too small, AWS_ERROR_DEST_COPY_TOO_SMALL will be returned.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Appends '\\0' at the end of the buffer."] pub fn aws_byte_buf_append_null_terminator (buf : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Attempts to increase the capacity of a buffer to the requested capacity\n\n If the the buffer's capacity is currently larger than the request capacity, the\n function does nothing (no shrink is performed)."] pub fn aws_byte_buf_reserve (buffer : * mut aws_byte_buf , requested_capacity : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Convenience function that attempts to increase the capacity of a buffer relative to the current\n length.\n\n  aws_byte_buf_reserve_relative(buf, x) ~~ aws_byte_buf_reserve(buf, buf->len + x)\n"] pub fn aws_byte_buf_reserve_relative (buffer : * mut aws_byte_buf , additional_length : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Concatenates a variable number of struct aws_byte_buf * into destination.\n Number of args must be greater than 1. If dest is too small,\n AWS_ERROR_DEST_COPY_TOO_SMALL will be returned. dest->len will contain the\n amount of data actually copied to dest."] pub fn aws_byte_buf_cat (dest : * mut aws_byte_buf , number_of_args : usize , ...) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Compare two aws_byte_cursor structures.\n Return whether their contents are equivalent."] pub fn aws_byte_cursor_eq (a : * const aws_byte_cursor , b : * const aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of two aws_byte_cursor structures.\n Return whether their contents are equivalent.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 ; } unsafe extern "C" { # [doc = " Compare an aws_byte_cursor and an aws_byte_buf.\n 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 ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of an aws_byte_cursor and an aws_byte_buf.\n Return whether their contents are equivalent.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 ; } unsafe extern "C" { # [doc = " Compare an aws_byte_cursor and a null-terminated string.\n Returns true if their contents are equivalent.\n 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 :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of an aws_byte_cursor and a null-terminated string.\n Return whether their contents are equivalent.\n The cursor should NOT contain a null-terminator, or the comparison will always return false.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 :: libc :: c_char) -> bool ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Return true if the input starts with the prefix (case-insensitive).\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 ; } unsafe extern "C" { # [doc = " Case-insensitive hash function for array containing ASCII or UTF-8 text."] pub fn aws_hash_array_ignore_case (array : * const :: libc :: c_void , len : usize) -> u64 ; } unsafe extern "C" { # [doc = " Case-insensitive hash function for aws_byte_cursors stored in an aws_hash_table.\n For case-sensitive hashing, use aws_hash_byte_cursor_ptr()."] pub fn aws_hash_byte_cursor_ptr_ignore_case (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Returns a lookup table for bytes that is the identity transformation with the exception\n of uppercase ascii characters getting replaced with lowercase characters.  Used in\n caseless comparisons."] pub fn aws_lookup_table_to_lower_get () -> * const u8 ; } unsafe extern "C" { # [doc = " Returns lookup table to go from ASCII/UTF-8 hex character to a number (0-15).\n Non-hex characters map to 255.\n Valid examples:\n '0' -> 0\n 'F' -> 15\n 'f' -> 15\n Invalid examples:\n ' ' -> 255\n 'Z' -> 255\n '\\0' -> 255"] pub fn aws_lookup_table_hex_to_num_get () -> * const u8 ; } unsafe 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) -> :: libc :: c_int ; } unsafe 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) -> :: libc :: c_int ; } unsafe 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 :: libc :: c_char) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_byte_buf_from_array (bytes : * const :: libc :: c_void , len : usize) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_byte_buf_from_empty_array (bytes : * const :: libc :: c_void , capacity : usize) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_byte_cursor_from_buf (buf : * const aws_byte_buf) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_byte_cursor_from_c_str (c_str : * const :: libc :: c_char) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_byte_cursor_from_array (bytes : * const :: libc :: c_void , len : usize) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Tests if the given aws_byte_cursor has at least len bytes remaining. If so,\n *buf is advanced by len bytes (incrementing ->ptr and decrementing ->len),\n and an aws_byte_cursor referring to the first len bytes of the original *buf\n is returned. Otherwise, an aws_byte_cursor with ->ptr = NULL, ->len = 0 is\n returned.\n\n Note that if len is above (SIZE_MAX / 2), this function will also treat it as\n 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 ; } unsafe extern "C" { # [doc = " Behaves identically to aws_byte_cursor_advance, but avoids speculative\n execution potentially reading out-of-bounds pointers (by returning an\n empty ptr in such speculated paths).\n\n This should generally be done when using an untrusted or\n data-dependent value for 'len', to avoid speculating into a path where\n 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 ; } unsafe extern "C" { # [doc = " Reads specified length of data from byte cursor and copies it to the\n destination array.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read (cur : * mut aws_byte_cursor , dest : * mut :: libc :: c_void , len : usize) -> bool ; } unsafe extern "C" { # [doc = " Reads as many bytes from cursor as size of buffer, and copies them to buffer.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_and_fill_buffer (cur : * mut aws_byte_cursor , dest : * mut aws_byte_buf) -> bool ; } unsafe extern "C" { # [doc = " Reads a single byte from cursor, placing it in *var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_u8 (cur : * mut aws_byte_cursor , var : * mut u8) -> bool ; } unsafe extern "C" { # [doc = " Reads a 16-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_be16 (cur : * mut aws_byte_cursor , var : * mut u16) -> bool ; } unsafe extern "C" { # [doc = " Reads an unsigned 24-bit value (3 bytes) in network byte order from cur,\n and places it in host byte order into 32-bit var.\n Ex: if cur's next 3 bytes are {0xAA, 0xBB, 0xCC}, then var becomes 0x00AABBCC.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_be24 (cur : * mut aws_byte_cursor , var : * mut u32) -> bool ; } unsafe extern "C" { # [doc = " Reads a 32-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_be32 (cur : * mut aws_byte_cursor , var : * mut u32) -> bool ; } unsafe extern "C" { # [doc = " Reads a 64-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_be64 (cur : * mut aws_byte_cursor , var : * mut u64) -> bool ; } unsafe extern "C" { # [doc = " Reads a 32-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_float_be32 (cur : * mut aws_byte_cursor , var : * mut f32) -> bool ; } unsafe extern "C" { # [doc = " Reads a 64-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_float_be64 (cur : * mut aws_byte_cursor , var : * mut f64) -> bool ; } unsafe extern "C" { # [doc = " Reads 2 hex characters from ASCII/UTF-8 text to produce an 8-bit number.\n Accepts both lowercase 'a'-'f' and uppercase 'A'-'F'.\n For example: \"0F\" produces 15.\n\n On success, returns true and advances the cursor by 2.\n If there is insufficient space in the cursor or an invalid character\n 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 ; } unsafe extern "C" { # [doc = " Appends a sub-buffer to the specified buffer.\n\n If the buffer has at least `len' bytes remaining (buffer->capacity - buffer->len >= len),\n then buffer->len is incremented by len, and an aws_byte_buf is assigned to *output corresponding\n to the last len bytes of the input buffer. The aws_byte_buf at *output will have a null\n allocator, a zero initial length, and a capacity of 'len'. The function then returns true.\n\n If there is insufficient space, then this function nulls all fields in *output and returns\n false."] pub fn aws_byte_buf_advance (buffer : * mut aws_byte_buf , output : * mut aws_byte_buf , len : usize) -> bool ; } unsafe extern "C" { # [doc = " Write specified number of bytes from array to byte buffer.\n\n On success, returns true and updates the buffer length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write (buf : * mut aws_byte_buf , src : * const u8 , len : usize) -> bool ; } unsafe extern "C" { # [doc = " Copies all bytes from buffer to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_from_whole_buffer (buf : * mut aws_byte_buf , src : aws_byte_buf) -> bool ; } unsafe extern "C" { # [doc = " Copies all bytes from buffer to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_from_whole_cursor (buf : * mut aws_byte_buf , src : aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " Without increasing buf's capacity, write as much as possible from advancing_cursor into buf.\n\n buf's len is updated accordingly.\n advancing_cursor is advanced so it contains the remaining unwritten parts.\n Returns the section of advancing_cursor which was written.\n\n This function cannot fail. If buf is full (len == capacity) or advancing_len has 0 length,\n then buf and advancing_cursor are not altered and a cursor with 0 length is returned.\n\n Example: Given a buf with 2 bytes of space available and advancing_cursor with contents \"abc\".\n \"ab\" will be written to buf and buf->len will increase 2 and become equal to buf->capacity.\n advancing_cursor will advance so its contents become the unwritten \"c\".\n 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 ; } unsafe extern "C" { # [doc = " Copies one byte to buffer.\n\n On success, returns true and updates the cursor /length\naccordingly.\n\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_u8 (buf : * mut aws_byte_buf , c : u8) -> bool ; } unsafe extern "C" { # [doc = " Writes one byte repeatedly to buffer (like memset)\n\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_u8_n (buf : * mut aws_byte_buf , c : u8 , count : usize) -> bool ; } unsafe extern "C" { # [doc = " Writes a 16-bit integer in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_be16 (buf : * mut aws_byte_buf , x : u16) -> bool ; } unsafe extern "C" { # [doc = " Writes low 24-bits (3 bytes) of an unsigned integer in network byte order (big endian) to buffer.\n Ex: If x is 0x00AABBCC then {0xAA, 0xBB, 0xCC} is written to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, or x's value cannot fit in 3 bytes,\n returns false, leaving the buffer unchanged."] pub fn aws_byte_buf_write_be24 (buf : * mut aws_byte_buf , x : u32) -> bool ; } unsafe extern "C" { # [doc = " Writes a 32-bit integer in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_be32 (buf : * mut aws_byte_buf , x : u32) -> bool ; } unsafe extern "C" { # [doc = " Writes a 32-bit float in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_float_be32 (buf : * mut aws_byte_buf , x : f32) -> bool ; } unsafe extern "C" { # [doc = " Writes a 64-bit integer in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_be64 (buf : * mut aws_byte_buf , x : u64) -> bool ; } unsafe extern "C" { # [doc = " Writes a 64-bit float in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_float_be64 (buf : * mut aws_byte_buf , x : f64) -> bool ; } unsafe extern "C" { # [doc = " Like isalnum(), but ignores C locale.\n 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 ; } unsafe extern "C" { # [doc = " Like isalpha(), but ignores C locale.\n Returns true if ch has the value of ASCII/UTF-8: 'a'-'z' or 'A'-'Z'."] pub fn aws_isalpha (ch : u8) -> bool ; } unsafe extern "C" { # [doc = " Like isdigit().\n Returns true if ch has the value of ASCII/UTF-8: '0'-'9'.\n\n Note: C's built-in isdigit() is also supposed to ignore the C locale,\n but cppreference.com claims \"some implementations (e.g. Microsoft in 1252 codepage)\n may classify additional single-byte characters as digits\""] pub fn aws_isdigit (ch : u8) -> bool ; } unsafe extern "C" { # [doc = " Like isxdigit().\n Returns true if ch has the value of ASCII/UTF-8: '0'-'9', 'a'-'f', or 'A'-'F'.\n\n Note: C's built-in isxdigit() is also supposed to ignore the C locale,\n but cppreference.com claims \"some implementations (e.g. Microsoft in 1252 codepage)\n may classify additional single-byte characters as digits\""] pub fn aws_isxdigit (ch : u8) -> bool ; } unsafe extern "C" { # [doc = " Like isspace(), but ignores C locale.\n Return true if ch has the value of ASCII/UTF-8: space (0x20), form feed (0x0C),\n line feed (0x0A), carriage return (0x0D), horizontal tab (0x09), or vertical tab (0x0B)."] pub fn aws_isspace (ch : u8) -> bool ; } unsafe extern "C" { # [doc = " Read entire cursor as ASCII/UTF-8 unsigned base-10 number.\n Stricter than strtoull(), which allows whitespace and inputs that start with \"0x\"\n\n Examples:\n \"0\" -> 0\n \"123\" -> 123\n \"00004\" -> 4 // leading zeros ok\n\n Rejects things like:\n \"-1\" // negative numbers not allowed\n \"1,000\" // only characters 0-9 allowed\n \"\" // blank string not allowed\n \" 0 \" // whitespace not allowed\n \"0x0\" // hex not allowed\n \"FF\" // hex not allowed\n \"999999999999999999999999999999999999999999\" // larger than max u64"] pub fn aws_byte_cursor_utf8_parse_u64 (cursor : aws_byte_cursor , dst : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Read entire cursor as ASCII/UTF-8 unsigned base-16 number with NO \"0x\" prefix.\n\n Examples:\n \"F\" -> 15\n \"000000ff\" -> 255 // leading zeros ok\n \"Ff\" -> 255 // mixed case ok\n \"123\" -> 291\n \"FFFFFFFFFFFFFFFF\" -> 18446744073709551616 // max u64\n\n Rejects things like:\n \"0x0\" // 0x prefix not allowed\n \"\" // blank string not allowed\n \" F \" // whitespace not allowed\n \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\" // larger than max u64"] pub fn aws_byte_cursor_utf8_parse_u64_hex (cursor : aws_byte_cursor , dst : * mut u64) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_linked_list_node { pub next : * mut aws_linked_list_node , pub prev : * mut aws_linked_list_node , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_linked_list_node"] [:: std :: mem :: size_of :: < aws_linked_list_node > () - 16usize] ; ["Alignment of aws_linked_list_node"] [:: std :: mem :: align_of :: < aws_linked_list_node > () - 8usize] ; ["Offset of field: aws_linked_list_node::next"] [:: std :: mem :: offset_of ! (aws_linked_list_node , next) - 0usize] ; ["Offset of field: aws_linked_list_node::prev"] [:: std :: mem :: offset_of ! (aws_linked_list_node , prev) - 8usize] ; } ; 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)] pub struct aws_linked_list { pub head : aws_linked_list_node , pub tail : aws_linked_list_node , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_linked_list"] [:: std :: mem :: size_of :: < aws_linked_list > () - 32usize] ; ["Alignment of aws_linked_list"] [:: std :: mem :: align_of :: < aws_linked_list > () - 8usize] ; ["Offset of field: aws_linked_list::head"] [:: std :: mem :: offset_of ! (aws_linked_list , head) - 0usize] ; ["Offset of field: aws_linked_list::tail"] [:: std :: mem :: offset_of ! (aws_linked_list , tail) - 16usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Set node's next and prev pointers to NULL."] pub fn aws_linked_list_node_reset (node : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Tests if the list is empty."] pub fn aws_linked_list_empty (list : * const aws_linked_list) -> bool ; } unsafe extern "C" { # [doc = " Checks that a linked list is valid."] pub fn aws_linked_list_is_valid (list : * const aws_linked_list) -> bool ; } unsafe extern "C" { # [doc = " Checks that the prev of the next pointer of a node points to the\n node. As this checks whether the [next] connection of a node is\n bidirectional, it returns false if used for the list tail."] pub fn aws_linked_list_node_next_is_valid (node : * const aws_linked_list_node) -> bool ; } unsafe extern "C" { # [doc = " Checks that the next of the prev pointer of a node points to the\n node. Similarly to the above, this returns false if used for the\n head of a list."] pub fn aws_linked_list_node_prev_is_valid (node : * const aws_linked_list_node) -> bool ; } unsafe extern "C" { # [doc = " Checks that a linked list satisfies double linked list connectivity\n constraints. This check is O(n) as it traverses the whole linked\n list to ensure that tail is reachable from head (and vice versa)\n and that every connection is bidirectional.\n\n Note: This check *cannot* go into an infinite loop, because we\n ensure that the connection to the next node is\n bidirectional. Therefore, if a node's [a] a.next is a previous node\n [b] in the list, b.prev != &a and so this check would fail, thus\n terminating the loop."] pub fn aws_linked_list_is_valid_deep (list : * const aws_linked_list) -> bool ; } unsafe extern "C" { # [doc = " Initializes the list. List will be empty after this call."] pub fn aws_linked_list_init (list : * mut aws_linked_list) ; } unsafe extern "C" { # [doc = " Returns an iteration pointer for the first element in the list."] pub fn aws_linked_list_begin (list : * const aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns an iteration pointer for one past the last element in the list."] pub fn aws_linked_list_end (list : * const aws_linked_list) -> * const aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns a pointer for the last element in the list.\n Used to begin iterating the list in reverse. Ex:\n   for (i = aws_linked_list_rbegin(list); i != aws_linked_list_rend(list); i = aws_linked_list_prev(i)) {...}"] pub fn aws_linked_list_rbegin (list : * const aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the pointer to one before the first element in the list.\n Used to end iterating the list in reverse."] pub fn aws_linked_list_rend (list : * const aws_linked_list) -> * const aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the next element in the list."] pub fn aws_linked_list_next (node : * const aws_linked_list_node) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the previous element in the list."] pub fn aws_linked_list_prev (node : * const aws_linked_list_node) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Inserts to_add immediately after after."] pub fn aws_linked_list_insert_after (after : * mut aws_linked_list_node , to_add : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Swaps the order two nodes in the linked list."] pub fn aws_linked_list_swap_nodes (a : * mut aws_linked_list_node , b : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Inserts to_add immediately before before."] pub fn aws_linked_list_insert_before (before : * mut aws_linked_list_node , to_add : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Removes the specified node from the list (prev/next point to each other) and\n returns the next node in the list."] pub fn aws_linked_list_remove (node : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Append new_node."] pub fn aws_linked_list_push_back (list : * mut aws_linked_list , node : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Returns the element in the back of the list."] pub fn aws_linked_list_back (list : * const aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the element in the back of the list and removes it"] pub fn aws_linked_list_pop_back (list : * mut aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Prepend new_node."] pub fn aws_linked_list_push_front (list : * mut aws_linked_list , node : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Returns the element in the front of the list."] pub fn aws_linked_list_front (list : * const aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the element in the front of the list and removes it"] pub fn aws_linked_list_pop_front (list : * mut aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { pub fn aws_linked_list_swap_contents (a : * mut aws_linked_list , b : * mut aws_linked_list) ; } unsafe extern "C" { # [doc = " Remove all nodes from one list, and add them to the back of another.\n\n Example: if dst={1,2} and src={3,4}, they become dst={1,2,3,4} and src={}"] pub fn aws_linked_list_move_all_back (dst : * mut aws_linked_list , src : * mut aws_linked_list) ; } unsafe extern "C" { # [doc = " Remove all nodes from one list, and add them to the front of another.\n\n Example: if dst={2,1} and src={4,3}, they become dst={4,3,2,1} and src={}"] pub fn aws_linked_list_move_all_front (dst : * mut aws_linked_list , src : * mut aws_linked_list) ; } unsafe extern "C" { # [doc = " Returns true if the node is currently in a list, false otherwise."] pub fn aws_linked_list_node_is_in_list (node : * mut aws_linked_list_node) -> bool ; } pub type aws_io_set_queue_on_handle_fn = :: std :: option :: Option < unsafe extern "C" fn (handle : * mut aws_io_handle , queue : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_io_handle { pub data : aws_io_handle__bindgen_ty_1 , pub additional_data : * mut :: libc :: c_void , pub set_queue : aws_io_set_queue_on_handle_fn , } # [repr (C)] # [derive (Copy , Clone)] pub union aws_io_handle__bindgen_ty_1 { pub fd : :: libc :: c_int , pub handle : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_io_handle__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_io_handle__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_io_handle__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_io_handle__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_io_handle__bindgen_ty_1::fd"] [:: std :: mem :: offset_of ! (aws_io_handle__bindgen_ty_1 , fd) - 0usize] ; ["Offset of field: aws_io_handle__bindgen_ty_1::handle"] [:: std :: mem :: offset_of ! (aws_io_handle__bindgen_ty_1 , handle) - 0usize] ; } ; impl Default for aws_io_handle__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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_io_handle"] [:: std :: mem :: size_of :: < aws_io_handle > () - 24usize] ; ["Alignment of aws_io_handle"] [:: std :: mem :: align_of :: < aws_io_handle > () - 8usize] ; ["Offset of field: aws_io_handle::data"] [:: std :: mem :: offset_of ! (aws_io_handle , data) - 0usize] ; ["Offset of field: aws_io_handle::additional_data"] [:: std :: mem :: offset_of ! (aws_io_handle , additional_data) - 8usize] ; ["Offset of field: aws_io_handle::set_queue"] [:: std :: mem :: offset_of ! (aws_io_handle , set_queue) - 16usize] ; } ; impl Default for aws_io_handle { 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 (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_io_message_type { AWS_IO_MESSAGE_APPLICATION_DATA = 0 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_channel { _unused : [u8 ; 0] , } pub type aws_channel_on_message_write_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (channel : * mut aws_channel , message : * mut aws_io_message , err_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_io_message { # [doc = " Allocator used for the message and message data. If this is null, the message belongs to a pool or some other\n message manager."] pub allocator : * mut aws_allocator , # [doc = " Buffer containing the data for message"] pub message_data : aws_byte_buf , # [doc = " type of the message. This is used for framework control messages. Currently the only type is\n AWS_IO_MESSAGE_APPLICATION_DATA"] pub message_type : aws_io_message_type , # [doc = " Conveys information about the contents of message_data (e.g. cast the ptr to some type). If 0, it's just opaque\n data."] pub message_tag : :: libc :: c_int , # [doc = " In order to avoid excess allocations/copies, on a partial read or write, the copy mark is set to indicate how\n much of this message has already been processed or copied."] pub copy_mark : usize , # [doc = " The channel that the message is bound to."] pub owning_channel : * mut aws_channel , # [doc = " Invoked by the channel once the entire message has been written to the data sink."] pub on_completion : aws_channel_on_message_write_completed_fn , # [doc = " arbitrary user data for the on_completion callback"] pub user_data : * mut :: libc :: c_void , # [doc = " it's incredibly likely something is going to need to queue this,\n go ahead and make sure the list info is part of the original allocation."] pub queueing_handle : aws_linked_list_node , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_io_message"] [:: std :: mem :: size_of :: < aws_io_message > () - 96usize] ; ["Alignment of aws_io_message"] [:: std :: mem :: align_of :: < aws_io_message > () - 8usize] ; ["Offset of field: aws_io_message::allocator"] [:: std :: mem :: offset_of ! (aws_io_message , allocator) - 0usize] ; ["Offset of field: aws_io_message::message_data"] [:: std :: mem :: offset_of ! (aws_io_message , message_data) - 8usize] ; ["Offset of field: aws_io_message::message_type"] [:: std :: mem :: offset_of ! (aws_io_message , message_type) - 40usize] ; ["Offset of field: aws_io_message::message_tag"] [:: std :: mem :: offset_of ! (aws_io_message , message_tag) - 44usize] ; ["Offset of field: aws_io_message::copy_mark"] [:: std :: mem :: offset_of ! (aws_io_message , copy_mark) - 48usize] ; ["Offset of field: aws_io_message::owning_channel"] [:: std :: mem :: offset_of ! (aws_io_message , owning_channel) - 56usize] ; ["Offset of field: aws_io_message::on_completion"] [:: std :: mem :: offset_of ! (aws_io_message , on_completion) - 64usize] ; ["Offset of field: aws_io_message::user_data"] [:: std :: mem :: offset_of ! (aws_io_message , user_data) - 72usize] ; ["Offset of field: aws_io_message::queueing_handle"] [:: std :: mem :: offset_of ! (aws_io_message , queueing_handle) - 80usize] ; } ; impl Default for aws_io_message { 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_io_clock_fn = :: std :: option :: Option < unsafe extern "C" fn (timestamp : * mut u64) -> :: libc :: c_int > ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_io_errors { AWS_IO_CHANNEL_ERROR_ERROR_CANT_ACCEPT_INPUT = 1024 , AWS_IO_CHANNEL_UNKNOWN_MESSAGE_TYPE = 1025 , AWS_IO_CHANNEL_READ_WOULD_EXCEED_WINDOW = 1026 , AWS_IO_EVENT_LOOP_ALREADY_ASSIGNED = 1027 , AWS_IO_EVENT_LOOP_SHUTDOWN = 1028 , AWS_IO_TLS_ERROR_NEGOTIATION_FAILURE = 1029 , AWS_IO_TLS_ERROR_NOT_NEGOTIATED = 1030 , AWS_IO_TLS_ERROR_WRITE_FAILURE = 1031 , AWS_IO_TLS_ERROR_ALERT_RECEIVED = 1032 , AWS_IO_TLS_CTX_ERROR = 1033 , AWS_IO_TLS_VERSION_UNSUPPORTED = 1034 , AWS_IO_TLS_CIPHER_PREF_UNSUPPORTED = 1035 , AWS_IO_MISSING_ALPN_MESSAGE = 1036 , AWS_IO_UNHANDLED_ALPN_PROTOCOL_MESSAGE = 1037 , AWS_IO_FILE_VALIDATION_FAILURE = 1038 , AWS_ERROR_IO_EVENT_LOOP_THREAD_ONLY = 1039 , AWS_ERROR_IO_ALREADY_SUBSCRIBED = 1040 , AWS_ERROR_IO_NOT_SUBSCRIBED = 1041 , AWS_ERROR_IO_OPERATION_CANCELLED = 1042 , AWS_IO_READ_WOULD_BLOCK = 1043 , AWS_IO_BROKEN_PIPE = 1044 , AWS_IO_SOCKET_UNSUPPORTED_ADDRESS_FAMILY = 1045 , AWS_IO_SOCKET_INVALID_OPERATION_FOR_TYPE = 1046 , AWS_IO_SOCKET_CONNECTION_REFUSED = 1047 , AWS_IO_SOCKET_TIMEOUT = 1048 , AWS_IO_SOCKET_NO_ROUTE_TO_HOST = 1049 , AWS_IO_SOCKET_NETWORK_DOWN = 1050 , AWS_IO_SOCKET_CLOSED = 1051 , AWS_IO_SOCKET_NOT_CONNECTED = 1052 , AWS_IO_SOCKET_INVALID_OPTIONS = 1053 , AWS_IO_SOCKET_ADDRESS_IN_USE = 1054 , AWS_IO_SOCKET_INVALID_ADDRESS = 1055 , AWS_IO_SOCKET_ILLEGAL_OPERATION_FOR_STATE = 1056 , AWS_IO_SOCKET_CONNECT_ABORTED = 1057 , AWS_IO_DNS_QUERY_FAILED = 1058 , AWS_IO_DNS_INVALID_NAME = 1059 , AWS_IO_DNS_NO_ADDRESS_FOR_HOST = 1060 , AWS_IO_DNS_HOST_REMOVED_FROM_CACHE = 1061 , AWS_IO_STREAM_INVALID_SEEK_POSITION = 1062 , AWS_IO_STREAM_READ_FAILED = 1063 , DEPRECATED_AWS_IO_INVALID_FILE_HANDLE = 1064 , AWS_IO_SHARED_LIBRARY_LOAD_FAILURE = 1065 , AWS_IO_SHARED_LIBRARY_FIND_SYMBOL_FAILURE = 1066 , AWS_IO_TLS_NEGOTIATION_TIMEOUT = 1067 , AWS_IO_TLS_ALERT_NOT_GRACEFUL = 1068 , AWS_IO_MAX_RETRIES_EXCEEDED = 1069 , AWS_IO_RETRY_PERMISSION_DENIED = 1070 , AWS_IO_TLS_DIGEST_ALGORITHM_UNSUPPORTED = 1071 , AWS_IO_TLS_SIGNATURE_ALGORITHM_UNSUPPORTED = 1072 , AWS_ERROR_PKCS11_VERSION_UNSUPPORTED = 1073 , AWS_ERROR_PKCS11_TOKEN_NOT_FOUND = 1074 , AWS_ERROR_PKCS11_KEY_NOT_FOUND = 1075 , AWS_ERROR_PKCS11_KEY_TYPE_UNSUPPORTED = 1076 , AWS_ERROR_PKCS11_UNKNOWN_CRYPTOKI_RETURN_VALUE = 1077 , AWS_ERROR_PKCS11_CKR_CANCEL = 1078 , AWS_ERROR_PKCS11_CKR_HOST_MEMORY = 1079 , AWS_ERROR_PKCS11_CKR_SLOT_ID_INVALID = 1080 , AWS_ERROR_PKCS11_CKR_GENERAL_ERROR = 1081 , AWS_ERROR_PKCS11_CKR_FUNCTION_FAILED = 1082 , AWS_ERROR_PKCS11_CKR_ARGUMENTS_BAD = 1083 , AWS_ERROR_PKCS11_CKR_NO_EVENT = 1084 , AWS_ERROR_PKCS11_CKR_NEED_TO_CREATE_THREADS = 1085 , AWS_ERROR_PKCS11_CKR_CANT_LOCK = 1086 , AWS_ERROR_PKCS11_CKR_ATTRIBUTE_READ_ONLY = 1087 , AWS_ERROR_PKCS11_CKR_ATTRIBUTE_SENSITIVE = 1088 , AWS_ERROR_PKCS11_CKR_ATTRIBUTE_TYPE_INVALID = 1089 , AWS_ERROR_PKCS11_CKR_ATTRIBUTE_VALUE_INVALID = 1090 , AWS_ERROR_PKCS11_CKR_ACTION_PROHIBITED = 1091 , AWS_ERROR_PKCS11_CKR_DATA_INVALID = 1092 , AWS_ERROR_PKCS11_CKR_DATA_LEN_RANGE = 1093 , AWS_ERROR_PKCS11_CKR_DEVICE_ERROR = 1094 , AWS_ERROR_PKCS11_CKR_DEVICE_MEMORY = 1095 , AWS_ERROR_PKCS11_CKR_DEVICE_REMOVED = 1096 , AWS_ERROR_PKCS11_CKR_ENCRYPTED_DATA_INVALID = 1097 , AWS_ERROR_PKCS11_CKR_ENCRYPTED_DATA_LEN_RANGE = 1098 , AWS_ERROR_PKCS11_CKR_FUNCTION_CANCELED = 1099 , AWS_ERROR_PKCS11_CKR_FUNCTION_NOT_PARALLEL = 1100 , AWS_ERROR_PKCS11_CKR_FUNCTION_NOT_SUPPORTED = 1101 , AWS_ERROR_PKCS11_CKR_KEY_HANDLE_INVALID = 1102 , AWS_ERROR_PKCS11_CKR_KEY_SIZE_RANGE = 1103 , AWS_ERROR_PKCS11_CKR_KEY_TYPE_INCONSISTENT = 1104 , AWS_ERROR_PKCS11_CKR_KEY_NOT_NEEDED = 1105 , AWS_ERROR_PKCS11_CKR_KEY_CHANGED = 1106 , AWS_ERROR_PKCS11_CKR_KEY_NEEDED = 1107 , AWS_ERROR_PKCS11_CKR_KEY_INDIGESTIBLE = 1108 , AWS_ERROR_PKCS11_CKR_KEY_FUNCTION_NOT_PERMITTED = 1109 , AWS_ERROR_PKCS11_CKR_KEY_NOT_WRAPPABLE = 1110 , AWS_ERROR_PKCS11_CKR_KEY_UNEXTRACTABLE = 1111 , AWS_ERROR_PKCS11_CKR_MECHANISM_INVALID = 1112 , AWS_ERROR_PKCS11_CKR_MECHANISM_PARAM_INVALID = 1113 , AWS_ERROR_PKCS11_CKR_OBJECT_HANDLE_INVALID = 1114 , AWS_ERROR_PKCS11_CKR_OPERATION_ACTIVE = 1115 , AWS_ERROR_PKCS11_CKR_OPERATION_NOT_INITIALIZED = 1116 , AWS_ERROR_PKCS11_CKR_PIN_INCORRECT = 1117 , AWS_ERROR_PKCS11_CKR_PIN_INVALID = 1118 , AWS_ERROR_PKCS11_CKR_PIN_LEN_RANGE = 1119 , AWS_ERROR_PKCS11_CKR_PIN_EXPIRED = 1120 , AWS_ERROR_PKCS11_CKR_PIN_LOCKED = 1121 , AWS_ERROR_PKCS11_CKR_SESSION_CLOSED = 1122 , AWS_ERROR_PKCS11_CKR_SESSION_COUNT = 1123 , AWS_ERROR_PKCS11_CKR_SESSION_HANDLE_INVALID = 1124 , AWS_ERROR_PKCS11_CKR_SESSION_PARALLEL_NOT_SUPPORTED = 1125 , AWS_ERROR_PKCS11_CKR_SESSION_READ_ONLY = 1126 , AWS_ERROR_PKCS11_CKR_SESSION_EXISTS = 1127 , AWS_ERROR_PKCS11_CKR_SESSION_READ_ONLY_EXISTS = 1128 , AWS_ERROR_PKCS11_CKR_SESSION_READ_WRITE_SO_EXISTS = 1129 , AWS_ERROR_PKCS11_CKR_SIGNATURE_INVALID = 1130 , AWS_ERROR_PKCS11_CKR_SIGNATURE_LEN_RANGE = 1131 , AWS_ERROR_PKCS11_CKR_TEMPLATE_INCOMPLETE = 1132 , AWS_ERROR_PKCS11_CKR_TEMPLATE_INCONSISTENT = 1133 , AWS_ERROR_PKCS11_CKR_TOKEN_NOT_PRESENT = 1134 , AWS_ERROR_PKCS11_CKR_TOKEN_NOT_RECOGNIZED = 1135 , AWS_ERROR_PKCS11_CKR_TOKEN_WRITE_PROTECTED = 1136 , AWS_ERROR_PKCS11_CKR_UNWRAPPING_KEY_HANDLE_INVALID = 1137 , AWS_ERROR_PKCS11_CKR_UNWRAPPING_KEY_SIZE_RANGE = 1138 , AWS_ERROR_PKCS11_CKR_UNWRAPPING_KEY_TYPE_INCONSISTENT = 1139 , AWS_ERROR_PKCS11_CKR_USER_ALREADY_LOGGED_IN = 1140 , AWS_ERROR_PKCS11_CKR_USER_NOT_LOGGED_IN = 1141 , AWS_ERROR_PKCS11_CKR_USER_PIN_NOT_INITIALIZED = 1142 , AWS_ERROR_PKCS11_CKR_USER_TYPE_INVALID = 1143 , AWS_ERROR_PKCS11_CKR_USER_ANOTHER_ALREADY_LOGGED_IN = 1144 , AWS_ERROR_PKCS11_CKR_USER_TOO_MANY_TYPES = 1145 , AWS_ERROR_PKCS11_CKR_WRAPPED_KEY_INVALID = 1146 , AWS_ERROR_PKCS11_CKR_WRAPPED_KEY_LEN_RANGE = 1147 , AWS_ERROR_PKCS11_CKR_WRAPPING_KEY_HANDLE_INVALID = 1148 , AWS_ERROR_PKCS11_CKR_WRAPPING_KEY_SIZE_RANGE = 1149 , AWS_ERROR_PKCS11_CKR_WRAPPING_KEY_TYPE_INCONSISTENT = 1150 , AWS_ERROR_PKCS11_CKR_RANDOM_SEED_NOT_SUPPORTED = 1151 , AWS_ERROR_PKCS11_CKR_RANDOM_NO_RNG = 1152 , AWS_ERROR_PKCS11_CKR_DOMAIN_PARAMS_INVALID = 1153 , AWS_ERROR_PKCS11_CKR_CURVE_NOT_SUPPORTED = 1154 , AWS_ERROR_PKCS11_CKR_BUFFER_TOO_SMALL = 1155 , AWS_ERROR_PKCS11_CKR_SAVED_STATE_INVALID = 1156 , AWS_ERROR_PKCS11_CKR_INFORMATION_SENSITIVE = 1157 , AWS_ERROR_PKCS11_CKR_STATE_UNSAVEABLE = 1158 , AWS_ERROR_PKCS11_CKR_CRYPTOKI_NOT_INITIALIZED = 1159 , AWS_ERROR_PKCS11_CKR_CRYPTOKI_ALREADY_INITIALIZED = 1160 , AWS_ERROR_PKCS11_CKR_MUTEX_BAD = 1161 , AWS_ERROR_PKCS11_CKR_MUTEX_NOT_LOCKED = 1162 , AWS_ERROR_PKCS11_CKR_NEW_PIN_MODE = 1163 , AWS_ERROR_PKCS11_CKR_NEXT_OTP = 1164 , AWS_ERROR_PKCS11_CKR_EXCEEDED_MAX_ITERATIONS = 1165 , AWS_ERROR_PKCS11_CKR_FIPS_SELF_TEST_FAILED = 1166 , AWS_ERROR_PKCS11_CKR_LIBRARY_LOAD_FAILED = 1167 , AWS_ERROR_PKCS11_CKR_PIN_TOO_WEAK = 1168 , AWS_ERROR_PKCS11_CKR_PUBLIC_KEY_INVALID = 1169 , AWS_ERROR_PKCS11_CKR_FUNCTION_REJECTED = 1170 , AWS_ERROR_IO_PINNED_EVENT_LOOP_MISMATCH = 1171 , AWS_ERROR_PKCS11_ENCODING_ERROR = 1172 , AWS_IO_TLS_ERROR_DEFAULT_TRUST_STORE_NOT_FOUND = 1173 , AWS_IO_STREAM_SEEK_FAILED = 1174 , AWS_IO_STREAM_GET_LENGTH_FAILED = 1175 , AWS_IO_STREAM_SEEK_UNSUPPORTED = 1176 , AWS_IO_STREAM_GET_LENGTH_UNSUPPORTED = 1177 , AWS_IO_TLS_ERROR_READ_FAILURE = 1178 , AWS_ERROR_PEM_MALFORMED = 1179 , AWS_IO_SOCKET_MISSING_EVENT_LOOP = 1180 , AWS_IO_TLS_UNKNOWN_ROOT_CERTIFICATE = 1181 , AWS_IO_TLS_NO_ROOT_CERTIFICATE_FOUND = 1182 , AWS_IO_TLS_CERTIFICATE_EXPIRED = 1183 , AWS_IO_TLS_CERTIFICATE_NOT_YET_VALID = 1184 , AWS_IO_TLS_BAD_CERTIFICATE = 1185 , AWS_IO_TLS_PEER_CERTIFICATE_EXPIRED = 1186 , AWS_IO_TLS_BAD_PEER_CERTIFICATE = 1187 , AWS_IO_TLS_PEER_CERTIFICATE_REVOKED = 1188 , AWS_IO_TLS_PEER_CERTIFICATE_UNKNOWN = 1189 , AWS_IO_TLS_INTERNAL_ERROR = 1190 , AWS_IO_TLS_CLOSED_GRACEFUL = 1191 , AWS_IO_TLS_CLOSED_ABORT = 1192 , AWS_IO_TLS_INVALID_CERTIFICATE_CHAIN = 1193 , AWS_IO_TLS_HOST_NAME_MISMATCH = 1194 , AWS_IO_DNS_QUERY_AGAIN = 1195 , AWS_IO_ERROR_END_RANGE = 2047 , AWS_IO_INVALID_FILE_HANDLE = 50 , } unsafe extern "C" { # [doc = " Initializes internal datastructures used by aws-c-io.\n Must be called before using any functionality in aws-c-io."] pub fn aws_io_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Shuts down the internal datastructures used by aws-c-io."] pub fn aws_io_library_clean_up () ; } unsafe extern "C" { pub fn aws_io_fatal_assert_library_initialized () ; } unsafe extern "C" { pub fn aws_io_error_code_is_retryable (error_code : :: libc :: c_int) -> bool ; } # [doc = " struct aws_atomic_var represents an atomic variable - a value which can hold an integer or pointer\n that can be manipulated atomically. struct aws_atomic_vars should normally only be manipulated\n with atomics methods defined in this header."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_atomic_var { pub value : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_atomic_var"] [:: std :: mem :: size_of :: < aws_atomic_var > () - 8usize] ; ["Alignment of aws_atomic_var"] [:: std :: mem :: align_of :: < aws_atomic_var > () - 8usize] ; ["Offset of field: aws_atomic_var::value"] [:: std :: mem :: offset_of ! (aws_atomic_var , value) - 0usize] ; } ; 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 () } } } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_memory_order { # [doc = " No particular ordering constraints are guaranteed relative to other\n operations at all; we merely ensure that the operation itself is atomic."] aws_memory_order_relaxed = 0 , # [doc = " Specifies acquire ordering. No reads or writes on the current thread can be\n reordered to happen before this operation. This is typically paired with a release\n ordering; any writes that happened on the releasing operation will be visible\n after the paired acquire operation.\n\n Acquire ordering is only meaningful on load or load-store operations."] aws_memory_order_acquire = 2 , # [doc = " Specifies release order. No reads or writes can be reordered to come after this\n operation. Typically paired with an acquire operation.\n\n Release ordering is only meaningful on store or load-store operations."] aws_memory_order_release = 3 , # [doc = " Specifies acquire-release order; if this operation acts as a load, it acts as an\n acquire operation; if it acts as a store, it acts as a release operation; if it's\n a load-store, it does both."] aws_memory_order_acq_rel = 4 , # [doc = " Specifies acquire-release order; if this operation acts as a load, it acts as an\n acquire operation; if it acts as a store, it acts as a release operation; if it's\n a load-store, it does both."] aws_memory_order_seq_cst = 5 , } unsafe extern "C" { # [doc = " Initializes an atomic variable with an integer value. This operation should be done before any\n other operations on this atomic variable, and must be done before attempting any parallel operations.\n\n This operation does not imply a barrier. Ensure that you use an acquire-release barrier (or stronger)\n when communicating the fact that initialization is complete to the other thread. Launching the thread\n implies a sufficiently strong barrier."] pub fn aws_atomic_init_int (var : * mut aws_atomic_var , n : usize) ; } unsafe extern "C" { # [doc = " Initializes an atomic variable with a pointer value. This operation should be done before any\n other operations on this atomic variable, and must be done before attempting any parallel operations.\n\n This operation does not imply a barrier. Ensure that you use an acquire-release barrier (or stronger)\n when communicating the fact that initialization is complete to the other thread. Launching the thread\n implies a sufficiently strong barrier."] pub fn aws_atomic_init_ptr (var : * mut aws_atomic_var , p : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Reads an atomic var as an integer, using the specified ordering, and returns the result."] pub fn aws_atomic_load_int_explicit (var : * const aws_atomic_var , memory_order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Reads an atomic var as an integer, using sequentially consistent ordering, and returns the result."] pub fn aws_atomic_load_int (var : * const aws_atomic_var) -> usize ; } unsafe extern "C" { # [doc = " Reads an atomic var as a pointer, using the specified ordering, and returns the result."] pub fn aws_atomic_load_ptr_explicit (var : * const aws_atomic_var , memory_order : aws_memory_order) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Reads an atomic var as a pointer, using sequentially consistent ordering, and returns the result."] pub fn aws_atomic_load_ptr (var : * const aws_atomic_var) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Stores an integer into an atomic var, using the specified ordering."] pub fn aws_atomic_store_int_explicit (var : * mut aws_atomic_var , n : usize , memory_order : aws_memory_order) ; } unsafe extern "C" { # [doc = " Stores an integer into an atomic var, using sequentially consistent ordering."] pub fn aws_atomic_store_int (var : * mut aws_atomic_var , n : usize) ; } unsafe extern "C" { # [doc = " Stores a pointer into an atomic var, using the specified ordering."] pub fn aws_atomic_store_ptr_explicit (var : * mut aws_atomic_var , p : * mut :: libc :: c_void , memory_order : aws_memory_order) ; } unsafe extern "C" { # [doc = " Stores a pointer into an atomic var, using sequentially consistent ordering."] pub fn aws_atomic_store_ptr (var : * mut aws_atomic_var , p : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Exchanges an integer with the value in an atomic_var, using the specified ordering.\n Returns the value that was previously in the atomic_var."] pub fn aws_atomic_exchange_int_explicit (var : * mut aws_atomic_var , n : usize , memory_order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Exchanges an integer with the value in an atomic_var, using sequentially consistent ordering.\n Returns the value that was previously in the atomic_var."] pub fn aws_atomic_exchange_int (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Exchanges a pointer with the value in an atomic_var, using the specified ordering.\n Returns the value that was previously in the atomic_var."] pub fn aws_atomic_exchange_ptr_explicit (var : * mut aws_atomic_var , p : * mut :: libc :: c_void , memory_order : aws_memory_order) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Exchanges an integer with the value in an atomic_var, using sequentially consistent ordering.\n Returns the value that was previously in the atomic_var."] pub fn aws_atomic_exchange_ptr (var : * mut aws_atomic_var , p : * mut :: libc :: c_void) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set\n to the value in *var. On success, the memory ordering used was order_success; otherwise, it was order_failure.\n order_failure must be no stronger than order_success, and must not be release or acq_rel.\n Returns true if the compare was successful and the variable updated to desired."] pub fn aws_atomic_compare_exchange_int_explicit (var : * mut aws_atomic_var , expected : * mut usize , desired : usize , order_success : aws_memory_order , order_failure : aws_memory_order) -> bool ; } unsafe extern "C" { # [doc = " Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set\n to the value in *var. Uses sequentially consistent memory ordering, regardless of success or failure.\n Returns true if the compare was successful and the variable updated to desired."] pub fn aws_atomic_compare_exchange_int (var : * mut aws_atomic_var , expected : * mut usize , desired : usize) -> bool ; } unsafe extern "C" { # [doc = " Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set\n to the value in *var. On success, the memory ordering used was order_success; otherwise, it was order_failure.\n order_failure must be no stronger than order_success, and must not be release or acq_rel.\n Returns true if the compare was successful and the variable updated to desired."] pub fn aws_atomic_compare_exchange_ptr_explicit (var : * mut aws_atomic_var , expected : * mut * mut :: libc :: c_void , desired : * mut :: libc :: c_void , order_success : aws_memory_order , order_failure : aws_memory_order) -> bool ; } unsafe extern "C" { # [doc = " Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set\n to the value in *var. Uses sequentially consistent memory ordering, regardless of success or failure.\n Returns true if the compare was successful and the variable updated to desired."] pub fn aws_atomic_compare_exchange_ptr (var : * mut aws_atomic_var , expected : * mut * mut :: libc :: c_void , desired : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " Atomically adds n to *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_add_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically subtracts n from *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_sub_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically ORs n with *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_or_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically ANDs n with *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_and_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically XORs n with *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_xor_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically adds n to *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_add (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Atomically subtracts n from *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_sub (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Atomically ands n into *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_and (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Atomically ors n into *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_or (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Atomically xors n into *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_xor (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Provides the same reordering guarantees as an atomic operation with the specified memory order, without\n needing to actually perform an atomic operation."] pub fn aws_atomic_thread_fence (order : aws_memory_order) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_string { pub allocator : * mut aws_allocator , pub len : usize , pub bytes : [u8 ; 1usize] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_string"] [:: std :: mem :: size_of :: < aws_string > () - 24usize] ; ["Alignment of aws_string"] [:: std :: mem :: align_of :: < aws_string > () - 8usize] ; ["Offset of field: aws_string::allocator"] [:: std :: mem :: offset_of ! (aws_string , allocator) - 0usize] ; ["Offset of field: aws_string::len"] [:: std :: mem :: offset_of ! (aws_string , len) - 8usize] ; ["Offset of field: aws_string::bytes"] [:: std :: mem :: offset_of ! (aws_string , bytes) - 16usize] ; } ; 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 () } } } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn aws_string_eq_c_str (str_ : * const aws_string , c_str : * const :: libc :: c_char) -> bool ; } unsafe 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 :: libc :: c_char) -> bool ; } unsafe 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 :: libc :: c_char) -> * mut aws_string ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Deallocate string."] pub fn aws_string_destroy (str_ : * mut aws_string) ; } unsafe extern "C" { # [doc = " Zeroes out the data bytes of string and then deallocates the memory.\n Not safe to run on a string created with AWS_STATIC_STRING_FROM_LITERAL."] pub fn aws_string_destroy_secure (str_ : * mut aws_string) ; } unsafe extern "C" { # [doc = " Compares lexicographical ordering of two strings. This is a binary\n byte-by-byte comparison, treating bytes as unsigned integers. It is suitable\n for either textual or binary data and is unaware of unicode or any other byte\n encoding. If both strings are identical in the bytes of the shorter string,\n then the longer string is lexicographically after the shorter.\n\n Returns a positive number if string a > string b. (i.e., string a is\n lexicographically after string b.) Returns zero if string a = string b.\n Returns negative number if string a < string b."] pub fn aws_string_compare (a : * const aws_string , b : * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " A convenience function for sorting lists of (const struct aws_string *) elements. This can be used as a\n 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 :: libc :: c_void , b : * const :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies all bytes from string to buf.\n\n On success, returns true and updates the buf pointer/length\n accordingly. If there is insufficient space in the buf, returns\n false, leaving the buf unchanged."] pub fn aws_byte_buf_write_from_whole_string (buf : * mut aws_byte_buf , src : * const aws_string) -> bool ; } unsafe extern "C" { # [doc = " Creates an aws_byte_cursor from an existing string.\n If the src is NULL, it returns an empty cursor"] pub fn aws_byte_cursor_from_string (src : * const aws_string) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " If the string was dynamically allocated, clones it. If the string was statically allocated (i.e. has no allocator),\n returns the original string."] pub fn aws_string_clone_or_reuse (allocator : * mut aws_allocator , str_ : * const aws_string) -> * mut aws_string ; } unsafe 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\n is found within max_read_len of str, AWS_ERROR_C_STRING_BUFFER_NOT_NULL_TERMINATED is raised. Otherwise, str_len\n will contain the string length minus the NULL character, and AWS_OP_SUCCESS will be returned."] pub fn aws_secure_strlen (str_ : * const :: libc :: c_char , max_read_len : usize , str_len : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Equivalent to str->bytes."] pub fn aws_string_bytes (str_ : * const aws_string) -> * const u8 ; } unsafe extern "C" { # [doc = " Equivalent to `(const char *)str->bytes`."] pub fn aws_string_c_str (str_ : * const aws_string) -> * const :: libc :: c_char ; } unsafe extern "C" { # [doc = " Evaluates the set of properties that define the shape of all valid aws_string structures.\n It is also a cheap check, in the sense it run in constant time (i.e., no loops or recursion)."] pub fn aws_string_is_valid (str_ : * const aws_string) -> bool ; } unsafe extern "C" { # [doc = " Best-effort checks aws_string invariants, when the str->len is unknown"] pub fn aws_c_string_is_valid (str_ : * const :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " Evaluates if a char is a white character."] pub fn aws_char_is_space (c : u8) -> bool ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_thread_detach_state { AWS_THREAD_NOT_CREATED = 1 , AWS_THREAD_JOINABLE = 2 , AWS_THREAD_JOIN_COMPLETED = 3 , AWS_THREAD_MANAGED = 4 , } # [repr (u32)] # [non_exhaustive] # [doc = " Specifies the join strategy used on an aws_thread, which in turn controls whether or not a thread participates\n in the managed thread system.  The managed thread system provides logic to guarantee a join on all participating\n threads at the cost of laziness (the user cannot control when joins happen).\n\n Manual - thread does not participate in the managed thread system; any joins must be done by the user.  This\n is the default.  The user must call aws_thread_clean_up(), but only after any desired join operation has completed.\n Not doing so will cause the windows handle to leak.\n\n Managed - the managed thread system will automatically perform a join some time after the thread's run function\n has completed.  It is an error to call aws_thread_join on a thread configured with the managed join strategy.  The\n managed thread system will call aws_thread_clean_up() on the thread after the background join has completed.\n\n Additionally, an API exists, aws_thread_join_all_managed(), which blocks and returns when all outstanding threads\n with the managed strategy have fully joined.  This API is useful for tests (rather than waiting for many individual\n signals) and program shutdown or DLL unload.  This API is automatically invoked by the common library clean up\n function.  If the common library clean up is called from a managed thread, this will cause deadlock.\n\n Lazy thread joining is done only when threads finish their run function or when the user calls\n aws_thread_join_all_managed().  This means it may be a long time between thread function completion and the join\n being applied, but the queue of unjoined threads is always one or fewer so there is no critical resource\n backlog.\n\n Currently, only event loop group async cleanup and host resolver threads participate in the managed thread system.\n Additionally, event loop threads will increment and decrement the pending join count (they are manually joined\n internally) in order to have an accurate view of internal thread usage and also to prevent failure to release\n an event loop group fully from allowing aws_thread_join_all_managed() from running to completion when its\n intent is such that it should block instead."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_thread_join_strategy { AWS_TJS_MANUAL = 0 , AWS_TJS_MANAGED = 1 , } # [repr (C)] # [derive (Debug , Copy , Clone)] 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.\n The length should not exceed AWS_THREAD_NAME_RECOMMENDED_STRLEN(15)\n if you want it to display properly on all platforms."] pub name : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_thread_options"] [:: std :: mem :: size_of :: < aws_thread_options > () - 32usize] ; ["Alignment of aws_thread_options"] [:: std :: mem :: align_of :: < aws_thread_options > () - 8usize] ; ["Offset of field: aws_thread_options::stack_size"] [:: std :: mem :: offset_of ! (aws_thread_options , stack_size) - 0usize] ; ["Offset of field: aws_thread_options::cpu_id"] [:: std :: mem :: offset_of ! (aws_thread_options , cpu_id) - 8usize] ; ["Offset of field: aws_thread_options::join_strategy"] [:: std :: mem :: offset_of ! (aws_thread_options , join_strategy) - 12usize] ; ["Offset of field: aws_thread_options::name"] [:: std :: mem :: offset_of ! (aws_thread_options , name) - 16usize] ; } ; 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_thread"] [:: std :: mem :: size_of :: < aws_thread > () - 24usize] ; ["Alignment of aws_thread"] [:: std :: mem :: align_of :: < aws_thread > () - 8usize] ; ["Offset of field: aws_thread::allocator"] [:: std :: mem :: offset_of ! (aws_thread , allocator) - 0usize] ; ["Offset of field: aws_thread::detach_state"] [:: std :: mem :: offset_of ! (aws_thread , detach_state) - 8usize] ; ["Offset of field: aws_thread::thread_id"] [:: std :: mem :: offset_of ! (aws_thread , thread_id) - 16usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Returns an instance of system default thread options."] pub fn aws_default_thread_options () -> * const aws_thread_options ; } unsafe extern "C" { pub fn aws_thread_call_once (flag : * mut aws_thread_once , call_once : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: libc :: c_void) > , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Initializes a new platform specific thread object struct (not the os-level\n thread itself)."] pub fn aws_thread_init (thread : * mut aws_thread , allocator : * mut aws_allocator) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Creates an OS level thread and associates it with func. context will be passed to func when it is executed.\n options will be applied to the thread if they are applicable for the platform.\n\n After launch, you may join on the thread.  A successfully launched thread must have clean_up called on it in order\n to avoid a handle leak.  If you do not join before calling clean_up, the thread will become detached.\n\n 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 :: libc :: c_void) > , arg : * mut :: libc :: c_void , options : * const aws_thread_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the id of thread"] pub fn aws_thread_get_id (thread : * mut aws_thread) -> aws_thread_id_t ; } unsafe extern "C" { # [doc = " Gets the detach state of the thread. For example, is it safe to call join on\n this thread? Has it been detached()?"] pub fn aws_thread_get_detach_state (thread : * mut aws_thread) -> aws_thread_detach_state ; } unsafe extern "C" { # [doc = " Joins the calling thread to a thread instance. Returns when thread is\n finished.  Calling this from the associated OS thread will cause a deadlock."] pub fn aws_thread_join (thread : * mut aws_thread) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Blocking call that waits for all managed threads to complete their join call.  This can only be called\n from the main thread or a non-managed thread.\n\n This gets called automatically from library cleanup.\n\n 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 () -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Overrides how long, in nanoseconds, that aws_thread_join_all_managed will wait for threads to complete.\n A value of zero will result in an unbounded wait."] pub fn aws_thread_set_managed_join_timeout_ns (timeout_in_ns : u64) ; } unsafe 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\n before calling this function."] pub fn aws_thread_clean_up (thread : * mut aws_thread) ; } unsafe extern "C" { # [doc = " Returns the thread id of the calling thread."] pub fn aws_thread_current_thread_id () -> aws_thread_id_t ; } unsafe extern "C" { # [doc = " Compare thread ids."] pub fn aws_thread_thread_id_equal (t1 : aws_thread_id_t , t2 : aws_thread_id_t) -> bool ; } unsafe 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 :: libc :: c_void) > ; unsafe extern "C" { # [doc = " Adds a callback to the chain to be called when the current thread joins.\n Callbacks are called from the current thread, in the reverse order they\n were added, after the thread function returns.\n 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 :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Increments the count of unjoined threads in the managed thread system.  Used by managed threads and\n event loop threads.  Additional usage requires the user to join corresponding threads themselves and\n correctly increment/decrement even in the face of launch/join errors.\n\n aws_thread_join_all_managed() will not return until this count has gone to zero."] pub fn aws_thread_increment_unjoined_count () ; } unsafe extern "C" { # [doc = " Decrements the count of unjoined threads in the managed thread system.  Used by managed threads and\n event loop threads.  Additional usage requires the user to join corresponding threads themselves and\n correctly increment/decrement even in the face of launch/join errors.\n\n aws_thread_join_all_managed() will not return until this count has gone to zero."] pub fn aws_thread_decrement_unjoined_count () ; } unsafe extern "C" { # [doc = " Gets name of the current thread.\n Caller is responsible for destroying returned string.\n If thread does not have a name, AWS_OP_SUCCESS is returned and out_name is\n set to NULL.\n If underlying OS call fails,  AWS_ERROR_SYS_CALL_FAILURE will be raised\n If OS does not support getting thread name, AWS_ERROR_PLATFORM_NOT_SUPPORTED\n will be raised"] pub fn aws_thread_current_name (allocator : * mut aws_allocator , out_name : * mut * mut aws_string) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets name of the thread.\n Caller is responsible for destroying returned string.\n If thread does not have a name, AWS_OP_SUCCESS is returned and out_name is\n set to NULL.\n If underlying OS call fails,  AWS_ERROR_SYS_CALL_FAILURE will be raised\n If OS does not support getting thread name, AWS_ERROR_PLATFORM_NOT_SUPPORTED\n will be raised"] pub fn aws_thread_name (allocator : * mut aws_allocator , thread_id : aws_thread_id_t , out_name : * mut * mut aws_string) -> :: libc :: c_int ; } pub mod aws_log_level { # [doc = " Controls what log calls pass through the logger and what log calls get filtered out.\n If a log level has a value of X, then all log calls using a level <= X will appear, while\n those using a value > X will not occur.\n\n You can filter both dynamically (by setting the log level on the logger object) or statically\n (by defining AWS_STATIC_LOG_LEVEL to be an appropriate integer module-wide).  Statically filtered\n log calls will be completely compiled out but require a rebuild if you want to get more detail\n about what's happening."] pub type Type = :: libc :: c_uint ; pub const AWS_LL_NONE : Type = 0 ; pub const AWS_LL_FATAL : Type = 1 ; pub const AWS_LL_ERROR : Type = 2 ; pub const AWS_LL_WARN : Type = 3 ; pub const AWS_LL_INFO : Type = 4 ; pub const AWS_LL_DEBUG : Type = 5 ; pub const AWS_LL_TRACE : Type = 6 ; pub const AWS_LL_COUNT : Type = 7 ; } # [doc = " Log subject is a way of designating the topic of logging.\n\n The general idea is to support a finer-grained approach to log level control.  The primary use case\n is for situations that require more detailed logging within a specific domain, where enabling that detail\n globally leads to an untenable flood of information.\n\n For example, enable TRACE logging for tls-related log statements (handshake binary payloads), but\n only WARN logging everywhere else (because http payloads would blow up the log files).\n\n Log subject is an enum similar to aws error: each library has its own value-space and someone is\n responsible for registering the value <-> string connections."] pub type aws_log_subject_t = u32 ; pub const AWS_LOG_SUBJECT_STRIDE_BITS : _bindgen_ty_20 = _bindgen_ty_20 :: AWS_LOG_SUBJECT_STRIDE_BITS ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_20 { AWS_LOG_SUBJECT_STRIDE_BITS = 10 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_log_subject_info { pub subject_id : aws_log_subject_t , pub subject_name : * const :: libc :: c_char , pub subject_description : * const :: libc :: c_char , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_subject_info"] [:: std :: mem :: size_of :: < aws_log_subject_info > () - 24usize] ; ["Alignment of aws_log_subject_info"] [:: std :: mem :: align_of :: < aws_log_subject_info > () - 8usize] ; ["Offset of field: aws_log_subject_info::subject_id"] [:: std :: mem :: offset_of ! (aws_log_subject_info , subject_id) - 0usize] ; ["Offset of field: aws_log_subject_info::subject_name"] [:: std :: mem :: offset_of ! (aws_log_subject_info , subject_name) - 8usize] ; ["Offset of field: aws_log_subject_info::subject_description"] [:: std :: mem :: offset_of ! (aws_log_subject_info , subject_description) - 16usize] ; } ; 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)] pub struct aws_log_subject_info_list { pub subject_list : * mut aws_log_subject_info , pub count : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_subject_info_list"] [:: std :: mem :: size_of :: < aws_log_subject_info_list > () - 16usize] ; ["Alignment of aws_log_subject_info_list"] [:: std :: mem :: align_of :: < aws_log_subject_info_list > () - 8usize] ; ["Offset of field: aws_log_subject_info_list::subject_list"] [:: std :: mem :: offset_of ! (aws_log_subject_info_list , subject_list) - 0usize] ; ["Offset of field: aws_log_subject_info_list::count"] [:: std :: mem :: offset_of ! (aws_log_subject_info_list , count) - 8usize] ; } ; 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 () } } } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_common_log_subject { AWS_LS_COMMON_GENERAL = 0 , AWS_LS_COMMON_TASK_SCHEDULER = 1 , AWS_LS_COMMON_THREAD = 2 , AWS_LS_COMMON_MEMTRACE = 3 , AWS_LS_COMMON_XML_PARSER = 4 , AWS_LS_COMMON_IO = 5 , AWS_LS_COMMON_BUS = 6 , AWS_LS_COMMON_TEST = 7 , AWS_LS_COMMON_JSON_PARSER = 8 , AWS_LS_COMMON_CBOR = 9 , AWS_LS_COMMON_LAST = 1023 , } # [doc = " We separate the log level function from the log call itself so that we can do the filter check in the macros (see\n below)\n\n By doing so, we make it so that the variadic format arguments are not even evaluated if the filter check does not\n succeed."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_logger_vtable { pub log : :: std :: option :: Option < unsafe extern "C" fn (logger : * mut aws_logger , log_level : aws_log_level :: Type , subject : aws_log_subject_t , format : * const :: libc :: c_char , ...) -> :: libc :: 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 :: Type > , 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 :: Type) -> :: libc :: c_int > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logger_vtable"] [:: std :: mem :: size_of :: < aws_logger_vtable > () - 32usize] ; ["Alignment of aws_logger_vtable"] [:: std :: mem :: align_of :: < aws_logger_vtable > () - 8usize] ; ["Offset of field: aws_logger_vtable::log"] [:: std :: mem :: offset_of ! (aws_logger_vtable , log) - 0usize] ; ["Offset of field: aws_logger_vtable::get_log_level"] [:: std :: mem :: offset_of ! (aws_logger_vtable , get_log_level) - 8usize] ; ["Offset of field: aws_logger_vtable::clean_up"] [:: std :: mem :: offset_of ! (aws_logger_vtable , clean_up) - 16usize] ; ["Offset of field: aws_logger_vtable::set_log_level"] [:: std :: mem :: offset_of ! (aws_logger_vtable , set_log_level) - 24usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_logger { pub vtable : * mut aws_logger_vtable , pub allocator : * mut aws_allocator , pub p_impl : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logger"] [:: std :: mem :: size_of :: < aws_logger > () - 24usize] ; ["Alignment of aws_logger"] [:: std :: mem :: align_of :: < aws_logger > () - 8usize] ; ["Offset of field: aws_logger::vtable"] [:: std :: mem :: offset_of ! (aws_logger , vtable) - 0usize] ; ["Offset of field: aws_logger::allocator"] [:: std :: mem :: offset_of ! (aws_logger , allocator) - 8usize] ; ["Offset of field: aws_logger::p_impl"] [:: std :: mem :: offset_of ! (aws_logger , p_impl) - 16usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logger_pipeline"] [:: std :: mem :: size_of :: < aws_logger_pipeline > () - 40usize] ; ["Alignment of aws_logger_pipeline"] [:: std :: mem :: align_of :: < aws_logger_pipeline > () - 8usize] ; ["Offset of field: aws_logger_pipeline::formatter"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , formatter) - 0usize] ; ["Offset of field: aws_logger_pipeline::channel"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , channel) - 8usize] ; ["Offset of field: aws_logger_pipeline::writer"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , writer) - 16usize] ; ["Offset of field: aws_logger_pipeline::allocator"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , allocator) - 24usize] ; ["Offset of field: aws_logger_pipeline::level"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , level) - 32usize] ; } ; 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().\n Set `filename` to open a file for logging and close it when the logger cleans up.\n Set `file` to use a file that is already open, such as `stderr` or `stdout`."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_logger_standard_options { pub level : aws_log_level :: Type , pub filename : * const :: libc :: c_char , pub file : * mut FILE , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logger_standard_options"] [:: std :: mem :: size_of :: < aws_logger_standard_options > () - 24usize] ; ["Alignment of aws_logger_standard_options"] [:: std :: mem :: align_of :: < aws_logger_standard_options > () - 8usize] ; ["Offset of field: aws_logger_standard_options::level"] [:: std :: mem :: offset_of ! (aws_logger_standard_options , level) - 0usize] ; ["Offset of field: aws_logger_standard_options::filename"] [:: std :: mem :: offset_of ! (aws_logger_standard_options , filename) - 8usize] ; ["Offset of field: aws_logger_standard_options::file"] [:: std :: mem :: offset_of ! (aws_logger_standard_options , file) - 16usize] ; } ; 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 () } } } unsafe 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) ; } unsafe extern "C" { # [doc = " Gets the aws logger used globally across the process."] pub fn aws_logger_get () -> * mut aws_logger ; } unsafe extern "C" { # [doc = " Gets the aws logger used globally across the process if the logging level is at least the inputted level.\n\n @param subject log subject to perform the level check versus, not currently used\n @param level logging level to check against in order to return the logger\n @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 :: Type) -> * mut aws_logger ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Sets the current logging level for the logger.  Loggers are not require to support this.\n @param logger logger to set the log level for\n @param level new log level for the logger\n @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 :: Type) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Converts a log level to a c-string constant.  Intended primarily to support building log lines that\n include the level in them, i.e.\n\n [ERROR] 10:34:54.642 01-31-19 - Json parse error...."] pub fn aws_log_level_to_string (log_level : aws_log_level :: Type , level_string : * mut * const :: libc :: c_char) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Converts a c-string constant to a log level value.  Uses case-insensitive comparison\n and simply iterates all possibilities until a match or nothing remains.  If no match\n is found, AWS_OP_ERR is returned."] pub fn aws_string_to_log_level (level_string : * const :: libc :: c_char , log_level : * mut aws_log_level :: Type) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Converts an aws_thread_id_t to a c-string.  For portability, aws_thread_id_t\n must not be printed directly.  Intended primarily to support building log\n lines that include the thread id in them.  The parameter `buffer` must\n point-to a char buffer of length `bufsz == AWS_THREAD_ID_T_REPR_BUFSZ`.  The\n thread id representation is returned in `buffer`."] pub fn aws_thread_id_t_to_string (thread_id : aws_thread_id_t , buffer : * mut :: libc :: c_char , bufsz : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get subject name from log subject."] pub fn aws_log_subject_name (subject : aws_log_subject_t) -> * const :: libc :: c_char ; } unsafe 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) ; } unsafe 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) ; } unsafe extern "C" { pub fn aws_logger_init_standard (logger : * mut aws_logger , allocator : * mut aws_allocator , options : * mut aws_logger_standard_options) -> :: libc :: c_int ; } unsafe 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 :: Type) -> :: libc :: c_int ; } unsafe extern "C" { pub static mut g_pipeline_logger_owned_vtable : aws_logger_vtable ; } unsafe extern "C" { pub fn aws_logger_init_noalloc (logger : * mut aws_logger , allocator : * mut aws_allocator , options : * mut aws_logger_standard_options) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_io_log_subject { AWS_LS_IO_GENERAL = 1024 , AWS_LS_IO_EVENT_LOOP = 1025 , AWS_LS_IO_SOCKET = 1026 , AWS_LS_IO_SOCKET_HANDLER = 1027 , AWS_LS_IO_TLS = 1028 , AWS_LS_IO_ALPN = 1029 , AWS_LS_IO_DNS = 1030 , AWS_LS_IO_PKI = 1031 , AWS_LS_IO_CHANNEL = 1032 , AWS_LS_IO_CHANNEL_BOOTSTRAP = 1033 , AWS_LS_IO_FILE_UTILS = 1034 , AWS_LS_IO_SHARED_LIBRARY = 1035 , AWS_LS_IO_EXPONENTIAL_BACKOFF_RETRY_STRATEGY = 1036 , AWS_LS_IO_STANDARD_RETRY_STRATEGY = 1037 , AWS_LS_IO_PKCS11 = 1038 , AWS_LS_IO_PEM = 1039 , AWS_IO_LS_LAST = 2047 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_sdkutils_errors { AWS_ERROR_SDKUTILS_GENERAL = 15360 , AWS_ERROR_SDKUTILS_PARSE_FATAL = 15361 , AWS_ERROR_SDKUTILS_PARSE_RECOVERABLE = 15362 , AWS_ERROR_SDKUTILS_ENDPOINTS_UNSUPPORTED_RULESET = 15363 , AWS_ERROR_SDKUTILS_ENDPOINTS_PARSE_FAILED = 15364 , AWS_ERROR_SDKUTILS_ENDPOINTS_RESOLVE_INIT_FAILED = 15365 , AWS_ERROR_SDKUTILS_ENDPOINTS_RESOLVE_FAILED = 15366 , AWS_ERROR_SDKUTILS_ENDPOINTS_EMPTY_RULESET = 15367 , AWS_ERROR_SDKUTILS_ENDPOINTS_RULESET_EXHAUSTED = 15368 , AWS_ERROR_SDKUTILS_PARTITIONS_UNSUPPORTED = 15369 , AWS_ERROR_SDKUTILS_PARTITIONS_PARSE_FAILED = 15370 , AWS_ERROR_SDKUTILS_ENDPOINTS_UNSUPPORTED_REGEX = 15371 , AWS_ERROR_SDKUTILS_ENDPOINTS_REGEX_NO_MATCH = 15372 , AWS_ERROR_SDKUTILS_END_RANGE = 16383 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_sdkutils_log_subject { AWS_LS_SDKUTILS_GENERAL = 15360 , AWS_LS_SDKUTILS_PROFILE = 15361 , AWS_LS_SDKUTILS_ENDPOINTS_PARSING = 15362 , AWS_LS_SDKUTILS_ENDPOINTS_RESOLVE = 15363 , AWS_LS_SDKUTILS_ENDPOINTS_GENERAL = 15364 , AWS_LS_SDKUTILS_PARTITIONS_PARSING = 15365 , AWS_LS_SDKUTILS_ENDPOINTS_REGEX = 15366 , AWS_LS_SDKUTILS_LAST = 16383 , } unsafe extern "C" { pub fn aws_sdkutils_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { pub fn aws_sdkutils_library_clean_up () ; } # [repr (u32)] # [non_exhaustive] # [doc = " Auth-specific error codes"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_auth_errors { AWS_AUTH_PROFILE_PARSE_RECOVERABLE_ERROR = 15362 , AWS_AUTH_PROFILE_PARSE_FATAL_ERROR = 15361 , AWS_AUTH_SIGNING_UNSUPPORTED_ALGORITHM = 6144 , AWS_AUTH_SIGNING_MISMATCHED_CONFIGURATION = 6145 , AWS_AUTH_SIGNING_NO_CREDENTIALS = 6146 , AWS_AUTH_SIGNING_ILLEGAL_REQUEST_QUERY_PARAM = 6147 , AWS_AUTH_SIGNING_ILLEGAL_REQUEST_HEADER = 6148 , AWS_AUTH_SIGNING_INVALID_CONFIGURATION = 6149 , AWS_AUTH_CREDENTIALS_PROVIDER_INVALID_ENVIRONMENT = 6150 , AWS_AUTH_CREDENTIALS_PROVIDER_INVALID_DELEGATE = 6151 , AWS_AUTH_CREDENTIALS_PROVIDER_PROFILE_SOURCE_FAILURE = 6152 , AWS_AUTH_CREDENTIALS_PROVIDER_IMDS_SOURCE_FAILURE = 6153 , AWS_AUTH_CREDENTIALS_PROVIDER_STS_SOURCE_FAILURE = 6154 , AWS_AUTH_CREDENTIALS_PROVIDER_HTTP_STATUS_FAILURE = 6155 , AWS_AUTH_PROVIDER_PARSER_UNEXPECTED_RESPONSE = 6156 , AWS_AUTH_CREDENTIALS_PROVIDER_ECS_SOURCE_FAILURE = 6157 , AWS_AUTH_CREDENTIALS_PROVIDER_X509_SOURCE_FAILURE = 6158 , AWS_AUTH_CREDENTIALS_PROVIDER_PROCESS_SOURCE_FAILURE = 6159 , AWS_AUTH_CREDENTIALS_PROVIDER_STS_WEB_IDENTITY_SOURCE_FAILURE = 6160 , AWS_AUTH_SIGNING_UNSUPPORTED_SIGNATURE_TYPE = 6161 , AWS_AUTH_SIGNING_MISSING_PREVIOUS_SIGNATURE = 6162 , AWS_AUTH_SIGNING_INVALID_CREDENTIALS = 6163 , AWS_AUTH_CANONICAL_REQUEST_MISMATCH = 6164 , AWS_AUTH_SIGV4A_SIGNATURE_VALIDATION_FAILURE = 6165 , AWS_AUTH_CREDENTIALS_PROVIDER_COGNITO_SOURCE_FAILURE = 6166 , AWS_AUTH_CREDENTIALS_PROVIDER_DELEGATE_FAILURE = 6167 , AWS_AUTH_SSO_TOKEN_PROVIDER_SOURCE_FAILURE = 6168 , AWS_AUTH_SSO_TOKEN_INVALID = 6169 , AWS_AUTH_SSO_TOKEN_EXPIRED = 6170 , AWS_AUTH_CREDENTIALS_PROVIDER_SSO_SOURCE_FAILURE = 6171 , AWS_AUTH_IMDS_CLIENT_SOURCE_FAILURE = 6172 , AWS_AUTH_PROFILE_STS_CREDENTIALS_PROVIDER_CYCLE_FAILURE = 6173 , AWS_AUTH_CREDENTIALS_PROVIDER_ECS_INVALID_TOKEN_FILE_PATH = 6174 , AWS_AUTH_CREDENTIALS_PROVIDER_ECS_INVALID_HOST = 6175 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_SESSION_MISSING = 6176 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_REGION_MISSING = 6177 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_TOKEN_PATH = 6178 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_TOKEN = 6179 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_TOKEN_EXPIRED = 6180 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_INVALID_PEM = 6181 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_REFRESH_TOKEN = 6182 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_WRITE_TOKEN = 6183 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_DPOP_HEADER = 6184 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_REQUEST_BODY = 6185 , AWS_AUTH_ERROR_END_RANGE = 7167 , } # [repr (u32)] # [non_exhaustive] # [doc = " Auth-specific logging subjects"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_auth_log_subject { AWS_LS_AUTH_GENERAL = 6144 , AWS_LS_AUTH_PROFILE = 6145 , AWS_LS_AUTH_CREDENTIALS_PROVIDER = 6146 , AWS_LS_AUTH_SIGNING = 6147 , AWS_LS_IMDS_CLIENT = 6148 , AWS_LS_AUTH_LAST = 7167 , } unsafe extern "C" { # [doc = " Initializes internal datastructures used by aws-c-auth.\n Must be called before using any functionality in aws-c-auth.\n\n @param allocator memory allocator to use for any module-level memory allocation"] pub fn aws_auth_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Clean up internal datastructures used by aws-c-auth.\n Must not be called until application is done using functionality in aws-c-auth."] pub fn aws_auth_library_clean_up () ; } pub type aws_simple_completion_callback = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: libc :: c_void) > ; # [doc = " Configuration for a callback to invoke when something has been completely\n cleaned up.  Primarily used in async cleanup control flows."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_shutdown_callback_options { # [doc = " Function to invoke when the associated object is fully destroyed."] pub shutdown_callback_fn : aws_simple_completion_callback , # [doc = " User data to invoke the shutdown callback with."] pub shutdown_callback_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_shutdown_callback_options"] [:: std :: mem :: size_of :: < aws_shutdown_callback_options > () - 16usize] ; ["Alignment of aws_shutdown_callback_options"] [:: std :: mem :: align_of :: < aws_shutdown_callback_options > () - 8usize] ; ["Offset of field: aws_shutdown_callback_options::shutdown_callback_fn"] [:: std :: mem :: offset_of ! (aws_shutdown_callback_options , shutdown_callback_fn) - 0usize] ; ["Offset of field: aws_shutdown_callback_options::shutdown_callback_user_data"] [:: std :: mem :: offset_of ! (aws_shutdown_callback_options , shutdown_callback_user_data) - 8usize] ; } ; 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 () } } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_ref_count { pub ref_count : aws_atomic_var , pub object : * mut :: libc :: c_void , pub on_zero_fn : aws_simple_completion_callback , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_ref_count"] [:: std :: mem :: size_of :: < aws_ref_count > () - 24usize] ; ["Alignment of aws_ref_count"] [:: std :: mem :: align_of :: < aws_ref_count > () - 8usize] ; ["Offset of field: aws_ref_count::ref_count"] [:: std :: mem :: offset_of ! (aws_ref_count , ref_count) - 0usize] ; ["Offset of field: aws_ref_count::object"] [:: std :: mem :: offset_of ! (aws_ref_count , object) - 8usize] ; ["Offset of field: aws_ref_count::on_zero_fn"] [:: std :: mem :: offset_of ! (aws_ref_count , on_zero_fn) - 16usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Initializes a ref-counter structure.  After initialization, the ref count will be 1.\n\n @param ref_count ref-counter to initialize\n @param object object being ref counted\n @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 :: libc :: c_void , on_zero_fn : aws_simple_completion_callback) ; } unsafe extern "C" { # [doc = " Increments a ref-counter's ref count\n\n @param ref_count ref-counter to increment the count for\n @return the object being ref-counted"] pub fn aws_ref_count_acquire (ref_count : * mut aws_ref_count) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Decrements a ref-counter's ref count.  Invokes the on_zero callback if the ref count drops to zero\n @param ref_count ref-counter to decrement the count for\n @return the value of the decremented ref count"] pub fn aws_ref_count_release (ref_count : * mut aws_ref_count) -> usize ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_errors { AWS_ERROR_HTTP_UNKNOWN = 2048 , AWS_ERROR_HTTP_HEADER_NOT_FOUND = 2049 , AWS_ERROR_HTTP_INVALID_HEADER_FIELD = 2050 , AWS_ERROR_HTTP_INVALID_HEADER_NAME = 2051 , AWS_ERROR_HTTP_INVALID_HEADER_VALUE = 2052 , AWS_ERROR_HTTP_INVALID_METHOD = 2053 , AWS_ERROR_HTTP_INVALID_PATH = 2054 , AWS_ERROR_HTTP_INVALID_STATUS_CODE = 2055 , AWS_ERROR_HTTP_MISSING_BODY_STREAM = 2056 , AWS_ERROR_HTTP_INVALID_BODY_STREAM = 2057 , AWS_ERROR_HTTP_CONNECTION_CLOSED = 2058 , AWS_ERROR_HTTP_SWITCHED_PROTOCOLS = 2059 , AWS_ERROR_HTTP_UNSUPPORTED_PROTOCOL = 2060 , AWS_ERROR_HTTP_REACTION_REQUIRED = 2061 , AWS_ERROR_HTTP_DATA_NOT_AVAILABLE = 2062 , AWS_ERROR_HTTP_OUTGOING_STREAM_LENGTH_INCORRECT = 2063 , AWS_ERROR_HTTP_CALLBACK_FAILURE = 2064 , AWS_ERROR_HTTP_WEBSOCKET_UPGRADE_FAILURE = 2065 , AWS_ERROR_HTTP_WEBSOCKET_CLOSE_FRAME_SENT = 2066 , AWS_ERROR_HTTP_WEBSOCKET_IS_MIDCHANNEL_HANDLER = 2067 , AWS_ERROR_HTTP_CONNECTION_MANAGER_INVALID_STATE_FOR_ACQUIRE = 2068 , AWS_ERROR_HTTP_CONNECTION_MANAGER_VENDED_CONNECTION_UNDERFLOW = 2069 , AWS_ERROR_HTTP_SERVER_CLOSED = 2070 , AWS_ERROR_HTTP_PROXY_CONNECT_FAILED = 2071 , AWS_ERROR_HTTP_CONNECTION_MANAGER_SHUTTING_DOWN = 2072 , AWS_ERROR_HTTP_CHANNEL_THROUGHPUT_FAILURE = 2073 , AWS_ERROR_HTTP_PROTOCOL_ERROR = 2074 , AWS_ERROR_HTTP_STREAM_IDS_EXHAUSTED = 2075 , AWS_ERROR_HTTP_GOAWAY_RECEIVED = 2076 , AWS_ERROR_HTTP_RST_STREAM_RECEIVED = 2077 , AWS_ERROR_HTTP_RST_STREAM_SENT = 2078 , AWS_ERROR_HTTP_STREAM_NOT_ACTIVATED = 2079 , AWS_ERROR_HTTP_STREAM_HAS_COMPLETED = 2080 , AWS_ERROR_HTTP_PROXY_STRATEGY_NTLM_CHALLENGE_TOKEN_MISSING = 2081 , AWS_ERROR_HTTP_PROXY_STRATEGY_TOKEN_RETRIEVAL_FAILURE = 2082 , AWS_ERROR_HTTP_PROXY_CONNECT_FAILED_RETRYABLE = 2083 , AWS_ERROR_HTTP_PROTOCOL_SWITCH_FAILURE = 2084 , AWS_ERROR_HTTP_MAX_CONCURRENT_STREAMS_EXCEEDED = 2085 , AWS_ERROR_HTTP_STREAM_MANAGER_SHUTTING_DOWN = 2086 , AWS_ERROR_HTTP_STREAM_MANAGER_CONNECTION_ACQUIRE_FAILURE = 2087 , AWS_ERROR_HTTP_STREAM_MANAGER_UNEXPECTED_HTTP_VERSION = 2088 , AWS_ERROR_HTTP_WEBSOCKET_PROTOCOL_ERROR = 2089 , AWS_ERROR_HTTP_MANUAL_WRITE_NOT_ENABLED = 2090 , AWS_ERROR_HTTP_MANUAL_WRITE_HAS_COMPLETED = 2091 , AWS_ERROR_HTTP_RESPONSE_FIRST_BYTE_TIMEOUT = 2092 , AWS_ERROR_HTTP_CONNECTION_MANAGER_ACQUISITION_TIMEOUT = 2093 , AWS_ERROR_HTTP_CONNECTION_MANAGER_MAX_PENDING_ACQUISITIONS_EXCEEDED = 2094 , AWS_ERROR_HTTP_END_RANGE = 3071 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http2_error_code { AWS_HTTP2_ERR_NO_ERROR = 0 , AWS_HTTP2_ERR_PROTOCOL_ERROR = 1 , AWS_HTTP2_ERR_INTERNAL_ERROR = 2 , AWS_HTTP2_ERR_FLOW_CONTROL_ERROR = 3 , AWS_HTTP2_ERR_SETTINGS_TIMEOUT = 4 , AWS_HTTP2_ERR_STREAM_CLOSED = 5 , AWS_HTTP2_ERR_FRAME_SIZE_ERROR = 6 , AWS_HTTP2_ERR_REFUSED_STREAM = 7 , AWS_HTTP2_ERR_CANCEL = 8 , AWS_HTTP2_ERR_COMPRESSION_ERROR = 9 , AWS_HTTP2_ERR_CONNECT_ERROR = 10 , AWS_HTTP2_ERR_ENHANCE_YOUR_CALM = 11 , AWS_HTTP2_ERR_INADEQUATE_SECURITY = 12 , AWS_HTTP2_ERR_HTTP_1_1_REQUIRED = 13 , AWS_HTTP2_ERR_COUNT = 14 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_log_subject { AWS_LS_HTTP_GENERAL = 2048 , AWS_LS_HTTP_CONNECTION = 2049 , AWS_LS_HTTP_ENCODER = 2050 , AWS_LS_HTTP_DECODER = 2051 , AWS_LS_HTTP_SERVER = 2052 , AWS_LS_HTTP_STREAM = 2053 , AWS_LS_HTTP_CONNECTION_MANAGER = 2054 , AWS_LS_HTTP_STREAM_MANAGER = 2055 , AWS_LS_HTTP_WEBSOCKET = 2056 , AWS_LS_HTTP_WEBSOCKET_SETUP = 2057 , AWS_LS_HTTP_PROXY_NEGOTIATION = 2058 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_version { AWS_HTTP_VERSION_UNKNOWN = 0 , AWS_HTTP_VERSION_1_0 = 1 , AWS_HTTP_VERSION_1_1 = 2 , AWS_HTTP_VERSION_2 = 3 , AWS_HTTP_VERSION_COUNT = 4 , } unsafe extern "C" { # [doc = " Initializes internal datastructures used by aws-c-http.\n Must be called before using any functionality in aws-c-http."] pub fn aws_http_library_init (alloc : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Clean up internal datastructures used by aws-c-http.\n Must not be called until application is done using functionality in aws-c-http."] pub fn aws_http_library_clean_up () ; } unsafe extern "C" { pub fn aws_http_error_code_is_retryable (error_code : :: libc :: c_int) -> bool ; } unsafe extern "C" { # [doc = " Returns the description of common status codes.\n Ex: 404 -> \"Not Found\"\n An empty string is returned if the status code is not recognized."] pub fn aws_http_status_text (status_code : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { # [doc = " Shortcuts for common HTTP request methods"] pub static aws_http_method_get : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_head : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_post : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_put : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_delete : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_connect : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_options : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_method : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_scheme : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_authority : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_path : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_status : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_scheme_http : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_scheme_https : aws_byte_cursor ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_impl { _unused : [u8 ; 0] , } # [doc = " Completion callback for aws_future<T>"] pub type aws_future_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; pub type aws_future_impl_result_clean_up_fn = :: std :: option :: Option < unsafe extern "C" fn (result_addr : * mut :: libc :: c_void) > ; pub type aws_future_impl_result_destroy_fn = :: std :: option :: Option < unsafe extern "C" fn (result : * mut :: libc :: c_void) > ; pub type aws_future_impl_result_release_fn = :: std :: option :: Option < unsafe extern "C" fn (result : * mut :: libc :: c_void) -> * mut :: libc :: c_void > ; unsafe extern "C" { pub fn aws_future_impl_new_by_value (alloc : * mut aws_allocator , sizeof_result : usize) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_new_by_value_with_clean_up (alloc : * mut aws_allocator , sizeof_result : usize , result_clean_up : aws_future_impl_result_clean_up_fn) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_new_pointer (alloc : * mut aws_allocator) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_new_pointer_with_destroy (alloc : * mut aws_allocator , result_destroy : aws_future_impl_result_destroy_fn) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_new_pointer_with_release (alloc : * mut aws_allocator , result_release : aws_future_impl_result_release_fn) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_release (promise : * mut aws_future_impl) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_acquire (promise : * mut aws_future_impl) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_set_error (promise : * mut aws_future_impl , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_future_impl_set_result_by_move (promise : * mut aws_future_impl , src_address : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_impl_is_done (future : * const aws_future_impl) -> bool ; } unsafe extern "C" { pub fn aws_future_impl_register_callback (future : * mut aws_future_impl , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_impl_register_callback_if_not_done (future : * mut aws_future_impl , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { pub fn aws_future_impl_register_event_loop_callback (future : * mut aws_future_impl , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_impl_register_channel_callback (future : * mut aws_future_impl , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_impl_wait (future : * const aws_future_impl , timeout_ns : u64) -> bool ; } unsafe extern "C" { pub fn aws_future_impl_get_error (future : * const aws_future_impl) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_future_impl_get_result_address (future : * const aws_future_impl) -> * mut :: libc :: c_void ; } unsafe extern "C" { pub fn aws_future_impl_get_result_by_move (future : * mut aws_future_impl , dst_address : * mut :: libc :: c_void) ; } # [doc = " aws_future<size_t>\n See top of future.h for docs."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_size { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_new (alloc : * mut aws_allocator) -> * mut aws_future_size ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_set_result (future : * mut aws_future_size , result : usize) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_get_result (future : * const aws_future_size) -> usize ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_acquire (future : * mut aws_future_size) -> * mut aws_future_size ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_release (future : * mut aws_future_size) -> * mut aws_future_size ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_set_error (future : * mut aws_future_size , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_is_done (future : * const aws_future_size) -> bool ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_get_error (future : * const aws_future_size) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_register_callback (future : * mut aws_future_size , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_register_callback_if_not_done (future : * mut aws_future_size , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_register_event_loop_callback (future : * mut aws_future_size , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_register_channel_callback (future : * mut aws_future_size , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_wait (future : * mut aws_future_size , timeout_ns : u64) -> bool ; } # [doc = " aws_future<bool>\n See top of future.h for docs."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_bool { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_new (alloc : * mut aws_allocator) -> * mut aws_future_bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_set_result (future : * mut aws_future_bool , result : bool) ; } unsafe extern "C" { # [doc = " `aws_future<bool>`\n See top of future.h for docs."] pub fn aws_future_bool_get_result (future : * const aws_future_bool) -> bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_acquire (future : * mut aws_future_bool) -> * mut aws_future_bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_release (future : * mut aws_future_bool) -> * mut aws_future_bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_set_error (future : * mut aws_future_bool , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_is_done (future : * const aws_future_bool) -> bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_get_error (future : * const aws_future_bool) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_register_callback (future : * mut aws_future_bool , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_register_callback_if_not_done (future : * mut aws_future_bool , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_register_event_loop_callback (future : * mut aws_future_bool , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_register_channel_callback (future : * mut aws_future_bool , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_wait (future : * mut aws_future_bool , timeout_ns : u64) -> bool ; } # [doc = " aws_future<void>\n See top of future.h for docs."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_void { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<void>\n See top of future.h for docs."] pub fn aws_future_void_new (alloc : * mut aws_allocator) -> * mut aws_future_void ; } unsafe extern "C" { pub fn aws_future_void_set_result (future : * mut aws_future_void) ; } unsafe extern "C" { pub fn aws_future_void_acquire (future : * mut aws_future_void) -> * mut aws_future_void ; } unsafe extern "C" { pub fn aws_future_void_release (future : * mut aws_future_void) -> * mut aws_future_void ; } unsafe extern "C" { pub fn aws_future_void_set_error (future : * mut aws_future_void , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_future_void_is_done (future : * const aws_future_void) -> bool ; } unsafe extern "C" { pub fn aws_future_void_get_error (future : * const aws_future_void) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_future_void_register_callback (future : * mut aws_future_void , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_void_register_callback_if_not_done (future : * mut aws_future_void , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { pub fn aws_future_void_register_event_loop_callback (future : * mut aws_future_void , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_void_register_channel_callback (future : * mut aws_future_void , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_void_wait (future : * mut aws_future_void , timeout_ns : u64) -> bool ; } # [doc = " An HTTP connection.\n This type is used by both server-side and client-side connections.\n This type is also used by all supported versions of HTTP."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_connection { _unused : [u8 ; 0] , } # [doc = " A stream exists for the duration of a request/response exchange.\n A client creates a stream to send a request and receive a response.\n A server creates a stream to receive a request and send a response.\n In http/2, a push-promise stream can be sent by a server and received by a client."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_stream { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [doc = " Controls whether a header's strings may be compressed by encoding the index of\n strings in a cache, rather than encoding the literal string.\n\n This setting has no effect on HTTP/1.x connections.\n On HTTP/2 connections this controls HPACK behavior.\n See RFC-7541 Section 7.1 for security considerations."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_header_compression { # [doc = " Compress header by encoding the cached index of its strings,\n or by updating the cache to contain these strings for future reference.\n Best for headers that are sent repeatedly.\n This is the default setting."] AWS_HTTP_HEADER_COMPRESSION_USE_CACHE = 0 , # [doc = " Encode header strings literally.\n If an intermediary re-broadcasts the headers, it is permitted to use cache.\n Best for unique headers that are unlikely to repeat."] AWS_HTTP_HEADER_COMPRESSION_NO_CACHE = 1 , # [doc = " Encode header strings literally and forbid all intermediaries from using\n cache when re-broadcasting.\n Best for header fields that are highly valuable or sensitive to recovery."] AWS_HTTP_HEADER_COMPRESSION_NO_FORWARD_CACHE = 2 , } # [doc = " A lightweight HTTP header struct.\n Note that the underlying strings are not owned by the byte cursors."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_header { pub name : aws_byte_cursor , pub value : aws_byte_cursor , pub compression : aws_http_header_compression , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_header"] [:: std :: mem :: size_of :: < aws_http_header > () - 40usize] ; ["Alignment of aws_http_header"] [:: std :: mem :: align_of :: < aws_http_header > () - 8usize] ; ["Offset of field: aws_http_header::name"] [:: std :: mem :: offset_of ! (aws_http_header , name) - 0usize] ; ["Offset of field: aws_http_header::value"] [:: std :: mem :: offset_of ! (aws_http_header , value) - 16usize] ; ["Offset of field: aws_http_header::compression"] [:: std :: mem :: offset_of ! (aws_http_header , compression) - 32usize] ; } ; impl Default for aws_http_header { 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 = " A transformable block of HTTP headers.\n Provides a nice API for getting/setting header names and values.\n\n All strings are copied and stored within this datastructure.\n The index of a given header may change any time headers are modified.\n When iterating headers, the following ordering rules apply:\n\n - Headers with the same name will always be in the same order, relative to one another.\n   If \"A: one\" is added before \"A: two\", then \"A: one\" will always precede \"A: two\".\n\n - Headers with different names could be in any order, relative to one another.\n   If \"A: one\" is seen before \"B: bee\" in one iteration, you might see \"B: bee\" before \"A: one\" on the next."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_headers { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [doc = " Header block type.\n INFORMATIONAL: Header block for 1xx informational (interim) responses.\n MAIN: Main header block sent with request or response.\n TRAILING: Headers sent after the body of a request or response."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_header_block { AWS_HTTP_HEADER_BLOCK_MAIN = 0 , AWS_HTTP_HEADER_BLOCK_INFORMATIONAL = 1 , AWS_HTTP_HEADER_BLOCK_TRAILING = 2 , } # [doc = " The definition for an outgoing HTTP request or response.\n The message may be transformed (ex: signing the request) before its data is eventually sent.\n\n The message keeps internal copies of its trivial strings (method, path, headers)\n but does NOT take ownership of its body stream.\n\n A language binding would likely present this as an HttpMessage base class with\n HttpRequest and HttpResponse subclasses."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_message { _unused : [u8 ; 0] , } # [doc = " Function to invoke when a message transformation completes.\n This function MUST be invoked or the application will soft-lock.\n `message` and `complete_ctx` must be the same pointers provided to the `aws_http_message_transform_fn`.\n `error_code` should should be AWS_ERROR_SUCCESS if transformation was successful,\n otherwise pass a different AWS_ERROR_X value."] pub type aws_http_message_transform_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (message : * mut aws_http_message , error_code : :: libc :: c_int , complete_ctx : * mut :: libc :: c_void) > ; # [doc = " A function that may modify a request or response before it is sent.\n The transformation may be asynchronous or immediate.\n The user MUST invoke the `complete_fn` when transformation is complete or the application will soft-lock.\n When invoking the `complete_fn`, pass along the `message` and `complete_ctx` provided here and an error code.\n The error code should be AWS_ERROR_SUCCESS if transformation was successful,\n otherwise pass a different AWS_ERROR_X value."] pub type aws_http_message_transform_fn = :: std :: option :: Option < unsafe extern "C" fn (message : * mut aws_http_message , user_data : * mut :: libc :: c_void , complete_fn : aws_http_message_transform_complete_fn , complete_ctx : * mut :: libc :: c_void) > ; # [doc = " Invoked repeatedly times as headers are received.\n At this point, aws_http_stream_get_incoming_response_status() can be called for the client.\n And aws_http_stream_get_incoming_request_method() and aws_http_stream_get_incoming_request_uri() can be called for\n the server.\n This is always invoked on the HTTP connection's event-loop thread.\n\n Return AWS_OP_SUCCESS to continue processing the stream.\n Return aws_raise_error(E) to indicate failure and cancel the stream.\n The error you raise will be reflected in the error_code passed to the on_complete callback."] pub type aws_http_on_incoming_headers_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , header_block : aws_http_header_block , header_array : * const aws_http_header , num_headers : usize , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked when the incoming header block of this type(informational/main/trailing) has been completely read.\n This is always invoked on the HTTP connection's event-loop thread.\n\n Return AWS_OP_SUCCESS to continue processing the stream.\n Return aws_raise_error(E) to indicate failure and cancel the stream.\n The error you raise will be reflected in the error_code passed to the on_complete callback."] pub type aws_http_on_incoming_header_block_done_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , header_block : aws_http_header_block , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Called repeatedly as body data is received.\n The data must be copied immediately if you wish to preserve it.\n This is always invoked on the HTTP connection's event-loop thread.\n\n Note that, if the connection is using manual_window_management then the window\n size has shrunk by the amount of body data received. If the window size\n reaches 0 no further data will be received. Increment the window size with\n aws_http_stream_update_window().\n\n Return AWS_OP_SUCCESS to continue processing the stream.\n Return aws_raise_error(E) to indicate failure and cancel the stream.\n The error you raise will be reflected in the error_code passed to the on_complete callback."] pub type aws_http_on_incoming_body_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , data : * const aws_byte_cursor , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked when request has been completely read.\n This is always invoked on the HTTP connection's event-loop thread.\n\n Return AWS_OP_SUCCESS to continue processing the stream.\n Return aws_raise_error(E) to indicate failure and cancel the stream.\n The error you raise will be reflected in the error_code passed to the on_complete callback."] pub type aws_http_on_incoming_request_done_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked when a request/response stream is complete, whether successful or unsuccessful\n This is always invoked on the HTTP connection's event-loop thread.\n This will not be invoked if the stream is never activated."] pub type aws_http_on_stream_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when request/response stream destroy completely.\n This can be invoked within the same thead who release the refcount on http stream.\n This is invoked even if the stream is never activated."] pub type aws_http_on_stream_destroy_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " Tracing metrics for aws_http_stream.\n Data maybe not be available if the data of stream was never sent/received before it completes."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_stream_metrics { pub send_start_timestamp_ns : i64 , pub send_end_timestamp_ns : i64 , pub sending_duration_ns : i64 , pub receive_start_timestamp_ns : i64 , pub receive_end_timestamp_ns : i64 , pub receiving_duration_ns : i64 , pub stream_id : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_stream_metrics"] [:: std :: mem :: size_of :: < aws_http_stream_metrics > () - 56usize] ; ["Alignment of aws_http_stream_metrics"] [:: std :: mem :: align_of :: < aws_http_stream_metrics > () - 8usize] ; ["Offset of field: aws_http_stream_metrics::send_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , send_start_timestamp_ns) - 0usize] ; ["Offset of field: aws_http_stream_metrics::send_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , send_end_timestamp_ns) - 8usize] ; ["Offset of field: aws_http_stream_metrics::sending_duration_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , sending_duration_ns) - 16usize] ; ["Offset of field: aws_http_stream_metrics::receive_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , receive_start_timestamp_ns) - 24usize] ; ["Offset of field: aws_http_stream_metrics::receive_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , receive_end_timestamp_ns) - 32usize] ; ["Offset of field: aws_http_stream_metrics::receiving_duration_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , receiving_duration_ns) - 40usize] ; ["Offset of field: aws_http_stream_metrics::stream_id"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , stream_id) - 48usize] ; } ; # [doc = " Invoked right before request/response stream is complete to report the tracing metrics for aws_http_stream.\n This may be invoked synchronously when aws_http_stream_release() is called.\n This is invoked even if the stream is never activated.\n See `aws_http_stream_metrics` for details."] pub type aws_http_on_stream_metrics_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , metrics : * const aws_http_stream_metrics , user_data : * mut :: libc :: c_void) > ; # [doc = " Options for creating a stream which sends a request from the client and receives a response from the server."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_make_request_options { # [doc = " The sizeof() this struct, used for versioning.\n Required."] pub self_size : usize , # [doc = " Definition for outgoing request.\n Required.\n The request will be kept alive via refcounting until the request completes."] pub request : * mut aws_http_message , pub user_data : * mut :: libc :: c_void , # [doc = " Invoked repeatedly times as headers are received.\n Optional.\n See `aws_http_on_incoming_headers_fn`."] pub on_response_headers : aws_http_on_incoming_headers_fn , # [doc = " Invoked when response header block has been completely read.\n Optional.\n See `aws_http_on_incoming_header_block_done_fn`."] pub on_response_header_block_done : aws_http_on_incoming_header_block_done_fn , # [doc = " Invoked repeatedly as body data is received.\n Optional.\n See `aws_http_on_incoming_body_fn`."] pub on_response_body : aws_http_on_incoming_body_fn , # [doc = " Invoked right before stream is complete, whether successful or unsuccessful\n Optional.\n See `aws_http_on_stream_metrics_fn`"] pub on_metrics : aws_http_on_stream_metrics_fn , # [doc = " Invoked when request/response stream is complete, whether successful or unsuccessful\n Optional.\n See `aws_http_on_stream_complete_fn`."] pub on_complete : aws_http_on_stream_complete_fn , pub on_destroy : aws_http_on_stream_destroy_fn , # [doc = " When using HTTP/2, request body data will be provided over time. The stream will only be polled for writing\n when data has been supplied via `aws_http2_stream_write_data`"] pub http2_use_manual_data_writes : bool , # [doc = " Optional (ignored if 0).\n After a request is fully sent, if the server does not begin responding within N milliseconds, then fail with\n AWS_ERROR_HTTP_RESPONSE_FIRST_BYTE_TIMEOUT.\n It override the connection level settings, when the request completes, the\n original monitoring options will be applied back to the connection.\n TODO: Only supported in HTTP/1.1 now, support it in HTTP/2"] pub response_first_byte_timeout_ms : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_make_request_options"] [:: std :: mem :: size_of :: < aws_http_make_request_options > () - 88usize] ; ["Alignment of aws_http_make_request_options"] [:: std :: mem :: align_of :: < aws_http_make_request_options > () - 8usize] ; ["Offset of field: aws_http_make_request_options::self_size"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , self_size) - 0usize] ; ["Offset of field: aws_http_make_request_options::request"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , request) - 8usize] ; ["Offset of field: aws_http_make_request_options::user_data"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , user_data) - 16usize] ; ["Offset of field: aws_http_make_request_options::on_response_headers"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_response_headers) - 24usize] ; ["Offset of field: aws_http_make_request_options::on_response_header_block_done"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_response_header_block_done) - 32usize] ; ["Offset of field: aws_http_make_request_options::on_response_body"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_response_body) - 40usize] ; ["Offset of field: aws_http_make_request_options::on_metrics"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_metrics) - 48usize] ; ["Offset of field: aws_http_make_request_options::on_complete"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_complete) - 56usize] ; ["Offset of field: aws_http_make_request_options::on_destroy"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_destroy) - 64usize] ; ["Offset of field: aws_http_make_request_options::http2_use_manual_data_writes"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , http2_use_manual_data_writes) - 72usize] ; ["Offset of field: aws_http_make_request_options::response_first_byte_timeout_ms"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , response_first_byte_timeout_ms) - 80usize] ; } ; impl Default for aws_http_make_request_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)] pub struct aws_http_request_handler_options { pub self_size : usize , # [doc = " Required."] pub server_connection : * mut aws_http_connection , # [doc = " user_data passed to callbacks.\n Optional."] pub user_data : * mut :: libc :: c_void , # [doc = " Invoked repeatedly times as headers are received.\n Optional.\n See `aws_http_on_incoming_headers_fn`."] pub on_request_headers : aws_http_on_incoming_headers_fn , # [doc = " Invoked when the request header block has been completely read.\n Optional.\n See `aws_http_on_incoming_header_block_done_fn`."] pub on_request_header_block_done : aws_http_on_incoming_header_block_done_fn , # [doc = " Invoked as body data is received.\n Optional.\n See `aws_http_on_incoming_body_fn`."] pub on_request_body : aws_http_on_incoming_body_fn , # [doc = " Invoked when request has been completely read.\n Optional.\n See `aws_http_on_incoming_request_done_fn`."] pub on_request_done : aws_http_on_incoming_request_done_fn , # [doc = " Invoked when request/response stream is complete, whether successful or unsuccessful\n Optional.\n See `aws_http_on_stream_complete_fn`."] pub on_complete : aws_http_on_stream_complete_fn , pub on_destroy : aws_http_on_stream_destroy_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_request_handler_options"] [:: std :: mem :: size_of :: < aws_http_request_handler_options > () - 72usize] ; ["Alignment of aws_http_request_handler_options"] [:: std :: mem :: align_of :: < aws_http_request_handler_options > () - 8usize] ; ["Offset of field: aws_http_request_handler_options::self_size"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , self_size) - 0usize] ; ["Offset of field: aws_http_request_handler_options::server_connection"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , server_connection) - 8usize] ; ["Offset of field: aws_http_request_handler_options::user_data"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , user_data) - 16usize] ; ["Offset of field: aws_http_request_handler_options::on_request_headers"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_request_headers) - 24usize] ; ["Offset of field: aws_http_request_handler_options::on_request_header_block_done"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_request_header_block_done) - 32usize] ; ["Offset of field: aws_http_request_handler_options::on_request_body"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_request_body) - 40usize] ; ["Offset of field: aws_http_request_handler_options::on_request_done"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_request_done) - 48usize] ; ["Offset of field: aws_http_request_handler_options::on_complete"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_complete) - 56usize] ; ["Offset of field: aws_http_request_handler_options::on_destroy"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_destroy) - 64usize] ; } ; impl Default for aws_http_request_handler_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 () } } } # [doc = " Invoked when the data stream of an outgoing HTTP write operation is no longer in use.\n This is always invoked on the HTTP connection's event-loop thread.\n\n @param stream        HTTP-stream this write operation was submitted to.\n @param error_code    If error_code is AWS_ERROR_SUCCESS (0), the data was successfully sent.\n                      Any other error_code indicates that the HTTP-stream is in the process of terminating.\n                      If the error_code is AWS_ERROR_HTTP_STREAM_HAS_COMPLETED,\n                      the stream's termination has nothing to do with this write operation.\n                      Any other non-zero error code indicates a problem with this particular write\n                      operation's data.\n @param user_data     User data for this write operation."] pub type aws_http_stream_write_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when the data of an outgoing HTTP/1.1 chunk is no longer in use.\n This is always invoked on the HTTP connection's event-loop thread.\n\n @param stream        HTTP-stream this chunk was submitted to.\n @param error_code    If error_code is AWS_ERROR_SUCCESS (0), the data was successfully sent.\n                      Any other error_code indicates that the HTTP-stream is in the process of terminating.\n                      If the error_code is AWS_ERROR_HTTP_STREAM_HAS_COMPLETED,\n                      the stream's termination has nothing to do with this chunk.\n                      Any other non-zero error code indicates a problem with this particular chunk's data.\n @param user_data     User data for this chunk."] pub type aws_http1_stream_write_chunk_complete_fn = aws_http_stream_write_complete_fn ; # [doc = " HTTP/1.1 chunk extension for chunked encoding.\n Note that the underlying strings are not owned by the byte cursors."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http1_chunk_extension { pub key : aws_byte_cursor , pub value : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http1_chunk_extension"] [:: std :: mem :: size_of :: < aws_http1_chunk_extension > () - 32usize] ; ["Alignment of aws_http1_chunk_extension"] [:: std :: mem :: align_of :: < aws_http1_chunk_extension > () - 8usize] ; ["Offset of field: aws_http1_chunk_extension::key"] [:: std :: mem :: offset_of ! (aws_http1_chunk_extension , key) - 0usize] ; ["Offset of field: aws_http1_chunk_extension::value"] [:: std :: mem :: offset_of ! (aws_http1_chunk_extension , value) - 16usize] ; } ; impl Default for aws_http1_chunk_extension { 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 = " Encoding options for an HTTP/1.1 chunked transfer encoding chunk."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http1_chunk_options { pub chunk_data : * mut aws_input_stream , pub chunk_data_size : u64 , # [doc = " A pointer to an array of chunked extensions.\n The num_extensions must match the length of the array.\n This data is deep-copied by aws_http1_stream_write_chunk(),\n it does not need to remain valid until on_complete is invoked."] pub extensions : * mut aws_http1_chunk_extension , # [doc = " The number of elements defined in the extensions array."] pub num_extensions : usize , # [doc = " Invoked when the chunk data is no longer in use, whether or not it was successfully sent.\n Optional.\n See `aws_http1_stream_write_chunk_complete_fn`."] pub on_complete : aws_http1_stream_write_chunk_complete_fn , # [doc = " User provided data passed to the on_complete callback on its invocation."] pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http1_chunk_options"] [:: std :: mem :: size_of :: < aws_http1_chunk_options > () - 48usize] ; ["Alignment of aws_http1_chunk_options"] [:: std :: mem :: align_of :: < aws_http1_chunk_options > () - 8usize] ; ["Offset of field: aws_http1_chunk_options::chunk_data"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , chunk_data) - 0usize] ; ["Offset of field: aws_http1_chunk_options::chunk_data_size"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , chunk_data_size) - 8usize] ; ["Offset of field: aws_http1_chunk_options::extensions"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , extensions) - 16usize] ; ["Offset of field: aws_http1_chunk_options::num_extensions"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , num_extensions) - 24usize] ; ["Offset of field: aws_http1_chunk_options::on_complete"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , on_complete) - 32usize] ; ["Offset of field: aws_http1_chunk_options::user_data"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , user_data) - 40usize] ; } ; impl Default for aws_http1_chunk_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 () } } } # [doc = " Invoked when the data of an outgoing HTTP2 data frame is no longer in use.\n This is always invoked on the HTTP connection's event-loop thread.\n\n @param stream        HTTP2-stream this write was submitted to.\n @param error_code    If error_code is AWS_ERROR_SUCCESS (0), the data was successfully sent.\n                      Any other error_code indicates that the HTTP-stream is in the process of terminating.\n                      If the error_code is AWS_ERROR_HTTP_STREAM_HAS_COMPLETED,\n                      the stream's termination has nothing to do with this write.\n                      Any other non-zero error code indicates a problem with this particular write's data.\n @param user_data     User data for this write."] pub type aws_http2_stream_write_data_complete_fn = aws_http_stream_write_complete_fn ; # [doc = " Encoding options for manual H2 data frame writes"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http2_stream_write_data_options { # [doc = " The data to be sent.\n Optional.\n If not set, input stream with length 0 will be used."] pub data : * mut aws_input_stream , # [doc = " Set true when it's the last chunk to be sent.\n After a write with end_stream, no more data write will be accepted."] pub end_stream : bool , # [doc = " Invoked when the data stream is no longer in use, whether or not it was successfully sent.\n Optional.\n See `aws_http2_stream_write_data_complete_fn`."] pub on_complete : aws_http2_stream_write_data_complete_fn , # [doc = " User provided data passed to the on_complete callback on its invocation."] pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http2_stream_write_data_options"] [:: std :: mem :: size_of :: < aws_http2_stream_write_data_options > () - 32usize] ; ["Alignment of aws_http2_stream_write_data_options"] [:: std :: mem :: align_of :: < aws_http2_stream_write_data_options > () - 8usize] ; ["Offset of field: aws_http2_stream_write_data_options::data"] [:: std :: mem :: offset_of ! (aws_http2_stream_write_data_options , data) - 0usize] ; ["Offset of field: aws_http2_stream_write_data_options::end_stream"] [:: std :: mem :: offset_of ! (aws_http2_stream_write_data_options , end_stream) - 8usize] ; ["Offset of field: aws_http2_stream_write_data_options::on_complete"] [:: std :: mem :: offset_of ! (aws_http2_stream_write_data_options , on_complete) - 16usize] ; ["Offset of field: aws_http2_stream_write_data_options::user_data"] [:: std :: mem :: offset_of ! (aws_http2_stream_write_data_options , user_data) - 24usize] ; } ; impl Default for aws_http2_stream_write_data_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 () } } } unsafe extern "C" { # [doc = " Return whether both names are equivalent.\n This is a case-insensitive string comparison.\n\n Example Matches:\n \"Content-Length\" == \"content-length\" // upper or lower case ok\n\n Example Mismatches:\n \"Content-Length\" != \" Content-Length\" // leading whitespace bad"] pub fn aws_http_header_name_eq (name_a : aws_byte_cursor , name_b : aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " Create a new headers object.\n The caller has a hold on the object and must call aws_http_headers_release() when they are done with it."] pub fn aws_http_headers_new (allocator : * mut aws_allocator) -> * mut aws_http_headers ; } unsafe extern "C" { # [doc = " Acquire a hold on the object, preventing it from being deleted until\n aws_http_headers_release() is called by all those with a hold on it."] pub fn aws_http_headers_acquire (headers : * mut aws_http_headers) ; } unsafe extern "C" { # [doc = " Release a hold on the object.\n The object is deleted when all holds on it are released."] pub fn aws_http_headers_release (headers : * mut aws_http_headers) ; } unsafe extern "C" { # [doc = " Add a header.\n The underlying strings are copied."] pub fn aws_http_headers_add_header (headers : * mut aws_http_headers , header : * const aws_http_header) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add a header.\n The underlying strings are copied."] pub fn aws_http_headers_add (headers : * mut aws_http_headers , name : aws_byte_cursor , value : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add an array of headers.\n The underlying strings are copied."] pub fn aws_http_headers_add_array (headers : * mut aws_http_headers , array : * const aws_http_header , count : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set a header value.\n The header is added if necessary and any existing values for this name are removed.\n The underlying strings are copied."] pub fn aws_http_headers_set (headers : * mut aws_http_headers , name : aws_byte_cursor , value : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the total number of headers."] pub fn aws_http_headers_count (headers : * const aws_http_headers) -> usize ; } unsafe extern "C" { # [doc = " Get the header at the specified index.\n The index of a given header may change any time headers are modified.\n When iterating headers, the following ordering rules apply:\n\n - Headers with the same name will always be in the same order, relative to one another.\n   If \"A: one\" is added before \"A: two\", then \"A: one\" will always precede \"A: two\".\n\n - Headers with different names could be in any order, relative to one another.\n   If \"A: one\" is seen before \"B: bee\" in one iteration, you might see \"B: bee\" before \"A: one\" on the next.\n\n AWS_ERROR_INVALID_INDEX is raised if the index is invalid."] pub fn aws_http_headers_get_index (headers : * const aws_http_headers , index : usize , out_header : * mut aws_http_header) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get all values with this name, combined into one new aws_string that you are responsible for destroying.\n If there are multiple headers with this name, their values are appended with comma-separators.\n If there are no headers with this name, NULL is returned and AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised."] pub fn aws_http_headers_get_all (headers : * const aws_http_headers , name : aws_byte_cursor) -> * mut aws_string ; } unsafe extern "C" { # [doc = " Get the first value for this name, ignoring any additional values.\n AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised if the name is not found."] pub fn aws_http_headers_get (headers : * const aws_http_headers , name : aws_byte_cursor , out_value : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Test if header name exists or not in headers"] pub fn aws_http_headers_has (headers : * const aws_http_headers , name : aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " Remove all headers with this name.\n AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised if no headers with this name are found."] pub fn aws_http_headers_erase (headers : * mut aws_http_headers , name : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Remove the first header found with this name and value.\n AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised if no such header is found."] pub fn aws_http_headers_erase_value (headers : * mut aws_http_headers , name : aws_byte_cursor , value : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Remove the header at the specified index.\n\n AWS_ERROR_INVALID_INDEX is raised if the index is invalid."] pub fn aws_http_headers_erase_index (headers : * mut aws_http_headers , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Clear all headers."] pub fn aws_http_headers_clear (headers : * mut aws_http_headers) ; } unsafe extern "C" { # [doc = " Get the `:method` value (HTTP/2 headers only)."] pub fn aws_http2_headers_get_request_method (h2_headers : * const aws_http_headers , out_method : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:method` (HTTP/2 headers only).\n The headers makes its own copy of the underlying string."] pub fn aws_http2_headers_set_request_method (h2_headers : * mut aws_http_headers , method : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http2_headers_get_request_scheme (h2_headers : * const aws_http_headers , out_scheme : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:scheme` (request pseudo headers only).\n The pseudo headers makes its own copy of the underlying string."] pub fn aws_http2_headers_set_request_scheme (h2_headers : * mut aws_http_headers , scheme : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http2_headers_get_request_authority (h2_headers : * const aws_http_headers , out_authority : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:authority` (request pseudo headers only).\n The pseudo headers makes its own copy of the underlying string."] pub fn aws_http2_headers_set_request_authority (h2_headers : * mut aws_http_headers , authority : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http2_headers_get_request_path (h2_headers : * const aws_http_headers , out_path : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:path` (request pseudo headers only).\n The pseudo headers makes its own copy of the underlying string."] pub fn aws_http2_headers_set_request_path (h2_headers : * mut aws_http_headers , path : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get `:status` (response pseudo headers only).\n If no status is set, AWS_ERROR_HTTP_DATA_NOT_AVAILABLE is raised."] pub fn aws_http2_headers_get_response_status (h2_headers : * const aws_http_headers , out_status_code : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:status` (response pseudo headers only)."] pub fn aws_http2_headers_set_response_status (h2_headers : * mut aws_http_headers , status_code : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Create a new HTTP/1.1 request message.\n The message is blank, all properties (method, path, etc) must be set individually.\n If HTTP/1.1 message used in HTTP/2 connection, the transformation will be automatically applied.\n A HTTP/2 message will created and sent based on the HTTP/1.1 message.\n\n The caller has a hold on the object and must call aws_http_message_release() when they are done with it."] pub fn aws_http_message_new_request (allocator : * mut aws_allocator) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Like aws_http_message_new_request(), but uses existing aws_http_headers instead of creating a new one.\n Acquires a hold on the headers, and releases it when the request is destroyed."] pub fn aws_http_message_new_request_with_headers (allocator : * mut aws_allocator , existing_headers : * mut aws_http_headers) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Create a new HTTP/1.1 response message.\n The message is blank, all properties (status, headers, etc) must be set individually.\n\n The caller has a hold on the object and must call aws_http_message_release() when they are done with it."] pub fn aws_http_message_new_response (allocator : * mut aws_allocator) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Create a new HTTP/2 request message.\n pseudo headers need to be set from aws_http2_headers_set_request_* to the headers of the aws_http_message.\n Will be errored out if used in HTTP/1.1 connection.\n\n The caller has a hold on the object and must call aws_http_message_release() when they are done with it."] pub fn aws_http2_message_new_request (allocator : * mut aws_allocator) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Create a new HTTP/2 response message.\n pseudo headers need to be set from aws_http2_headers_set_response_status to the headers of the aws_http_message.\n Will be errored out if used in HTTP/1.1 connection.\n\n The caller has a hold on the object and must call aws_http_message_release() when they are done with it."] pub fn aws_http2_message_new_response (allocator : * mut aws_allocator) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Create an HTTP/2 message from HTTP/1.1 message.\n pseudo headers will be created from the context and added to the headers of new message.\n Normal headers will be copied to the headers of new message.\n Note:\n  - if `host` exist, it will be removed and `:authority` will be added using the information.\n  - `:scheme` always defaults to \"https\". To use a different scheme create the HTTP/2 message directly"] pub fn aws_http2_message_new_from_http1 (alloc : * mut aws_allocator , http1_msg : * const aws_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Acquire a hold on the object, preventing it from being deleted until\n aws_http_message_release() is called by all those with a hold on it.\n\n This function returns the passed in message (possibly NULL) so that acquire-and-assign can be done with a single\n statement."] pub fn aws_http_message_acquire (message : * mut aws_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Release a hold on the object.\n The object is deleted when all holds on it are released.\n\n This function always returns NULL so that release-and-assign-NULL can be done with a single statement."] pub fn aws_http_message_release (message : * mut aws_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Deprecated. This is equivalent to aws_http_message_release()."] pub fn aws_http_message_destroy (message : * mut aws_http_message) ; } unsafe extern "C" { pub fn aws_http_message_is_request (message : * const aws_http_message) -> bool ; } unsafe extern "C" { pub fn aws_http_message_is_response (message : * const aws_http_message) -> bool ; } unsafe extern "C" { # [doc = " Get the protocol version of the http message."] pub fn aws_http_message_get_protocol_version (message : * const aws_http_message) -> aws_http_version ; } unsafe extern "C" { # [doc = " Get the method (request messages only)."] pub fn aws_http_message_get_request_method (request_message : * const aws_http_message , out_method : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set the method (request messages only).\n The request makes its own copy of the underlying string."] pub fn aws_http_message_set_request_method (request_message : * mut aws_http_message , method : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http_message_get_request_path (request_message : * const aws_http_message , out_path : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set the path-and-query value (request messages only).\n The request makes its own copy of the underlying string."] pub fn aws_http_message_set_request_path (request_message : * mut aws_http_message , path : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the status code (response messages only).\n If no status is set, AWS_ERROR_HTTP_DATA_NOT_AVAILABLE is raised."] pub fn aws_http_message_get_response_status (response_message : * const aws_http_message , out_status_code : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set the status code (response messages only)."] pub fn aws_http_message_set_response_status (response_message : * mut aws_http_message , status_code : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the body stream.\n Returns NULL if no body stream is set."] pub fn aws_http_message_get_body_stream (message : * const aws_http_message) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Set the body stream.\n NULL is an acceptable value for messages with no body.\n Note: The message does NOT take ownership of the body stream.\n The stream must not be destroyed until the message is complete."] pub fn aws_http_message_set_body_stream (message : * mut aws_http_message , body_stream : * mut aws_input_stream) ; } # [doc = " aws_future<aws_http_message*>"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_http_message { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_new (alloc : * mut aws_allocator) -> * mut aws_future_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_set_result_by_move (future : * mut aws_future_http_message , pointer_address : * mut * mut aws_http_message) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_get_result_by_move (future : * mut aws_future_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_peek_result (future : * const aws_future_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_acquire (future : * mut aws_future_http_message) -> * mut aws_future_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_release (future : * mut aws_future_http_message) -> * mut aws_future_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_set_error (future : * mut aws_future_http_message , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_is_done (future : * const aws_future_http_message) -> bool ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_get_error (future : * const aws_future_http_message) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_register_callback (future : * mut aws_future_http_message , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_register_callback_if_not_done (future : * mut aws_future_http_message , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_register_event_loop_callback (future : * mut aws_future_http_message , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_register_channel_callback (future : * mut aws_future_http_message , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_wait (future : * mut aws_future_http_message , timeout_ns : u64) -> bool ; } unsafe extern "C" { # [doc = " Submit a chunk of data to be sent on an HTTP/1.1 stream.\n The stream must have specified \"chunked\" in a \"transfer-encoding\" header,\n and the aws_http_message must NOT have any body stream set.\n For client streams, activate() must be called before any chunks are submitted.\n For server streams, the response must be submitted before any chunks.\n A final chunk with size 0 must be submitted to successfully complete the HTTP-stream.\n\n Returns AWS_OP_SUCCESS if the chunk has been submitted. The chunk's completion\n callback will be invoked when the HTTP-stream is done with the chunk data,\n whether or not it was successfully sent (see `aws_http1_stream_write_chunk_complete_fn`).\n The chunk data must remain valid until the completion callback is invoked.\n\n Returns AWS_OP_ERR and raises an error if the chunk could not be submitted.\n In this case, the chunk's completion callback will never be invoked.\n Note that it is always possible for the HTTP-stream to terminate unexpectedly\n prior to this call being made, in which case the error raised is\n AWS_ERROR_HTTP_STREAM_HAS_COMPLETED."] pub fn aws_http1_stream_write_chunk (http1_stream : * mut aws_http_stream , options : * const aws_http1_chunk_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " The stream must have specified `http2_use_manual_data_writes` during request creation.\n For client streams, activate() must be called before any frames are submitted.\n For server streams, the response headers must be submitted before any frames.\n A write with options that has end_stream set to be true will end the stream and prevent any further write.\n\n @return AWS_OP_SUCCESS if the write was queued\n         AWS_OP_ERROR indicating the attempt raised an error code.\n              AWS_ERROR_INVALID_STATE will be raised for invalid usage.\n              AWS_ERROR_HTTP_STREAM_HAS_COMPLETED will be raised if the stream ended for reasons behind the scenes.\n\n Typical usage will be something like:\n options.http2_use_manual_data_writes = true;\n stream = aws_http_connection_make_request(connection, &options);\n aws_http_stream_activate(stream);\n ...\n struct aws_http2_stream_write_data_options write;\n aws_http2_stream_write_data(stream, &write);\n ...\n struct aws_http2_stream_write_data_options last_write;\n last_write.end_stream = true;\n aws_http2_stream_write_data(stream, &write);\n ...\n aws_http_stream_release(stream);"] pub fn aws_http2_stream_write_data (http2_stream : * mut aws_http_stream , options : * const aws_http2_stream_write_data_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add a list of headers to be added as trailing headers sent after the last chunk is sent.\n a \"Trailer\" header field which indicates the fields present in the trailer.\n\n Certain headers are forbidden in the trailer (e.g., Transfer-Encoding, Content-Length, Host). See RFC-7541\n Section 4.1.2 for more details.\n\n For client streams, activate() must be called before any chunks are submitted.\n\n For server streams, the response must be submitted before the trailer can be added\n\n aws_http1_stream_add_chunked_trailer must be called before the final size 0 chunk, and at the moment can only\n be called once, though this could change if need be.\n\n Returns AWS_OP_SUCCESS if the chunk has been submitted."] pub fn aws_http1_stream_add_chunked_trailer (http1_stream : * mut aws_http_stream , trailing_headers : * const aws_http_headers) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " This datastructure has more functions for inspecting and modifying headers than\n are available on the aws_http_message datastructure."] pub fn aws_http_message_get_headers (message : * const aws_http_message) -> * mut aws_http_headers ; } unsafe extern "C" { # [doc = " Get the message's const aws_http_headers."] pub fn aws_http_message_get_const_headers (message : * const aws_http_message) -> * const aws_http_headers ; } unsafe extern "C" { # [doc = " Get the number of headers."] pub fn aws_http_message_get_header_count (message : * const aws_http_message) -> usize ; } unsafe extern "C" { # [doc = " Get the header at the specified index.\n This function cannot fail if a valid index is provided.\n Otherwise, AWS_ERROR_INVALID_INDEX will be raised.\n\n The underlying strings are stored within the message."] pub fn aws_http_message_get_header (message : * const aws_http_message , out_header : * mut aws_http_header , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add a header to the end of the array.\n The message makes its own copy of the underlying strings."] pub fn aws_http_message_add_header (message : * mut aws_http_message , header : aws_http_header) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add an array of headers to the end of the header array.\n The message makes its own copy of the underlying strings.\n\n This is a helper function useful when it's easier to define headers as a stack array, rather than calling add_header\n repeatedly."] pub fn aws_http_message_add_header_array (message : * mut aws_http_message , headers : * const aws_http_header , num_headers : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Remove the header at the specified index.\n Headers after this index are all shifted back one position.\n\n This function cannot fail if a valid index is provided.\n Otherwise, AWS_ERROR_INVALID_INDEX will be raised."] pub fn aws_http_message_erase_header (message : * mut aws_http_message , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Create a stream, with a client connection sending a request.\n The request does not start sending automatically once the stream is created. You must call\n aws_http_stream_activate to begin execution of the request.\n\n The `options` are copied during this call.\n\n Tip for language bindings: Do not bind the `options` struct. Use something more natural for your language,\n such as Builder Pattern in Java, or Python's ability to take many optional arguments by name.\n\n Note: The header of the request will be sent as it is when the message to send protocol matches the protocol of the\n connection.\n  - No `user-agent` will be added.\n  - No security check will be enforced. eg: `referer` header privacy should be enforced by the user-agent who adds the\n      header\n  - When HTTP/1 message sent on HTTP/2 connection, `aws_http2_message_new_from_http1` will be applied under the hood.\n  - When HTTP/2 message sent on HTTP/1 connection, no change will be made."] pub fn aws_http_connection_make_request (client_connection : * mut aws_http_connection , options : * const aws_http_make_request_options) -> * mut aws_http_stream ; } unsafe extern "C" { # [doc = " Create a stream, with a server connection receiving and responding to a request.\n This function can only be called from the `aws_http_on_incoming_request_fn` callback.\n aws_http_stream_send_response() should be used to send a response."] pub fn aws_http_stream_new_server_request_handler (options : * const aws_http_request_handler_options) -> * mut aws_http_stream ; } unsafe extern "C" { # [doc = " Acquire refcount on the stream to prevent it from being cleaned up until it is released."] pub fn aws_http_stream_acquire (stream : * mut aws_http_stream) -> * mut aws_http_stream ; } unsafe extern "C" { # [doc = " Users must release the stream when they are done with it, or its memory will never be cleaned up.\n This will not cancel the stream, its callbacks will still fire if the stream is still in progress.\n\n Tips for language bindings:\n - Invoke this from the wrapper class's finalizer/destructor.\n - Do not let the wrapper class be destroyed until on_complete() has fired."] pub fn aws_http_stream_release (stream : * mut aws_http_stream) ; } unsafe extern "C" { # [doc = " Only used for client initiated streams (immediately following a call to aws_http_connection_make_request).\n\n Activates the request's outgoing stream processing."] pub fn aws_http_stream_activate (stream : * mut aws_http_stream) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http_stream_get_connection (stream : * const aws_http_stream) -> * mut aws_http_connection ; } unsafe extern "C" { pub fn aws_http_stream_get_incoming_response_status (stream : * const aws_http_stream , out_status : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http_stream_get_incoming_request_method (stream : * const aws_http_stream , out_method : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http_stream_get_incoming_request_uri (stream : * const aws_http_stream , out_uri : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Send response (only callable from \"request handler\" streams)\n The response object must stay alive at least until the stream's on_complete is called."] pub fn aws_http_stream_send_response (stream : * mut aws_http_stream , response : * mut aws_http_message) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Increment the stream's flow-control window to keep data flowing.\n\n If the connection was created with `manual_window_management` set true,\n the flow-control window of each stream will shrink as body data is received\n (headers, padding, and other metadata do not affect the window).\n The connection's `initial_window_size` determines the starting size of each stream's window.\n If a stream's flow-control window reaches 0, no further data will be received.\n\n If `manual_window_management` is false, this call will have no effect.\n The connection maintains its flow-control windows such that\n no back-pressure is applied and data arrives as fast as possible.\n\n For HTTP/2, the client control exactly when the WINDOW_UPDATE frame sent.\n And client will make sure the WINDOW_UPDATE frame to be valid.\n Check `stream_window_size_threshold_to_send_update` for details."] pub fn aws_http_stream_update_window (stream : * mut aws_http_stream , increment_size : usize) ; } unsafe extern "C" { # [doc = " Gets the HTTP/2 id associated with a stream.  Even h1 streams have an id (using the same allocation procedure\n as http/2) for easier tracking purposes. For client streams, this will only be non-zero after a successful call\n to aws_http_stream_activate()"] pub fn aws_http_stream_get_id (stream : * const aws_http_stream) -> u32 ; } unsafe extern "C" { # [doc = " Cancel the stream in flight.\n For HTTP/1.1 streams, it's equivalent to closing the connection.\n For HTTP/2 streams, it's equivalent to calling reset on the stream with `AWS_HTTP2_ERR_CANCEL`.\n\n the stream will complete with the error code provided, unless the stream is\n already completing for other reasons, or the stream is not activated,\n in which case this call will have no impact."] pub fn aws_http_stream_cancel (stream : * mut aws_http_stream , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " Reset the HTTP/2 stream (HTTP/2 only).\n Note that if the stream closes before this async call is fully processed, the RST_STREAM frame will not be sent.\n\n @param http2_stream HTTP/2 stream.\n @param http2_error aws_http2_error_code. Reason to reset the stream."] pub fn aws_http2_stream_reset (http2_stream : * mut aws_http_stream , http2_error : u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the error code received in rst_stream.\n Only valid if the stream has completed, and an RST_STREAM frame has received.\n\n @param http2_stream HTTP/2 stream.\n @param out_http2_error Gets to set to HTTP/2 error code received in rst_stream."] pub fn aws_http2_stream_get_received_reset_error_code (http2_stream : * mut aws_http_stream , out_http2_error : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the HTTP/2 error code sent in the RST_STREAM frame (HTTP/2 only).\n Only valid if the stream has completed, and has sent an RST_STREAM frame.\n\n @param http2_stream HTTP/2 stream.\n @param out_http2_error Gets to set to HTTP/2 error code sent in rst_stream."] pub fn aws_http2_stream_get_sent_reset_error_code (http2_stream : * mut aws_http_stream , out_http2_error : * mut u32) -> :: libc :: c_int ; } # [repr (i32)] # [non_exhaustive] # [doc = " Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n SPDX-License-Identifier: Apache-2.0."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_status_code { AWS_HTTP_STATUS_CODE_UNKNOWN = - 1 , AWS_HTTP_STATUS_CODE_100_CONTINUE = 100 , AWS_HTTP_STATUS_CODE_101_SWITCHING_PROTOCOLS = 101 , AWS_HTTP_STATUS_CODE_102_PROCESSING = 102 , AWS_HTTP_STATUS_CODE_103_EARLY_HINTS = 103 , AWS_HTTP_STATUS_CODE_200_OK = 200 , AWS_HTTP_STATUS_CODE_201_CREATED = 201 , AWS_HTTP_STATUS_CODE_202_ACCEPTED = 202 , AWS_HTTP_STATUS_CODE_203_NON_AUTHORITATIVE_INFORMATION = 203 , AWS_HTTP_STATUS_CODE_204_NO_CONTENT = 204 , AWS_HTTP_STATUS_CODE_205_RESET_CONTENT = 205 , AWS_HTTP_STATUS_CODE_206_PARTIAL_CONTENT = 206 , AWS_HTTP_STATUS_CODE_207_MULTI_STATUS = 207 , AWS_HTTP_STATUS_CODE_208_ALREADY_REPORTED = 208 , AWS_HTTP_STATUS_CODE_226_IM_USED = 226 , AWS_HTTP_STATUS_CODE_300_MULTIPLE_CHOICES = 300 , AWS_HTTP_STATUS_CODE_301_MOVED_PERMANENTLY = 301 , AWS_HTTP_STATUS_CODE_302_FOUND = 302 , AWS_HTTP_STATUS_CODE_303_SEE_OTHER = 303 , AWS_HTTP_STATUS_CODE_304_NOT_MODIFIED = 304 , AWS_HTTP_STATUS_CODE_305_USE_PROXY = 305 , AWS_HTTP_STATUS_CODE_307_TEMPORARY_REDIRECT = 307 , AWS_HTTP_STATUS_CODE_308_PERMANENT_REDIRECT = 308 , AWS_HTTP_STATUS_CODE_400_BAD_REQUEST = 400 , AWS_HTTP_STATUS_CODE_401_UNAUTHORIZED = 401 , AWS_HTTP_STATUS_CODE_402_PAYMENT_REQUIRED = 402 , AWS_HTTP_STATUS_CODE_403_FORBIDDEN = 403 , AWS_HTTP_STATUS_CODE_404_NOT_FOUND = 404 , AWS_HTTP_STATUS_CODE_405_METHOD_NOT_ALLOWED = 405 , AWS_HTTP_STATUS_CODE_406_NOT_ACCEPTABLE = 406 , AWS_HTTP_STATUS_CODE_407_PROXY_AUTHENTICATION_REQUIRED = 407 , AWS_HTTP_STATUS_CODE_408_REQUEST_TIMEOUT = 408 , AWS_HTTP_STATUS_CODE_409_CONFLICT = 409 , AWS_HTTP_STATUS_CODE_410_GONE = 410 , AWS_HTTP_STATUS_CODE_411_LENGTH_REQUIRED = 411 , AWS_HTTP_STATUS_CODE_412_PRECONDITION_FAILED = 412 , AWS_HTTP_STATUS_CODE_413_REQUEST_ENTITY_TOO_LARGE = 413 , AWS_HTTP_STATUS_CODE_414_REQUEST_URI_TOO_LONG = 414 , AWS_HTTP_STATUS_CODE_415_UNSUPPORTED_MEDIA_TYPE = 415 , AWS_HTTP_STATUS_CODE_416_REQUESTED_RANGE_NOT_SATISFIABLE = 416 , AWS_HTTP_STATUS_CODE_417_EXPECTATION_FAILED = 417 , AWS_HTTP_STATUS_CODE_421_MISDIRECTED_REQUEST = 421 , AWS_HTTP_STATUS_CODE_422_UNPROCESSABLE_ENTITY = 422 , AWS_HTTP_STATUS_CODE_423_LOCKED = 423 , AWS_HTTP_STATUS_CODE_424_FAILED_DEPENDENCY = 424 , AWS_HTTP_STATUS_CODE_425_TOO_EARLY = 425 , AWS_HTTP_STATUS_CODE_426_UPGRADE_REQUIRED = 426 , AWS_HTTP_STATUS_CODE_428_PRECONDITION_REQUIRED = 428 , AWS_HTTP_STATUS_CODE_429_TOO_MANY_REQUESTS = 429 , AWS_HTTP_STATUS_CODE_431_REQUEST_HEADER_FIELDS_TOO_LARGE = 431 , AWS_HTTP_STATUS_CODE_451_UNAVAILABLE_FOR_LEGAL_REASON = 451 , AWS_HTTP_STATUS_CODE_500_INTERNAL_SERVER_ERROR = 500 , AWS_HTTP_STATUS_CODE_501_NOT_IMPLEMENTED = 501 , AWS_HTTP_STATUS_CODE_502_BAD_GATEWAY = 502 , AWS_HTTP_STATUS_CODE_503_SERVICE_UNAVAILABLE = 503 , AWS_HTTP_STATUS_CODE_504_GATEWAY_TIMEOUT = 504 , AWS_HTTP_STATUS_CODE_505_HTTP_VERSION_NOT_SUPPORTED = 505 , AWS_HTTP_STATUS_CODE_506_VARIANT_ALSO_NEGOTIATES = 506 , AWS_HTTP_STATUS_CODE_507_INSUFFICIENT_STORAGE = 507 , AWS_HTTP_STATUS_CODE_508_LOOP_DETECTED = 508 , AWS_HTTP_STATUS_CODE_510_NOT_EXTENDED = 510 , AWS_HTTP_STATUS_CODE_511_NETWORK_AUTHENTICATION_REQUIRED = 511 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_proxy_config { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [doc = " @Deprecated - Supported proxy authentication modes.  Superceded by proxy strategy."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_proxy_authentication_type { AWS_HPAT_NONE = 0 , AWS_HPAT_BASIC = 1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_proxy_env_var_type { # [doc = " Default.\n Disable reading from environment variable for proxy."] AWS_HPEV_DISABLE = 0 , # [doc = " Enable get proxy URL from environment variable, when the manual proxy options of connection manager is not set.\n env HTTPS_PROXY/https_proxy will be checked when the main connection use tls.\n env HTTP_PROXY/http_proxy will be checked when the main connection NOT use tls.\n env NO_PROXY/no_proxy will be checked to bypass proxy if the host match the pattern.\n      Check `aws_http_host_matches_no_proxy` for detail. This function can also be used with a direct no_proxy\n parameter. The lower case version has precedence."] AWS_HPEV_ENABLE = 1 , } # [repr (u32)] # [non_exhaustive] # [doc = " Supported proxy connection types"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_proxy_connection_type { # [doc = " Deprecated, but 0-valued for backwards compatibility\n\n If tls options are provided (for the main connection) then treat the proxy as a tunneling proxy\n If tls options are not provided (for the main connection), then treat the proxy as a forwarding proxy"] AWS_HPCT_HTTP_LEGACY = 0 , # [doc = " Use the proxy to forward http requests.  Attempting to use both this mode and TLS on the tunnel destination\n is a configuration error."] AWS_HPCT_HTTP_FORWARD = 1 , # [doc = " Use the proxy to establish a connection to a remote endpoint via a CONNECT request through the proxy.\n Works for both plaintext and tls connections."] AWS_HPCT_HTTP_TUNNEL = 2 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct proxy_env_var_settings { pub env_var_type : aws_http_proxy_env_var_type , pub connection_type : aws_http_proxy_connection_type , pub tls_options : * const aws_tls_connection_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of proxy_env_var_settings"] [:: std :: mem :: size_of :: < proxy_env_var_settings > () - 16usize] ; ["Alignment of proxy_env_var_settings"] [:: std :: mem :: align_of :: < proxy_env_var_settings > () - 8usize] ; ["Offset of field: proxy_env_var_settings::env_var_type"] [:: std :: mem :: offset_of ! (proxy_env_var_settings , env_var_type) - 0usize] ; ["Offset of field: proxy_env_var_settings::connection_type"] [:: std :: mem :: offset_of ! (proxy_env_var_settings , connection_type) - 4usize] ; ["Offset of field: proxy_env_var_settings::tls_options"] [:: std :: mem :: offset_of ! (proxy_env_var_settings , tls_options) - 8usize] ; } ; impl Default for proxy_env_var_settings { 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 http proxy server usage"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_proxy_options { # [doc = " Type of proxy connection to make"] pub connection_type : aws_http_proxy_connection_type , # [doc = " Proxy host to connect to"] pub host : aws_byte_cursor , # [doc = " Port to make the proxy connection to"] pub port : u32 , # [doc = " Optional.\n TLS configuration for the Local <-> Proxy connection\n Must be distinct from the the TLS options in the parent aws_http_connection_options struct"] pub tls_options : * const aws_tls_connection_options , # [doc = " Optional\n Advanced option that allows the user to create a custom strategy that gives low-level control of\n certain logical flows within the proxy logic.\n\n For tunneling proxies it allows custom retry and adaptive negotiation of CONNECT requests.\n For forwarding proxies it allows custom request transformations."] pub proxy_strategy : * mut aws_http_proxy_strategy , # [doc = " @Deprecated - What type of proxy authentication to use, if any.\n Replaced by instantiating a proxy_strategy"] pub auth_type : aws_http_proxy_authentication_type , # [doc = " @Deprecated - Optional user name to use for basic authentication\n Replaced by instantiating a proxy_strategy via aws_http_proxy_strategy_new_basic_auth()"] pub auth_username : aws_byte_cursor , # [doc = " @Deprecated - Optional password to use for basic authentication\n Replaced by instantiating a proxy_strategy via aws_http_proxy_strategy_new_basic_auth()"] pub auth_password : aws_byte_cursor , # [doc = " Optional\n No proxy hosts - Comma seperated list of hosts for which not to use a proxy, if one is specified."] pub no_proxy_hosts : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_options"] [:: std :: mem :: size_of :: < aws_http_proxy_options > () - 104usize] ; ["Alignment of aws_http_proxy_options"] [:: std :: mem :: align_of :: < aws_http_proxy_options > () - 8usize] ; ["Offset of field: aws_http_proxy_options::connection_type"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , connection_type) - 0usize] ; ["Offset of field: aws_http_proxy_options::host"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , host) - 8usize] ; ["Offset of field: aws_http_proxy_options::port"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , port) - 24usize] ; ["Offset of field: aws_http_proxy_options::tls_options"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , tls_options) - 32usize] ; ["Offset of field: aws_http_proxy_options::proxy_strategy"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , proxy_strategy) - 40usize] ; ["Offset of field: aws_http_proxy_options::auth_type"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , auth_type) - 48usize] ; ["Offset of field: aws_http_proxy_options::auth_username"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , auth_username) - 56usize] ; ["Offset of field: aws_http_proxy_options::auth_password"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , auth_password) - 72usize] ; ["Offset of field: aws_http_proxy_options::no_proxy_hosts"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , no_proxy_hosts) - 88usize] ; } ; impl Default for aws_http_proxy_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 () } } } # [doc = " Synchronous (for now) callback function to fetch a token used in modifying CONNECT requests"] pub type aws_http_proxy_negotiation_get_token_sync_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void , out_error_code : * mut :: libc :: c_int) -> * mut aws_string > ; # [doc = " Synchronous (for now) callback function to fetch a token used in modifying CONNECT request.  Includes a (byte string)\n context intended to be used as part of a challenge-response flow."] pub type aws_http_proxy_negotiation_get_challenge_token_sync_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void , challenge_context : * const aws_byte_cursor , out_error_code : * mut :: libc :: c_int) -> * mut aws_string > ; # [doc = " Proxy negotiation logic must call this function to indicate an unsuccessful outcome"] pub type aws_http_proxy_negotiation_terminate_fn = :: std :: option :: Option < unsafe extern "C" fn (message : * mut aws_http_message , error_code : :: libc :: c_int , internal_proxy_user_data : * mut :: libc :: c_void) > ; # [doc = " Proxy negotiation logic must call this function to forward the potentially-mutated request back to the proxy\n connection logic."] pub type aws_http_proxy_negotiation_http_request_forward_fn = :: std :: option :: Option < unsafe extern "C" fn (message : * mut aws_http_message , internal_proxy_user_data : * mut :: libc :: c_void) > ; # [doc = " User-supplied transform callback which implements the proxy request flow and ultimately, across all execution\n pathways, invokes either the terminate function or the forward function appropriately.\n\n For tunneling proxy connections, this request flow transform only applies to the CONNECT stage of proxy\n connection establishment.\n\n For forwarding proxy connections, this request flow transform applies to every single http request that goes\n out on the connection.\n\n Forwarding proxy connections cannot yet support a truly async request transform without major surgery on http\n stream creation, so for now, we split into an async version (for tunneling proxies) and a separate\n synchronous version for forwarding proxies.  Also forwarding proxies are a kind of legacy dead-end in some\n sense.\n"] pub type aws_http_proxy_negotiation_http_request_transform_async_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , message : * mut aws_http_message , negotiation_termination_callback : aws_http_proxy_negotiation_terminate_fn , negotiation_http_request_forward_callback : aws_http_proxy_negotiation_http_request_forward_fn , internal_proxy_user_data : * mut :: libc :: c_void) > ; pub type aws_http_proxy_negotiation_http_request_transform_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , message : * mut aws_http_message) -> :: libc :: c_int > ; # [doc = " Tunneling proxy connections only.  A callback that lets the negotiator examine the headers in the\n response to the most recent CONNECT request as they arrive."] pub type aws_http_proxy_negotiation_connect_on_incoming_headers_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , header_block : aws_http_header_block , header_array : * const aws_http_header , num_headers : usize) -> :: libc :: c_int > ; # [doc = " Tunneling proxy connections only.  A callback that lets the negotiator examine the status code of the\n response to the most recent CONNECT request."] pub type aws_http_proxy_negotiator_connect_status_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , status_code : aws_http_status_code) -> :: libc :: c_int > ; # [doc = " Tunneling proxy connections only.  A callback that lets the negotiator examine the body of the response\n to the most recent CONNECT request."] pub type aws_http_proxy_negotiator_connect_on_incoming_body_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , data : * const aws_byte_cursor) -> :: libc :: c_int > ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_proxy_negotiation_retry_directive { AWS_HPNRD_STOP = 0 , AWS_HPNRD_NEW_CONNECTION = 1 , AWS_HPNRD_CURRENT_CONNECTION = 2 , } pub type aws_http_proxy_negotiator_get_retry_directive_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator) -> aws_http_proxy_negotiation_retry_directive > ; # [doc = " Vtable for forwarding-based proxy negotiators"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_proxy_negotiator_forwarding_vtable { pub forward_request_transform : aws_http_proxy_negotiation_http_request_transform_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_negotiator_forwarding_vtable"] [:: std :: mem :: size_of :: < aws_http_proxy_negotiator_forwarding_vtable > () - 8usize] ; ["Alignment of aws_http_proxy_negotiator_forwarding_vtable"] [:: std :: mem :: align_of :: < aws_http_proxy_negotiator_forwarding_vtable > () - 8usize] ; ["Offset of field: aws_http_proxy_negotiator_forwarding_vtable::forward_request_transform"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_forwarding_vtable , forward_request_transform) - 0usize] ; } ; # [doc = " Vtable for tunneling-based proxy negotiators"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_proxy_negotiator_tunnelling_vtable { pub connect_request_transform : aws_http_proxy_negotiation_http_request_transform_async_fn , pub on_incoming_headers_callback : aws_http_proxy_negotiation_connect_on_incoming_headers_fn , pub on_status_callback : aws_http_proxy_negotiator_connect_status_fn , pub on_incoming_body_callback : aws_http_proxy_negotiator_connect_on_incoming_body_fn , pub get_retry_directive : aws_http_proxy_negotiator_get_retry_directive_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_negotiator_tunnelling_vtable"] [:: std :: mem :: size_of :: < aws_http_proxy_negotiator_tunnelling_vtable > () - 40usize] ; ["Alignment of aws_http_proxy_negotiator_tunnelling_vtable"] [:: std :: mem :: align_of :: < aws_http_proxy_negotiator_tunnelling_vtable > () - 8usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::connect_request_transform"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , connect_request_transform) - 0usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::on_incoming_headers_callback"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , on_incoming_headers_callback) - 8usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::on_status_callback"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , on_status_callback) - 16usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::on_incoming_body_callback"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , on_incoming_body_callback) - 24usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::get_retry_directive"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , get_retry_directive) - 32usize] ; } ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_http_proxy_negotiator { pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , pub strategy_vtable : aws_http_proxy_negotiator__bindgen_ty_1 , } # [repr (C)] # [derive (Copy , Clone)] pub union aws_http_proxy_negotiator__bindgen_ty_1 { pub forwarding_vtable : * mut aws_http_proxy_negotiator_forwarding_vtable , pub tunnelling_vtable : * mut aws_http_proxy_negotiator_tunnelling_vtable , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_negotiator__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_http_proxy_negotiator__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_http_proxy_negotiator__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_http_proxy_negotiator__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_http_proxy_negotiator__bindgen_ty_1::forwarding_vtable"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator__bindgen_ty_1 , forwarding_vtable) - 0usize] ; ["Offset of field: aws_http_proxy_negotiator__bindgen_ty_1::tunnelling_vtable"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator__bindgen_ty_1 , tunnelling_vtable) - 0usize] ; } ; impl Default for aws_http_proxy_negotiator__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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_negotiator"] [:: std :: mem :: size_of :: < aws_http_proxy_negotiator > () - 40usize] ; ["Alignment of aws_http_proxy_negotiator"] [:: std :: mem :: align_of :: < aws_http_proxy_negotiator > () - 8usize] ; ["Offset of field: aws_http_proxy_negotiator::ref_count"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator , ref_count) - 0usize] ; ["Offset of field: aws_http_proxy_negotiator::impl_"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator , impl_) - 24usize] ; ["Offset of field: aws_http_proxy_negotiator::strategy_vtable"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator , strategy_vtable) - 32usize] ; } ; impl Default for aws_http_proxy_negotiator { 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_http_proxy_strategy_create_negotiator_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_strategy : * mut aws_http_proxy_strategy , allocator : * mut aws_allocator) -> * mut aws_http_proxy_negotiator > ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_proxy_strategy_vtable { pub create_negotiator : aws_http_proxy_strategy_create_negotiator_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_vtable"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_vtable > () - 8usize] ; ["Alignment of aws_http_proxy_strategy_vtable"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_vtable > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_vtable::create_negotiator"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_vtable , create_negotiator) - 0usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_proxy_strategy { pub ref_count : aws_ref_count , pub vtable : * mut aws_http_proxy_strategy_vtable , pub impl_ : * mut :: libc :: c_void , pub proxy_connection_type : aws_http_proxy_connection_type , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy > () - 48usize] ; ["Alignment of aws_http_proxy_strategy"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy::ref_count"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy , ref_count) - 0usize] ; ["Offset of field: aws_http_proxy_strategy::vtable"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy , vtable) - 24usize] ; ["Offset of field: aws_http_proxy_strategy::impl_"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy , impl_) - 32usize] ; ["Offset of field: aws_http_proxy_strategy::proxy_connection_type"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy , proxy_connection_type) - 40usize] ; } ; impl Default for aws_http_proxy_strategy { 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)] pub struct aws_http_proxy_strategy_basic_auth_options { pub proxy_connection_type : aws_http_proxy_connection_type , pub user_name : aws_byte_cursor , pub password : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_basic_auth_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_basic_auth_options > () - 40usize] ; ["Alignment of aws_http_proxy_strategy_basic_auth_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_basic_auth_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_basic_auth_options::proxy_connection_type"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_basic_auth_options , proxy_connection_type) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_basic_auth_options::user_name"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_basic_auth_options , user_name) - 8usize] ; ["Offset of field: aws_http_proxy_strategy_basic_auth_options::password"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_basic_auth_options , password) - 24usize] ; } ; impl Default for aws_http_proxy_strategy_basic_auth_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)] pub struct aws_http_proxy_strategy_tunneling_kerberos_options { pub get_token : aws_http_proxy_negotiation_get_token_sync_fn , pub get_token_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_tunneling_kerberos_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_tunneling_kerberos_options > () - 16usize] ; ["Alignment of aws_http_proxy_strategy_tunneling_kerberos_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_tunneling_kerberos_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_kerberos_options::get_token"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_kerberos_options , get_token) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_kerberos_options::get_token_user_data"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_kerberos_options , get_token_user_data) - 8usize] ; } ; impl Default for aws_http_proxy_strategy_tunneling_kerberos_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)] pub struct aws_http_proxy_strategy_tunneling_ntlm_options { pub get_token : aws_http_proxy_negotiation_get_token_sync_fn , pub get_challenge_token : aws_http_proxy_negotiation_get_challenge_token_sync_fn , pub get_challenge_token_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_tunneling_ntlm_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_tunneling_ntlm_options > () - 24usize] ; ["Alignment of aws_http_proxy_strategy_tunneling_ntlm_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_tunneling_ntlm_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_ntlm_options::get_token"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_ntlm_options , get_token) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_ntlm_options::get_challenge_token"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_ntlm_options , get_challenge_token) - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_ntlm_options::get_challenge_token_user_data"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_ntlm_options , get_challenge_token_user_data) - 16usize] ; } ; impl Default for aws_http_proxy_strategy_tunneling_ntlm_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)] pub struct aws_http_proxy_strategy_tunneling_adaptive_options { pub kerberos_options : * mut aws_http_proxy_strategy_tunneling_kerberos_options , pub ntlm_options : * mut aws_http_proxy_strategy_tunneling_ntlm_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_tunneling_adaptive_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_tunneling_adaptive_options > () - 16usize] ; ["Alignment of aws_http_proxy_strategy_tunneling_adaptive_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_tunneling_adaptive_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_adaptive_options::kerberos_options"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_adaptive_options , kerberos_options) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_adaptive_options::ntlm_options"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_adaptive_options , ntlm_options) - 8usize] ; } ; impl Default for aws_http_proxy_strategy_tunneling_adaptive_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)] pub struct aws_http_proxy_strategy_tunneling_sequence_options { pub strategies : * mut * mut aws_http_proxy_strategy , pub strategy_count : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_tunneling_sequence_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_tunneling_sequence_options > () - 16usize] ; ["Alignment of aws_http_proxy_strategy_tunneling_sequence_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_tunneling_sequence_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_sequence_options::strategies"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_sequence_options , strategies) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_sequence_options::strategy_count"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_sequence_options , strategy_count) - 8usize] ; } ; impl Default for aws_http_proxy_strategy_tunneling_sequence_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 () } } } unsafe extern "C" { # [doc = " Take a reference to an http proxy negotiator\n @param proxy_negotiator negotiator to take a reference to\n @return the strategy"] pub fn aws_http_proxy_negotiator_acquire (proxy_negotiator : * mut aws_http_proxy_negotiator) -> * mut aws_http_proxy_negotiator ; } unsafe extern "C" { # [doc = " Release a reference to an http proxy negotiator\n @param proxy_negotiator negotiator to release a reference to"] pub fn aws_http_proxy_negotiator_release (proxy_negotiator : * mut aws_http_proxy_negotiator) ; } unsafe extern "C" { # [doc = " Creates a new proxy negotiator from a proxy strategy\n @param allocator memory allocator to use\n @param strategy strategy to creation a new negotiator for\n @return a new proxy negotiator if successful, otherwise NULL"] pub fn aws_http_proxy_strategy_create_negotiator (strategy : * mut aws_http_proxy_strategy , allocator : * mut aws_allocator) -> * mut aws_http_proxy_negotiator ; } unsafe extern "C" { # [doc = " Take a reference to an http proxy strategy\n @param proxy_strategy strategy to take a reference to\n @return the strategy"] pub fn aws_http_proxy_strategy_acquire (proxy_strategy : * mut aws_http_proxy_strategy) -> * mut aws_http_proxy_strategy ; } unsafe extern "C" { # [doc = " Release a reference to an http proxy strategy\n @param proxy_strategy strategy to release a reference to"] pub fn aws_http_proxy_strategy_release (proxy_strategy : * mut aws_http_proxy_strategy) ; } unsafe extern "C" { # [doc = " A constructor for a proxy strategy that performs basic authentication by adding the appropriate\n header and header value to requests or CONNECT requests.\n\n @param allocator memory allocator to use\n @param config basic authentication configuration info\n @return a new proxy strategy if successfully constructed, otherwise NULL"] pub fn aws_http_proxy_strategy_new_basic_auth (allocator : * mut aws_allocator , config : * mut aws_http_proxy_strategy_basic_auth_options) -> * mut aws_http_proxy_strategy ; } unsafe extern "C" { # [doc = " Constructor for an adaptive tunneling proxy strategy.  This strategy attempts a vanilla CONNECT and if that\n fails it may make followup CONNECT attempts using kerberos or ntlm tokens, based on configuration and proxy\n response properties.\n\n @param allocator memory allocator to use\n @param config configuration options for the strategy\n @return a new proxy strategy if successfully constructed, otherwise NULL"] pub fn aws_http_proxy_strategy_new_tunneling_adaptive (allocator : * mut aws_allocator , config : * mut aws_http_proxy_strategy_tunneling_adaptive_options) -> * mut aws_http_proxy_strategy ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from http connection options\n @param allocator memory allocator to use\n @param options http connection options to source proxy configuration from\n @return"] pub fn aws_http_proxy_config_new_from_connection_options (allocator : * mut aws_allocator , options : * const aws_http_client_connection_options) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from http connection manager options\n @param allocator memory allocator to use\n @param options http connection manager options to source proxy configuration from\n @return"] pub fn aws_http_proxy_config_new_from_manager_options (allocator : * mut aws_allocator , options : * const aws_http_connection_manager_options) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from non-persistent proxy options.  The resulting\n proxy configuration assumes a tunneling connection type.\n\n @param allocator memory allocator to use\n @param options http proxy options to source proxy configuration from\n @return"] pub fn aws_http_proxy_config_new_tunneling_from_proxy_options (allocator : * mut aws_allocator , options : * const aws_http_proxy_options) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from non-persistent proxy options.\n Legacy connection type of proxy options will be rejected.\n\n @param allocator memory allocator to use\n @param options http proxy options to source proxy configuration from\n @return"] pub fn aws_http_proxy_config_new_from_proxy_options (allocator : * mut aws_allocator , options : * const aws_http_proxy_options) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from non-persistent proxy options.\n\n @param allocator memory allocator to use\n @param options http proxy options to source proxy configuration from\n @param is_tls_connection tls connection info of the main connection to determine connection_type\n                          when the connection_type is legacy.\n @return"] pub fn aws_http_proxy_config_new_from_proxy_options_with_tls_info (allocator : * mut aws_allocator , proxy_options : * const aws_http_proxy_options , is_tls_connection : bool) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Clones an existing proxy configuration.  A refactor could remove this (do a \"move\" between the old and new user\n data in the one spot it's used) but that should wait until we have better test cases for the logic where this\n gets invoked (ntlm/kerberos chains).\n\n @param allocator memory allocator to use\n @param proxy_config http proxy configuration to clone\n @return"] pub fn aws_http_proxy_config_new_clone (allocator : * mut aws_allocator , proxy_config : * const aws_http_proxy_config) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Destroys an http proxy configuration\n @param config http proxy configuration to destroy"] pub fn aws_http_proxy_config_destroy (config : * mut aws_http_proxy_config) ; } unsafe extern "C" { # [doc = " Initializes non-persistent http proxy options from a persistent http proxy configuration\n @param options http proxy options to initialize\n @param config the http proxy config to use as an initialization source"] pub fn aws_http_proxy_options_init_from_config (options : * mut aws_http_proxy_options , config : * const aws_http_proxy_config) ; } unsafe extern "C" { # [doc = " Establish an arbitrary protocol connection through an http proxy via tunneling CONNECT.  Alpn is\n not required for this connection process to succeed, but we encourage its use if available.\n\n @param channel_options configuration options for the socket level connection\n @param proxy_options configuration options for the proxy connection\n\n @return AWS_OP_SUCCESS if the asynchronous channel kickoff succeeded, AWS_OP_ERR otherwise"] pub fn aws_http_proxy_new_socket_channel (channel_options : * mut aws_socket_channel_bootstrap_options , proxy_options : * const aws_http_proxy_options) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_auth_http_system_vtable { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_ecc_key_pair { _unused : [u8 ; 0] , } unsafe extern "C" { pub static aws_sts_assume_role_default_duration_secs : u16 ; } pub type aws_on_get_credentials_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (credentials : * mut aws_credentials , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_credentials_provider_get_credentials_fn = :: std :: option :: Option < unsafe extern "C" fn (provider : * mut aws_credentials_provider , callback : aws_on_get_credentials_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; pub type aws_credentials_provider_destroy_fn = :: std :: option :: Option < unsafe extern "C" fn (provider : * mut aws_credentials_provider) > ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_credentials_provider_vtable { pub get_credentials : aws_credentials_provider_get_credentials_fn , pub destroy : aws_credentials_provider_destroy_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_vtable"] [:: std :: mem :: size_of :: < aws_credentials_provider_vtable > () - 16usize] ; ["Alignment of aws_credentials_provider_vtable"] [:: std :: mem :: align_of :: < aws_credentials_provider_vtable > () - 8usize] ; ["Offset of field: aws_credentials_provider_vtable::get_credentials"] [:: std :: mem :: offset_of ! (aws_credentials_provider_vtable , get_credentials) - 0usize] ; ["Offset of field: aws_credentials_provider_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_credentials_provider_vtable , destroy) - 8usize] ; } ; pub type aws_credentials_provider_shutdown_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_shutdown_options { pub shutdown_callback : aws_credentials_provider_shutdown_completed_fn , pub shutdown_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_shutdown_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_shutdown_options > () - 16usize] ; ["Alignment of aws_credentials_provider_shutdown_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_shutdown_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_shutdown_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_credentials_provider_shutdown_options , shutdown_callback) - 0usize] ; ["Offset of field: aws_credentials_provider_shutdown_options::shutdown_user_data"] [:: std :: mem :: offset_of ! (aws_credentials_provider_shutdown_options , shutdown_user_data) - 8usize] ; } ; impl Default for aws_credentials_provider_shutdown_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 () } } } # [doc = " A baseclass for credentials providers.  A credentials provider is an object that has an asynchronous\n query function for retrieving AWS credentials.\n\n Ref-counted.  Thread-safe."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider { pub vtable : * mut aws_credentials_provider_vtable , pub allocator : * mut aws_allocator , pub shutdown_options : aws_credentials_provider_shutdown_options , pub impl_ : * mut :: libc :: c_void , pub ref_count : aws_atomic_var , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider"] [:: std :: mem :: size_of :: < aws_credentials_provider > () - 48usize] ; ["Alignment of aws_credentials_provider"] [:: std :: mem :: align_of :: < aws_credentials_provider > () - 8usize] ; ["Offset of field: aws_credentials_provider::vtable"] [:: std :: mem :: offset_of ! (aws_credentials_provider , vtable) - 0usize] ; ["Offset of field: aws_credentials_provider::allocator"] [:: std :: mem :: offset_of ! (aws_credentials_provider , allocator) - 8usize] ; ["Offset of field: aws_credentials_provider::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider , shutdown_options) - 16usize] ; ["Offset of field: aws_credentials_provider::impl_"] [:: std :: mem :: offset_of ! (aws_credentials_provider , impl_) - 32usize] ; ["Offset of field: aws_credentials_provider::ref_count"] [:: std :: mem :: offset_of ! (aws_credentials_provider , ref_count) - 40usize] ; } ; impl Default for aws_credentials_provider { 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 = " Configuration options for a provider that returns a fixed set of credentials"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_static_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub access_key_id : aws_byte_cursor , pub secret_access_key : aws_byte_cursor , pub session_token : aws_byte_cursor , pub account_id : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_static_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_static_options > () - 80usize] ; ["Alignment of aws_credentials_provider_static_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_static_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_static_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_static_options::access_key_id"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , access_key_id) - 16usize] ; ["Offset of field: aws_credentials_provider_static_options::secret_access_key"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , secret_access_key) - 32usize] ; ["Offset of field: aws_credentials_provider_static_options::session_token"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , session_token) - 48usize] ; ["Offset of field: aws_credentials_provider_static_options::account_id"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , account_id) - 64usize] ; } ; impl Default for aws_credentials_provider_static_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 () } } } # [doc = " Configuration options for a provider that returns credentials based on environment variable values"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_environment_options { pub shutdown_options : aws_credentials_provider_shutdown_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_environment_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_environment_options > () - 16usize] ; ["Alignment of aws_credentials_provider_environment_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_environment_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_environment_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_environment_options , shutdown_options) - 0usize] ; } ; impl Default for aws_credentials_provider_environment_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 () } } } # [doc = " Configuration options for a provider that sources credentials from the aws config and credentials files\n (by default ~/.aws/config and ~/.aws/credentials)"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_profile_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub profile_name_override : aws_byte_cursor , pub config_file_name_override : aws_byte_cursor , pub credentials_file_name_override : aws_byte_cursor , # [doc = " (Optional)\n Use a cached merged profile collection. A merge collection has both config file\n (~/.aws/config) and credentials file based profile collection (~/.aws/credentials) using\n `aws_profile_collection_new_from_merge`.\n If this option is provided, `config_file_name_override` and `credentials_file_name_override` will be ignored."] pub profile_collection_cached : * mut aws_profile_collection , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub function_table : * mut aws_auth_http_system_vtable , pub proxy_ev_settings : * mut proxy_env_var_settings , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_profile_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_profile_options > () - 104usize] ; ["Alignment of aws_credentials_provider_profile_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_profile_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_profile_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_profile_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , profile_name_override) - 16usize] ; ["Offset of field: aws_credentials_provider_profile_options::config_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , config_file_name_override) - 32usize] ; ["Offset of field: aws_credentials_provider_profile_options::credentials_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , credentials_file_name_override) - 48usize] ; ["Offset of field: aws_credentials_provider_profile_options::profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , profile_collection_cached) - 64usize] ; ["Offset of field: aws_credentials_provider_profile_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , bootstrap) - 72usize] ; ["Offset of field: aws_credentials_provider_profile_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , tls_ctx) - 80usize] ; ["Offset of field: aws_credentials_provider_profile_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , function_table) - 88usize] ; ["Offset of field: aws_credentials_provider_profile_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , proxy_ev_settings) - 96usize] ; } ; impl Default for aws_credentials_provider_profile_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 () } } } # [doc = " Configuration options for a provider that functions as a caching decorator.  Credentials sourced through this\n provider will be cached within it until their expiration time.  When the cached credentials expire, new\n credentials will be fetched when next queried."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_cached_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub source : * mut aws_credentials_provider , pub refresh_time_in_milliseconds : u64 , pub high_res_clock_fn : aws_io_clock_fn , pub system_clock_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_cached_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_cached_options > () - 48usize] ; ["Alignment of aws_credentials_provider_cached_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_cached_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_cached_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_cached_options::source"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , source) - 16usize] ; ["Offset of field: aws_credentials_provider_cached_options::refresh_time_in_milliseconds"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , refresh_time_in_milliseconds) - 24usize] ; ["Offset of field: aws_credentials_provider_cached_options::high_res_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , high_res_clock_fn) - 32usize] ; ["Offset of field: aws_credentials_provider_cached_options::system_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , system_clock_fn) - 40usize] ; } ; impl Default for aws_credentials_provider_cached_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 () } } } # [doc = " Configuration options for a provider that queries, in order, a list of providers.  This provider uses the\n first set of credentials successfully queried.  Providers are queried one at a time; a provider is not queried\n until the preceding provider has failed to source credentials."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_chain_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub providers : * mut * mut aws_credentials_provider , pub provider_count : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_chain_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_chain_options > () - 32usize] ; ["Alignment of aws_credentials_provider_chain_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_chain_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_chain_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_chain_options::providers"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_options , providers) - 16usize] ; ["Offset of field: aws_credentials_provider_chain_options::provider_count"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_options , provider_count) - 24usize] ; } ; impl Default for aws_credentials_provider_chain_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 (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_imds_protocol_version { # [doc = " Defaults to IMDS_PROTOCOL_V2. It can be set to either one and IMDS Client\n will figure out (by looking at response code) which protocol an instance\n is using. But a more clear setting will reduce unnecessary network request."] IMDS_PROTOCOL_V2 = 0 , # [doc = " Defaults to IMDS_PROTOCOL_V2. It can be set to either one and IMDS Client\n will figure out (by looking at response code) which protocol an instance\n is using. But a more clear setting will reduce unnecessary network request."] IMDS_PROTOCOL_V1 = 1 , } # [doc = " Configuration options for the provider that sources credentials from ec2 instance metadata"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_imds_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub imds_version : aws_imds_protocol_version , pub ec2_metadata_v1_disabled : bool , pub function_table : * mut aws_auth_http_system_vtable , pub proxy_ev_settings : * const proxy_env_var_settings , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_imds_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_imds_options > () - 48usize] ; ["Alignment of aws_credentials_provider_imds_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_imds_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_imds_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_imds_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_imds_options::imds_version"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , imds_version) - 24usize] ; ["Offset of field: aws_credentials_provider_imds_options::ec2_metadata_v1_disabled"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , ec2_metadata_v1_disabled) - 28usize] ; ["Offset of field: aws_credentials_provider_imds_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , function_table) - 32usize] ; ["Offset of field: aws_credentials_provider_imds_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , proxy_ev_settings) - 40usize] ; } ; impl Default for aws_credentials_provider_imds_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)] pub struct aws_credentials_provider_ecs_environment_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_ecs_environment_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_ecs_environment_options > () - 48usize] ; ["Alignment of aws_credentials_provider_ecs_environment_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_ecs_environment_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , tls_ctx) - 24usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , proxy_ev_settings) - 32usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , function_table) - 40usize] ; } ; impl Default for aws_credentials_provider_ecs_environment_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)] pub struct aws_credentials_provider_ecs_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub host : aws_byte_cursor , pub path_and_query : aws_byte_cursor , pub auth_token_file_path : aws_byte_cursor , pub auth_token : aws_byte_cursor , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , pub port : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_ecs_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_ecs_options > () - 120usize] ; ["Alignment of aws_credentials_provider_ecs_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_ecs_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_ecs_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_ecs_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_ecs_options::host"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , host) - 24usize] ; ["Offset of field: aws_credentials_provider_ecs_options::path_and_query"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , path_and_query) - 40usize] ; ["Offset of field: aws_credentials_provider_ecs_options::auth_token_file_path"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , auth_token_file_path) - 56usize] ; ["Offset of field: aws_credentials_provider_ecs_options::auth_token"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , auth_token) - 72usize] ; ["Offset of field: aws_credentials_provider_ecs_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , tls_ctx) - 88usize] ; ["Offset of field: aws_credentials_provider_ecs_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , proxy_ev_settings) - 96usize] ; ["Offset of field: aws_credentials_provider_ecs_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , function_table) - 104usize] ; ["Offset of field: aws_credentials_provider_ecs_options::port"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , port) - 112usize] ; } ; impl Default for aws_credentials_provider_ecs_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 () } } } # [doc = " Configuration options for the X509 credentials provider\n\n The x509 credentials provider sources temporary credentials from AWS IoT Core using TLS mutual authentication.\n See details: https://docs.aws.amazon.com/iot/latest/developerguide/authorizing-direct-aws.html\n An end to end demo with detailed steps can be found here:\n https://aws.amazon.com/blogs/security/how-to-eliminate-the-need-for-hardcoded-aws-credentials-in-devices-by-using-the-aws-iot-credentials-provider/"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_x509_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub tls_connection_options : * const aws_tls_connection_options , pub thing_name : aws_byte_cursor , pub role_alias : aws_byte_cursor , # [doc = " Per-account X509 credentials sourcing endpoint."] pub endpoint : aws_byte_cursor , # [doc = " (Optional) Http proxy configuration for the http request that fetches credentials"] pub proxy_options : * const aws_http_proxy_options , # [doc = " (Optional) Settings propagated down to http connection manager to choose proxy options from environment. Read\n aws_http_credentials_provider.h for more information."] pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_x509_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_x509_options > () - 104usize] ; ["Alignment of aws_credentials_provider_x509_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_x509_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_x509_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_x509_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_x509_options::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , tls_connection_options) - 24usize] ; ["Offset of field: aws_credentials_provider_x509_options::thing_name"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , thing_name) - 32usize] ; ["Offset of field: aws_credentials_provider_x509_options::role_alias"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , role_alias) - 48usize] ; ["Offset of field: aws_credentials_provider_x509_options::endpoint"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , endpoint) - 64usize] ; ["Offset of field: aws_credentials_provider_x509_options::proxy_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , proxy_options) - 80usize] ; ["Offset of field: aws_credentials_provider_x509_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , proxy_ev_settings) - 88usize] ; ["Offset of field: aws_credentials_provider_x509_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , function_table) - 96usize] ; } ; impl Default for aws_credentials_provider_x509_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 () } } } # [doc = " Configuration options for the STS web identity provider\n\n Sts with web identity credentials provider sources a set of temporary security credentials for users who have been\n authenticated in a mobile or web application with a web identity provider.\n Example providers include Amazon Cognito, Login with Amazon, Facebook, Google, or any OpenID Connect-compatible\n identity provider like Elastic Kubernetes Service\n https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoleWithWebIdentity.html\n The required parameters used in the request (region, roleArn, sessionName, tokenFilePath) are automatically resolved\n by SDK from envrionment variables or config file if not set.\n---------------------------------------------------------------------------------\n| Parameter           | Environment Variable Name    | Config File Property Name |\n----------------------------------------------------------------------------------\n| region              | AWS_REGION/AWS_DEFAULT_REGION| region                    |\n| role_arn            | AWS_ROLE_ARN                 | role_arn                  |\n| role_session_name   | AWS_ROLE_SESSION_NAME        | role_session_name         |\n| token_file_path     | AWS_WEB_IDENTITY_TOKEN_FILE  | web_identity_token_file   |\n|--------------------------------------------------------------------------------|\n The order of resolution is the following\n 1. Parameters\n 2. Environment Variables (in case of region, the AWS_REGION is preferred over the AWS_DEFAULT_REGION)\n 3. Config File"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_sts_web_identity_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , # [doc = " (Optional)\n Use a cached config profile collection. You can also pass a merged collection."] pub config_profile_collection_cached : * mut aws_profile_collection , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , pub profile_name_override : aws_byte_cursor , pub region : aws_byte_cursor , pub role_arn : aws_byte_cursor , pub role_session_name : aws_byte_cursor , pub token_file_path : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_sts_web_identity_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_sts_web_identity_options > () - 136usize] ; ["Alignment of aws_credentials_provider_sts_web_identity_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_sts_web_identity_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::config_profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , config_profile_collection_cached) - 24usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , tls_ctx) - 32usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , proxy_ev_settings) - 40usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , function_table) - 48usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , profile_name_override) - 56usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::region"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , region) - 72usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::role_arn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , role_arn) - 88usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::role_session_name"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , role_session_name) - 104usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::token_file_path"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , token_file_path) - 120usize] ; } ; impl Default for aws_credentials_provider_sts_web_identity_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)] pub struct aws_credentials_provider_sso_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub profile_name_override : aws_byte_cursor , pub config_file_name_override : aws_byte_cursor , # [doc = " (Optional)\n Use a cached config profile collection. You can also pass a merged collection.\n config_file_name_override will be ignored if this option is provided."] pub config_file_cached : * mut aws_profile_collection , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , pub system_clock_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_sso_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_sso_options > () - 96usize] ; ["Alignment of aws_credentials_provider_sso_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_sso_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_sso_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_sso_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , profile_name_override) - 16usize] ; ["Offset of field: aws_credentials_provider_sso_options::config_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , config_file_name_override) - 32usize] ; ["Offset of field: aws_credentials_provider_sso_options::config_file_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , config_file_cached) - 48usize] ; ["Offset of field: aws_credentials_provider_sso_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , bootstrap) - 56usize] ; ["Offset of field: aws_credentials_provider_sso_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , tls_ctx) - 64usize] ; ["Offset of field: aws_credentials_provider_sso_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , proxy_ev_settings) - 72usize] ; ["Offset of field: aws_credentials_provider_sso_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , function_table) - 80usize] ; ["Offset of field: aws_credentials_provider_sso_options::system_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , system_clock_fn) - 88usize] ; } ; impl Default for aws_credentials_provider_sso_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 () } } } # [doc = " Configuration options for the STS credentials provider.\n STS Credentials Provider will try to automatically resolve the region and use a regional STS endpoint if successful.\n The region resolution order is the following:\n 1. AWS_REGION environment variable\n 2. AWS_DEFAULT_REGION environment variable\n 3. The region property in the config file."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_sts_options { pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub creds_provider : * mut aws_credentials_provider , pub role_arn : aws_byte_cursor , pub session_name : aws_byte_cursor , pub external_id : aws_byte_cursor , pub duration_seconds : u16 , # [doc = " (Optional) Http proxy configuration for the AssumeRole http request that fetches credentials"] pub http_proxy_options : * const aws_http_proxy_options , # [doc = " (Optional) Settings propagated down to http connection manager to choose proxy options from environment. Read\n aws_http_credentials_provider.h for more information."] pub proxy_ev_settings : * const proxy_env_var_settings , # [doc = " (Optional)\n Uses a cached config file profile collection (~/.aws/config). You can also pass a merged profile collection,\n which contains both a config file and a credentials file.\n If provided, config_file_name_override is ignored."] pub profile_collection_cached : * mut aws_profile_collection , pub profile_name_override : aws_byte_cursor , pub config_file_name_override : aws_byte_cursor , pub shutdown_options : aws_credentials_provider_shutdown_options , pub function_table : * mut aws_auth_http_system_vtable , pub system_clock_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_sts_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_sts_options > () - 168usize] ; ["Alignment of aws_credentials_provider_sts_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_sts_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_sts_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , bootstrap) - 0usize] ; ["Offset of field: aws_credentials_provider_sts_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , tls_ctx) - 8usize] ; ["Offset of field: aws_credentials_provider_sts_options::creds_provider"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , creds_provider) - 16usize] ; ["Offset of field: aws_credentials_provider_sts_options::role_arn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , role_arn) - 24usize] ; ["Offset of field: aws_credentials_provider_sts_options::session_name"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , session_name) - 40usize] ; ["Offset of field: aws_credentials_provider_sts_options::external_id"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , external_id) - 56usize] ; ["Offset of field: aws_credentials_provider_sts_options::duration_seconds"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , duration_seconds) - 72usize] ; ["Offset of field: aws_credentials_provider_sts_options::http_proxy_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , http_proxy_options) - 80usize] ; ["Offset of field: aws_credentials_provider_sts_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , proxy_ev_settings) - 88usize] ; ["Offset of field: aws_credentials_provider_sts_options::profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , profile_collection_cached) - 96usize] ; ["Offset of field: aws_credentials_provider_sts_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , profile_name_override) - 104usize] ; ["Offset of field: aws_credentials_provider_sts_options::config_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , config_file_name_override) - 120usize] ; ["Offset of field: aws_credentials_provider_sts_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , shutdown_options) - 136usize] ; ["Offset of field: aws_credentials_provider_sts_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , function_table) - 152usize] ; ["Offset of field: aws_credentials_provider_sts_options::system_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , system_clock_fn) - 160usize] ; } ; impl Default for aws_credentials_provider_sts_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 () } } } # [doc = " Configuration options for the process credentials provider\n\n The process credentials provider sources credentials from running a command or process.\n The command to run is sourced from a profile in the AWS config file, using the standard\n profile selection rules. The profile key the command is read from is \"credential_process.\"\n E.g.:\n  [default]\n  credential_process=/opt/amazon/bin/my-credential-fetcher --argsA=abc\n On successfully running the command, the output should be a json data with the following\n format:\n {\n\"Version\": 1,\n\"AccessKeyId\": \"accesskey\",\n\"SecretAccessKey\": \"secretAccessKey\"\n\"SessionToken\": \"....\",\n\"Expiration\": \"2019-05-29T00:21:43Z\"\n}\n Version here identifies the command output format version."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_process_options { pub shutdown_options : aws_credentials_provider_shutdown_options , # [doc = " In which profile name to look for credential_process,\n if not provided, we will try environment variable: AWS_PROFILE."] pub profile_to_use : aws_byte_cursor , # [doc = " (Optional)\n Use a cached config profile collection. You can also pass a merged collection."] pub config_profile_collection_cached : * mut aws_profile_collection , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_process_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_process_options > () - 40usize] ; ["Alignment of aws_credentials_provider_process_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_process_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_process_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_process_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_process_options::profile_to_use"] [:: std :: mem :: offset_of ! (aws_credentials_provider_process_options , profile_to_use) - 16usize] ; ["Offset of field: aws_credentials_provider_process_options::config_profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_process_options , config_profile_collection_cached) - 32usize] ; } ; impl Default for aws_credentials_provider_process_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 () } } } # [doc = " Configuration options for the default credentials provider chain."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_chain_default_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , # [doc = " (Optional)\n Use a cached merged profile collection. A merge collection has both config file\n (~/.aws/config) and credentials file based profile collection (~/.aws/credentials) using\n `aws_profile_collection_new_from_merge`."] pub profile_collection_cached : * mut aws_profile_collection , pub profile_name_override : aws_byte_cursor , pub skip_environment_credentials_provider : bool , pub proxy_ev_settings : * const proxy_env_var_settings , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_chain_default_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_chain_default_options > () - 72usize] ; ["Alignment of aws_credentials_provider_chain_default_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_chain_default_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , tls_ctx) - 24usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , profile_collection_cached) - 32usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , profile_name_override) - 40usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::skip_environment_credentials_provider"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , skip_environment_credentials_provider) - 56usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , proxy_ev_settings) - 64usize] ; } ; impl Default for aws_credentials_provider_chain_default_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_credentials_provider_delegate_get_credentials_fn = :: std :: option :: Option < unsafe extern "C" fn (delegate_user_data : * mut :: libc :: c_void , callback : aws_on_get_credentials_callback_fn , callback_user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Configuration options for the delegate credentials provider."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_delegate_options { pub shutdown_options : aws_credentials_provider_shutdown_options , # [doc = " Delegated get_credentials() callback."] pub get_credentials : aws_credentials_provider_delegate_get_credentials_fn , # [doc = " User data for delegated callbacks."] pub delegate_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_delegate_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_delegate_options > () - 32usize] ; ["Alignment of aws_credentials_provider_delegate_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_delegate_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_delegate_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_delegate_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_delegate_options::get_credentials"] [:: std :: mem :: offset_of ! (aws_credentials_provider_delegate_options , get_credentials) - 16usize] ; ["Offset of field: aws_credentials_provider_delegate_options::delegate_user_data"] [:: std :: mem :: offset_of ! (aws_credentials_provider_delegate_options , delegate_user_data) - 24usize] ; } ; impl Default for aws_credentials_provider_delegate_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 () } } } # [doc = " A (string) pair defining an identity provider and a valid login token sourced from it."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_cognito_identity_provider_token_pair { # [doc = " Name of an identity provider"] pub identity_provider_name : aws_byte_cursor , # [doc = " Valid login token source from the identity provider"] pub identity_provider_token : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_cognito_identity_provider_token_pair"] [:: std :: mem :: size_of :: < aws_cognito_identity_provider_token_pair > () - 32usize] ; ["Alignment of aws_cognito_identity_provider_token_pair"] [:: std :: mem :: align_of :: < aws_cognito_identity_provider_token_pair > () - 8usize] ; ["Offset of field: aws_cognito_identity_provider_token_pair::identity_provider_name"] [:: std :: mem :: offset_of ! (aws_cognito_identity_provider_token_pair , identity_provider_name) - 0usize] ; ["Offset of field: aws_cognito_identity_provider_token_pair::identity_provider_token"] [:: std :: mem :: offset_of ! (aws_cognito_identity_provider_token_pair , identity_provider_token) - 16usize] ; } ; impl Default for aws_cognito_identity_provider_token_pair { 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_credentials_provider_cognito_get_token_pairs_completion_fn = :: std :: option :: Option < unsafe extern "C" fn (logins : * mut aws_cognito_identity_provider_token_pair , login_count : usize , error_code : :: libc :: c_int , completion_user_data : * mut :: libc :: c_void) > ; pub type aws_credentials_provider_cognito_get_token_pairs_async_fn = :: std :: option :: Option < unsafe extern "C" fn (get_token_pairs_user_data : * mut :: libc :: c_void , completion_callback : aws_credentials_provider_cognito_get_token_pairs_completion_fn , completion_user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Configuration options needed to create a Cognito-based Credentials Provider"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_cognito_options { pub shutdown_options : aws_credentials_provider_shutdown_options , # [doc = " Cognito service regional endpoint to source credentials from."] pub endpoint : aws_byte_cursor , # [doc = " Cognito identity to fetch credentials relative to."] pub identity : aws_byte_cursor , # [doc = " Optional set of identity provider token pairs to allow for authenticated identity access."] pub logins : * mut aws_cognito_identity_provider_token_pair , pub login_count : usize , # [doc = " Optional ARN of the role to be assumed when multiple roles were received in the token from the identity provider."] pub custom_role_arn : * mut aws_byte_cursor , # [doc = " Connection bootstrap to use for network connections made while sourcing credentials"] pub bootstrap : * mut aws_client_bootstrap , # [doc = " Client TLS context to use when querying cognito credentials.\n Required."] pub tls_ctx : * mut aws_tls_ctx , # [doc = " (Optional) Http proxy configuration for the http request that fetches credentials"] pub http_proxy_options : * const aws_http_proxy_options , # [doc = " (Optional) Settings propagated down to http connection manager to choose proxy options from environment. Read\n aws_http_credentials_provider.h for more information."] pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , # [doc = " Optional async function to allow for dynamic augmentation of the token pair set on a per-request basis."] pub get_token_pairs : aws_credentials_provider_cognito_get_token_pairs_async_fn , # [doc = " User data that should be passed in to the get_token_pairs function as the first parameter.  In practice, this\n will be a reference to a CRT binding object."] pub get_token_pairs_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_cognito_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_cognito_options > () - 128usize] ; ["Alignment of aws_credentials_provider_cognito_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_cognito_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_cognito_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_cognito_options::endpoint"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , endpoint) - 16usize] ; ["Offset of field: aws_credentials_provider_cognito_options::identity"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , identity) - 32usize] ; ["Offset of field: aws_credentials_provider_cognito_options::logins"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , logins) - 48usize] ; ["Offset of field: aws_credentials_provider_cognito_options::login_count"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , login_count) - 56usize] ; ["Offset of field: aws_credentials_provider_cognito_options::custom_role_arn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , custom_role_arn) - 64usize] ; ["Offset of field: aws_credentials_provider_cognito_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , bootstrap) - 72usize] ; ["Offset of field: aws_credentials_provider_cognito_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , tls_ctx) - 80usize] ; ["Offset of field: aws_credentials_provider_cognito_options::http_proxy_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , http_proxy_options) - 88usize] ; ["Offset of field: aws_credentials_provider_cognito_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , proxy_ev_settings) - 96usize] ; ["Offset of field: aws_credentials_provider_cognito_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , function_table) - 104usize] ; ["Offset of field: aws_credentials_provider_cognito_options::get_token_pairs"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , get_token_pairs) - 112usize] ; ["Offset of field: aws_credentials_provider_cognito_options::get_token_pairs_user_data"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , get_token_pairs_user_data) - 120usize] ; } ; impl Default for aws_credentials_provider_cognito_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)] pub struct aws_credentials_provider_login_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub login_session : aws_byte_cursor , pub login_region : aws_byte_cursor , pub login_cache_directory_override : aws_byte_cursor , pub profile_name_override : aws_byte_cursor , pub config_file_name_override : aws_byte_cursor , pub config_file_cached : * mut aws_profile_collection , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , pub system_clock_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_login_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_login_options > () - 144usize] ; ["Alignment of aws_credentials_provider_login_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_login_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_login_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_login_options::login_session"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , login_session) - 16usize] ; ["Offset of field: aws_credentials_provider_login_options::login_region"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , login_region) - 32usize] ; ["Offset of field: aws_credentials_provider_login_options::login_cache_directory_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , login_cache_directory_override) - 48usize] ; ["Offset of field: aws_credentials_provider_login_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , profile_name_override) - 64usize] ; ["Offset of field: aws_credentials_provider_login_options::config_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , config_file_name_override) - 80usize] ; ["Offset of field: aws_credentials_provider_login_options::config_file_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , config_file_cached) - 96usize] ; ["Offset of field: aws_credentials_provider_login_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , bootstrap) - 104usize] ; ["Offset of field: aws_credentials_provider_login_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , tls_ctx) - 112usize] ; ["Offset of field: aws_credentials_provider_login_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , proxy_ev_settings) - 120usize] ; ["Offset of field: aws_credentials_provider_login_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , function_table) - 128usize] ; ["Offset of field: aws_credentials_provider_login_options::system_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , system_clock_fn) - 136usize] ; } ; impl Default for aws_credentials_provider_login_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 () } } } # [doc = " Configuration options for `aws_credentials_new_with_options`"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_options { pub access_key_id_cursor : aws_byte_cursor , pub secret_access_key_cursor : aws_byte_cursor , pub session_token_cursor : aws_byte_cursor , pub account_id_cursor : aws_byte_cursor , pub expiration_timepoint_seconds : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_options"] [:: std :: mem :: size_of :: < aws_credentials_options > () - 72usize] ; ["Alignment of aws_credentials_options"] [:: std :: mem :: align_of :: < aws_credentials_options > () - 8usize] ; ["Offset of field: aws_credentials_options::access_key_id_cursor"] [:: std :: mem :: offset_of ! (aws_credentials_options , access_key_id_cursor) - 0usize] ; ["Offset of field: aws_credentials_options::secret_access_key_cursor"] [:: std :: mem :: offset_of ! (aws_credentials_options , secret_access_key_cursor) - 16usize] ; ["Offset of field: aws_credentials_options::session_token_cursor"] [:: std :: mem :: offset_of ! (aws_credentials_options , session_token_cursor) - 32usize] ; ["Offset of field: aws_credentials_options::account_id_cursor"] [:: std :: mem :: offset_of ! (aws_credentials_options , account_id_cursor) - 48usize] ; ["Offset of field: aws_credentials_options::expiration_timepoint_seconds"] [:: std :: mem :: offset_of ! (aws_credentials_options , expiration_timepoint_seconds) - 64usize] ; } ; impl Default for aws_credentials_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 () } } } unsafe extern "C" { # [doc = " Creates a new set of aws credentials\n\n @param allocator memory allocator to use\n @param access_key_id_cursor value for the aws access key id field\n @param secret_access_key_cursor value for the secret access key field\n @param session_token_cursor (optional) security token associated with the credentials\n @param expiration_timepoint_seconds timepoint, in seconds since epoch, that the credentials will no longer\n be valid past.  For credentials that do not expire, use UINT64_MAX\n\n @return a valid credentials object, or NULL"] pub fn aws_credentials_new (allocator : * mut aws_allocator , access_key_id_cursor : aws_byte_cursor , secret_access_key_cursor : aws_byte_cursor , session_token_cursor : aws_byte_cursor , expiration_timepoint_seconds : u64) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Creates a new set of aws credentials with account_id\n\n @param allocator memory allocator to use\n @param access_key_id_cursor value for the aws access key id field\n @param secret_access_key_cursor value for the secret access key field\n @param session_token_cursor (optional) security token associated with the credentials\n @param account_id (optional) value for the account_id field\n @param expiration_timepoint_seconds timepoint, in seconds since epoch, that the credentials will no longer\n be valid past.  For credentials that do not expire, use UINT64_MAX\n\n @return a valid credentials object, or NULL"] pub fn aws_credentials_new_with_options (allocator : * mut aws_allocator , options : * const aws_credentials_options) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Creates a new set of aws anonymous credentials.\n Use Anonymous credentials, when you want to skip the signing process.\n\n @param allocator memory allocator to use\n\n @return a valid credentials object, or NULL"] pub fn aws_credentials_new_anonymous (allocator : * mut aws_allocator) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Creates a new set of AWS credentials\n\n @param allocator memory allocator to use\n @param access_key_id  value for the aws access key id field\n @param secret_access_key value for the secret access key field\n @param session_token (optional) security token associated with the credentials\n @param expiration_timepoint_seconds timepoint, in seconds since epoch, that the credentials will no longer\n be valid past.  For credentials that do not expire, use UINT64_MAX\n\n @return a valid credentials object, or NULL"] pub fn aws_credentials_new_from_string (allocator : * mut aws_allocator , access_key_id : * const aws_string , secret_access_key : * const aws_string , session_token : * const aws_string , expiration_timepoint_seconds : u64) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Creates a set of AWS credentials that includes an ECC key pair.  These credentials do not have a value for\n the secret access key; the ecc key takes over that field's role in sigv4a signing.\n\n @param allocator memory allocator to use for all memory allocations\n @param access_key_id access key id for the credential set\n @param ecc_key ecc key to use during signing when using these credentials\n @param session_token (optional) session token associated with the credentials\n @param expiration_timepoint_in_seconds (optional) if session-based, time at which these credentials expire\n @return a new pair of AWS credentials, or NULL"] pub fn aws_credentials_new_ecc (allocator : * mut aws_allocator , access_key_id : aws_byte_cursor , ecc_key : * mut aws_ecc_key_pair , session_token : aws_byte_cursor , expiration_timepoint_in_seconds : u64) -> * mut aws_credentials ; } unsafe extern "C" { pub fn aws_credentials_new_ecc_from_aws_credentials (allocator : * mut aws_allocator , credentials : * const aws_credentials) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Add a reference to some credentials\n\n @param credentials credentials to increment the ref count on"] pub fn aws_credentials_acquire (credentials : * const aws_credentials) ; } unsafe extern "C" { # [doc = " Remove a reference to some credentials\n\n @param credentials credentials to decrement the ref count on"] pub fn aws_credentials_release (credentials : * const aws_credentials) ; } unsafe extern "C" { # [doc = " Get the AWS access key id from a set of credentials\n\n @param credentials credentials to get the access key id from\n @return a byte cursor to the access key id"] pub fn aws_credentials_get_access_key_id (credentials : * const aws_credentials) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the AWS secret access key from a set of credentials\n\n @param credentials credentials to get the secret access key from\n @return a byte cursor to the secret access key"] pub fn aws_credentials_get_secret_access_key (credentials : * const aws_credentials) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the AWS session token from a set of credentials\n\n @param credentials credentials to get the session token from\n @return a byte cursor to the session token or an empty byte cursor if there is no session token"] pub fn aws_credentials_get_session_token (credentials : * const aws_credentials) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the AWS account id from a set of credentials\n\n @param credentials to get the account id from\n @return a byte cursor to the account id or an empty byte cursor if there is no account id"] pub fn aws_credentials_get_account_id (credentials : * const aws_credentials) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the expiration timepoint (in seconds since epoch) associated with a set of credentials\n\n @param credentials credentials to get the expiration timepoint for\n @return the time, in seconds since epoch, the credentials will expire; UINT64_MAX for credentials\n without a specific expiration time"] pub fn aws_credentials_get_expiration_timepoint_seconds (credentials : * const aws_credentials) -> u64 ; } unsafe extern "C" { # [doc = " Get the elliptic curve key associated with this set of credentials\n @param credentials credentials to get the the elliptic curve key for\n @return the elliptic curve key associated with the credentials, or NULL if no key is associated with\n these credentials"] pub fn aws_credentials_get_ecc_key_pair (credentials : * const aws_credentials) -> * mut aws_ecc_key_pair ; } unsafe extern "C" { # [doc = " If credentials are anonymous, then the signing process is skipped.\n\n @param credentials credentials to check\n\n @return true if the credentials are anonymous; false otherwise."] pub fn aws_credentials_is_anonymous (credentials : * const aws_credentials) -> bool ; } unsafe extern "C" { # [doc = " Derives an ecc key pair (based on the nist P256 curve) from the access key id and secret access key components\n of a set of AWS credentials using an internal key derivation specification.  Used to perform sigv4a signing in\n the hybrid mode based on AWS credentials.\n\n @param allocator memory allocator to use for all memory allocations\n @param credentials AWS credentials to derive the ECC key from using the AWS sigv4a key derivation specification\n @return a new ecc key pair or NULL on failure"] pub fn aws_ecc_key_pair_new_ecdsa_p256_key_from_aws_credentials (allocator : * mut aws_allocator , credentials : * const aws_credentials) -> * mut aws_ecc_key_pair ; } unsafe extern "C" { # [doc = " Release a reference to a credentials provider\n\n @param provider provider to decrement the ref count on"] pub fn aws_credentials_provider_release (provider : * mut aws_credentials_provider) -> * mut aws_credentials_provider ; } unsafe extern "C" { pub fn aws_credentials_provider_acquire (provider : * mut aws_credentials_provider) -> * mut aws_credentials_provider ; } unsafe extern "C" { pub fn aws_credentials_provider_get_credentials (provider : * mut aws_credentials_provider , callback : aws_on_get_credentials_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Creates a simple provider that just returns a fixed set of credentials\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_static (allocator : * mut aws_allocator , options : * const aws_credentials_provider_static_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a simple anonymous credentials provider\n\n @param allocator memory allocator to use for all memory allocation\n @param shutdown_options an optional shutdown callback that gets\n invoked when the resources used by the provider are no longer in use.\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_anonymous (allocator : * mut aws_allocator , shutdown_options : * const aws_credentials_provider_shutdown_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that returns credentials sourced from the environment variables:\n\n AWS_ACCESS_KEY_ID\n AWS_SECRET_ACCESS_KEY\n AWS_SESSION_TOKEN\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_environment (allocator : * mut aws_allocator , options : * const aws_credentials_provider_environment_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that functions as a caching decorating of another provider.\n\n For example, the default chain is implemented as:\n\n CachedProvider -> ProviderChain(EnvironmentProvider -> ProfileProvider -> ECS/EC2IMD etc...)\n\n A reference is taken on the target provider\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_cached (allocator : * mut aws_allocator , options : * const aws_credentials_provider_cached_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from key-value profiles loaded from the aws credentials\n file (\"~/.aws/credentials\" by default) and the aws config file (\"~/.aws/config\" by\n default)\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_profile (allocator : * mut aws_allocator , options : * const aws_credentials_provider_profile_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that assumes an IAM role via. STS AssumeRole() API. This provider will fetch new credentials\n upon each call to aws_credentials_provider_get_credentials().\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_sts (allocator : * mut aws_allocator , options : * const aws_credentials_provider_sts_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from an ordered sequence of providers, with the overall result\n being from the first provider to return a valid set of credentials\n\n References are taken on all supplied providers\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_chain (allocator : * mut aws_allocator , options : * const aws_credentials_provider_chain_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from the ec2 instance metadata service\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_imds (allocator : * mut aws_allocator , options : * const aws_credentials_provider_imds_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from the ecs role credentials service and reads the required params from\n environment variables\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_ecs_from_environment (allocator : * mut aws_allocator , options : * const aws_credentials_provider_ecs_environment_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from the ecs role credentials service\n This function doesn't read anything from the environment and requires everything to be explicitly passed in.\n If you need to read properties from the environment, use the `aws_credentials_provider_new_ecs_from_environment`.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_ecs (allocator : * mut aws_allocator , options : * const aws_credentials_provider_ecs_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from IoT Core\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_x509 (allocator : * mut aws_allocator , options : * const aws_credentials_provider_x509_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from STS using AssumeRoleWithWebIdentity\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_sts_web_identity (allocator : * mut aws_allocator , options : * const aws_credentials_provider_sts_web_identity_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from SSO using a SSOToken.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_sso (allocator : * mut aws_allocator , options : * const aws_credentials_provider_sso_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { pub fn aws_credentials_provider_new_process (allocator : * mut aws_allocator , options : * const aws_credentials_provider_process_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Create a credentials provider depends on provided vtable to fetch the credentials.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_delegate (allocator : * mut aws_allocator , options : * const aws_credentials_provider_delegate_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from the Cognito-Identity service via an\n invocation of the GetCredentialsForIdentity API call.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_cognito (allocator : * mut aws_allocator , options : * const aws_credentials_provider_cognito_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a cognito-based provider that has a caching layer wrapped around it\n\n @param allocator memory allocator to use for all memory allocation\n @param options cognito-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_cognito_caching (allocator : * mut aws_allocator , options : * const aws_credentials_provider_cognito_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from AWS Login.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_login (allocator : * mut aws_allocator , options : * const aws_credentials_provider_login_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates the default provider chain used by most AWS SDKs.\n\n Generally:\n\n (1) Environment\n (2) Profile\n    - STSCredentialsProvider\n    - ProcessCredentialsProvider\n    - ProfileCredentialsProvider\n (3) STS web identity\n (4) (conditional, off by default) ECS\n (5) (conditional, on by default) EC2 Instance Metadata\n\n Support for environmental control of the default provider chain is not yet\n implemented.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_chain_default (allocator : * mut aws_allocator , options : * const aws_credentials_provider_chain_default_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { pub static mut g_aws_credentials_provider_http_function_table : * const aws_auth_http_system_vtable ; } pub const AWS_DATE_TIME_STR_MAX_LEN : _bindgen_ty_21 = _bindgen_ty_21 :: AWS_DATE_TIME_STR_MAX_LEN ; pub const AWS_DATE_TIME_STR_MAX_BASIC_LEN : _bindgen_ty_21 = _bindgen_ty_21 :: AWS_DATE_TIME_STR_MAX_BASIC_LEN ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_21 { AWS_DATE_TIME_STR_MAX_LEN = 100 , AWS_DATE_TIME_STR_MAX_BASIC_LEN = 20 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_date_format { AWS_DATE_FORMAT_RFC822 = 0 , AWS_DATE_FORMAT_ISO_8601 = 1 , AWS_DATE_FORMAT_ISO_8601_BASIC = 2 , AWS_DATE_FORMAT_AUTO_DETECT = 3 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_date_month { AWS_DATE_MONTH_JANUARY = 0 , AWS_DATE_MONTH_FEBRUARY = 1 , AWS_DATE_MONTH_MARCH = 2 , AWS_DATE_MONTH_APRIL = 3 , AWS_DATE_MONTH_MAY = 4 , AWS_DATE_MONTH_JUNE = 5 , AWS_DATE_MONTH_JULY = 6 , AWS_DATE_MONTH_AUGUST = 7 , AWS_DATE_MONTH_SEPTEMBER = 8 , AWS_DATE_MONTH_OCTOBER = 9 , AWS_DATE_MONTH_NOVEMBER = 10 , AWS_DATE_MONTH_DECEMBER = 11 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_date_day_of_week { AWS_DATE_DAY_OF_WEEK_SUNDAY = 0 , AWS_DATE_DAY_OF_WEEK_MONDAY = 1 , AWS_DATE_DAY_OF_WEEK_TUESDAY = 2 , AWS_DATE_DAY_OF_WEEK_WEDNESDAY = 3 , AWS_DATE_DAY_OF_WEEK_THURSDAY = 4 , AWS_DATE_DAY_OF_WEEK_FRIDAY = 5 , AWS_DATE_DAY_OF_WEEK_SATURDAY = 6 , } # [repr (C)] pub struct aws_date_time { pub timestamp : time_t , pub milliseconds : u16 , pub tz : [:: libc :: c_char ; 6usize] , pub gmt_time : tm , pub local_time : tm , pub utc_assumed : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_date_time"] [:: std :: mem :: size_of :: < aws_date_time > () - 136usize] ; ["Alignment of aws_date_time"] [:: std :: mem :: align_of :: < aws_date_time > () - 8usize] ; ["Offset of field: aws_date_time::timestamp"] [:: std :: mem :: offset_of ! (aws_date_time , timestamp) - 0usize] ; ["Offset of field: aws_date_time::milliseconds"] [:: std :: mem :: offset_of ! (aws_date_time , milliseconds) - 8usize] ; ["Offset of field: aws_date_time::tz"] [:: std :: mem :: offset_of ! (aws_date_time , tz) - 10usize] ; ["Offset of field: aws_date_time::gmt_time"] [:: std :: mem :: offset_of ! (aws_date_time , gmt_time) - 16usize] ; ["Offset of field: aws_date_time::local_time"] [:: std :: mem :: offset_of ! (aws_date_time , local_time) - 72usize] ; ["Offset of field: aws_date_time::utc_assumed"] [:: std :: mem :: offset_of ! (aws_date_time , utc_assumed) - 128usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Initializes dt to be the current system time."] pub fn aws_date_time_init_now (dt : * mut aws_date_time) ; } unsafe 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) ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Initializes dt to be the time represented by date_str in format 'fmt'. Returns AWS_OP_SUCCESS if the\n string was successfully parsed, returns  AWS_OP_ERR if parsing failed.\n\n The parser is lenient regarding AWS_DATE_FORMAT_ISO_8601 vs AWS_DATE_FORMAT_ISO_8601_BASIC.\n Regardless of which you pass in, both \"2002-10-02T08:05:09Z\" and \"20021002T080509Z\" would be accepted.\n\n Notes for AWS_DATE_FORMAT_RFC822:\n If no time zone information is provided, it is assumed to be local time (please don't do this).\n\n Only time zones indicating Universal Time (e.g. Z, UT, UTC, or GMT),\n or offsets from UTC (e.g. +0100, -0700), are accepted.\n\n 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) -> :: libc :: c_int ; } unsafe 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) -> :: libc :: c_int ; } unsafe 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\n return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not\n 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) -> :: libc :: c_int ; } unsafe 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\n return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not\n 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) -> :: libc :: c_int ; } unsafe 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\n will return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not\n 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) -> :: libc :: c_int ; } unsafe 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\n return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not\n 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) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_date_time_as_epoch_secs (dt : * const aws_date_time) -> f64 ; } unsafe extern "C" { pub fn aws_date_time_as_nanos (dt : * const aws_date_time) -> u64 ; } unsafe extern "C" { pub fn aws_date_time_as_millis (dt : * const aws_date_time) -> u64 ; } unsafe extern "C" { pub fn aws_date_time_year (dt : * const aws_date_time , local_time : bool) -> u16 ; } unsafe extern "C" { pub fn aws_date_time_month (dt : * const aws_date_time , local_time : bool) -> aws_date_month ; } unsafe extern "C" { pub fn aws_date_time_month_day (dt : * const aws_date_time , local_time : bool) -> u8 ; } unsafe extern "C" { pub fn aws_date_time_day_of_week (dt : * const aws_date_time , local_time : bool) -> aws_date_day_of_week ; } unsafe extern "C" { pub fn aws_date_time_hour (dt : * const aws_date_time , local_time : bool) -> u8 ; } unsafe extern "C" { pub fn aws_date_time_minute (dt : * const aws_date_time , local_time : bool) -> u8 ; } unsafe extern "C" { pub fn aws_date_time_second (dt : * const aws_date_time , local_time : bool) -> u8 ; } unsafe extern "C" { pub fn aws_date_time_dst (dt : * const aws_date_time , local_time : bool) -> bool ; } unsafe 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 ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_connection_manager { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_socket_options { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_tls_connection_options { _unused : [u8 ; 0] , } pub type aws_http_connection_manager_on_connection_setup_fn = :: std :: option :: Option < unsafe extern "C" fn (connection : * mut aws_http_connection , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_http_connection_manager_shutdown_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " Metrics for logging and debugging purpose."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_manager_metrics { # [doc = " The number of additional concurrent requests that can be supported by the HTTP manager without needing to\n establish additional connections to the target server.\n\n For connection manager, it equals to connections that's idle.\n For stream manager, it equals to the number of streams that are possible to be made without creating new\n connection, although the implementation can create new connection without fully filling it."] pub available_concurrency : usize , pub pending_concurrency_acquires : usize , pub leased_concurrency : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_manager_metrics"] [:: std :: mem :: size_of :: < aws_http_manager_metrics > () - 24usize] ; ["Alignment of aws_http_manager_metrics"] [:: std :: mem :: align_of :: < aws_http_manager_metrics > () - 8usize] ; ["Offset of field: aws_http_manager_metrics::available_concurrency"] [:: std :: mem :: offset_of ! (aws_http_manager_metrics , available_concurrency) - 0usize] ; ["Offset of field: aws_http_manager_metrics::pending_concurrency_acquires"] [:: std :: mem :: offset_of ! (aws_http_manager_metrics , pending_concurrency_acquires) - 8usize] ; ["Offset of field: aws_http_manager_metrics::leased_concurrency"] [:: std :: mem :: offset_of ! (aws_http_manager_metrics , leased_concurrency) - 16usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_connection_manager_options { pub bootstrap : * mut aws_client_bootstrap , pub initial_window_size : usize , pub socket_options : * const aws_socket_options , # [doc = " Optional (ignored if 0).\n After a request is fully sent, if the server does not begin responding within N milliseconds,\n then fail with AWS_ERROR_HTTP_RESPONSE_FIRST_BYTE_TIMEOUT.\n This can be overridden per-request by aws_http_make_request_options.response_first_byte_timeout_ms.\n TODO: Only supported in HTTP/1.1 now, support it in HTTP/2"] pub response_first_byte_timeout_ms : u64 , # [doc = " Options to create secure (HTTPS) connections.\n For secure connections, set \"h2\" in the ALPN string for HTTP/2, otherwise HTTP/1.1 is used.\n\n Leave NULL to create cleartext (HTTP) connections.\n For cleartext connections, use `http2_prior_knowledge` (RFC-7540 3.4)\n to control whether that are treated as HTTP/1.1 or HTTP/2."] pub tls_connection_options : * const aws_tls_connection_options , # [doc = " Specify whether you have prior knowledge that cleartext (HTTP) connections are HTTP/2 (RFC-7540 3.4).\n If false, then cleartext connections are treated as HTTP/1.1.\n It is illegal to set this true when secure connections are being used.\n Note that upgrading from HTTP/1.1 to HTTP/2 is not supported (RFC-7540 3.2)."] pub http2_prior_knowledge : bool , pub monitoring_options : * const aws_http_connection_monitoring_options , pub host : aws_byte_cursor , pub port : u32 , # [doc = " Optional.\n HTTP/2 specific configuration. Check `struct aws_http2_connection_options` for details of each config"] pub initial_settings_array : * const aws_http2_setting , pub num_initial_settings : usize , pub max_closed_streams : usize , pub http2_conn_manual_window_management : bool , pub proxy_options : * const aws_http_proxy_options , pub proxy_ev_settings : * const proxy_env_var_settings , pub max_connections : usize , pub shutdown_complete_user_data : * mut :: libc :: c_void , pub shutdown_complete_callback : aws_http_connection_manager_shutdown_complete_fn , # [doc = " If set to true, the read back pressure mechanism will be enabled."] pub enable_read_back_pressure : bool , # [doc = " If set to a non-zero value, then connections that stay in the pool longer than the specified\n timeout will be closed automatically."] pub max_connection_idle_in_milliseconds : u64 , # [doc = " If set to a non-zero value, aws_http_connection_manager_acquire_connection() calls\n will give up after waiting this long for a connection from the pool,\n failing with error AWS_ERROR_HTTP_CONNECTION_MANAGER_ACQUISITION_TIMEOUT."] pub connection_acquisition_timeout_ms : u64 , pub max_pending_connection_acquisitions : u64 , # [doc = " THIS IS AN EXPERIMENTAL AND UNSTABLE API\n (Optional)\n An array of network interface names. The manager will distribute the\n connections across network interface names provided in this array. If any interface name is invalid, goes down,\n or has any issues like network access, you will see connection failures. If\n `socket_options.network_interface_name` is also set, an `AWS_ERROR_INVALID_ARGUMENT` error will be raised.\n\n This option is only supported on Linux, MacOS, and platforms that have either SO_BINDTODEVICE or IP_BOUND_IF. It\n is not supported on Windows. `AWS_ERROR_PLATFORM_NOT_SUPPORTED` will be raised on unsupported platforms."] pub network_interface_names_array : * const aws_byte_cursor , pub num_network_interface_names : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_connection_manager_options"] [:: std :: mem :: size_of :: < aws_http_connection_manager_options > () - 200usize] ; ["Alignment of aws_http_connection_manager_options"] [:: std :: mem :: align_of :: < aws_http_connection_manager_options > () - 8usize] ; ["Offset of field: aws_http_connection_manager_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , bootstrap) - 0usize] ; ["Offset of field: aws_http_connection_manager_options::initial_window_size"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , initial_window_size) - 8usize] ; ["Offset of field: aws_http_connection_manager_options::socket_options"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , socket_options) - 16usize] ; ["Offset of field: aws_http_connection_manager_options::response_first_byte_timeout_ms"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , response_first_byte_timeout_ms) - 24usize] ; ["Offset of field: aws_http_connection_manager_options::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , tls_connection_options) - 32usize] ; ["Offset of field: aws_http_connection_manager_options::http2_prior_knowledge"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , http2_prior_knowledge) - 40usize] ; ["Offset of field: aws_http_connection_manager_options::monitoring_options"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , monitoring_options) - 48usize] ; ["Offset of field: aws_http_connection_manager_options::host"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , host) - 56usize] ; ["Offset of field: aws_http_connection_manager_options::port"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , port) - 72usize] ; ["Offset of field: aws_http_connection_manager_options::initial_settings_array"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , initial_settings_array) - 80usize] ; ["Offset of field: aws_http_connection_manager_options::num_initial_settings"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , num_initial_settings) - 88usize] ; ["Offset of field: aws_http_connection_manager_options::max_closed_streams"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , max_closed_streams) - 96usize] ; ["Offset of field: aws_http_connection_manager_options::http2_conn_manual_window_management"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , http2_conn_manual_window_management) - 104usize] ; ["Offset of field: aws_http_connection_manager_options::proxy_options"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , proxy_options) - 112usize] ; ["Offset of field: aws_http_connection_manager_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , proxy_ev_settings) - 120usize] ; ["Offset of field: aws_http_connection_manager_options::max_connections"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , max_connections) - 128usize] ; ["Offset of field: aws_http_connection_manager_options::shutdown_complete_user_data"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , shutdown_complete_user_data) - 136usize] ; ["Offset of field: aws_http_connection_manager_options::shutdown_complete_callback"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , shutdown_complete_callback) - 144usize] ; ["Offset of field: aws_http_connection_manager_options::enable_read_back_pressure"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , enable_read_back_pressure) - 152usize] ; ["Offset of field: aws_http_connection_manager_options::max_connection_idle_in_milliseconds"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , max_connection_idle_in_milliseconds) - 160usize] ; ["Offset of field: aws_http_connection_manager_options::connection_acquisition_timeout_ms"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , connection_acquisition_timeout_ms) - 168usize] ; ["Offset of field: aws_http_connection_manager_options::max_pending_connection_acquisitions"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , max_pending_connection_acquisitions) - 176usize] ; ["Offset of field: aws_http_connection_manager_options::network_interface_names_array"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , network_interface_names_array) - 184usize] ; ["Offset of field: aws_http_connection_manager_options::num_network_interface_names"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , num_network_interface_names) - 192usize] ; } ; impl Default for aws_http_connection_manager_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 () } } } unsafe extern "C" { pub fn aws_http_connection_manager_acquire (manager : * mut aws_http_connection_manager) ; } unsafe extern "C" { pub fn aws_http_connection_manager_release (manager : * mut aws_http_connection_manager) ; } unsafe extern "C" { pub fn aws_http_connection_manager_new (allocator : * mut aws_allocator , options : * const aws_http_connection_manager_options) -> * mut aws_http_connection_manager ; } unsafe extern "C" { pub fn aws_http_connection_manager_acquire_connection (manager : * mut aws_http_connection_manager , callback : aws_http_connection_manager_on_connection_setup_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_http_connection_manager_release_connection (manager : * mut aws_http_connection_manager , connection : * mut aws_http_connection) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Fetch the current manager metrics from connection manager."] pub fn aws_http_connection_manager_fetch_metrics (manager : * const aws_http_connection_manager , out_metrics : * mut aws_http_manager_metrics) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop_group { _unused : [u8 ; 0] , } # [doc = " Invoked upon the acquisition, or failure to acquire a retry token. This function will always be invoked if and only\n if aws_retry_strategy_acquire_retry_token() returns AWS_OP_SUCCESS. It will never be invoked synchronously from\n aws_retry_strategy_acquire_retry_token(). Token will always be NULL if error_code is non-zero, and vice-versa. If\n token is non-null, it will have a reference count of 1, and you must call aws_retry_token_release() on it later. See\n the comments for aws_retry_strategy_on_retry_ready_fn for more info."] pub type aws_retry_strategy_on_retry_token_acquired_fn = :: std :: option :: Option < unsafe extern "C" fn (retry_strategy : * mut aws_retry_strategy , error_code : :: libc :: c_int , token : * mut aws_retry_token , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked after a successful call to aws_retry_strategy_schedule_retry(). This function will always be invoked if and\n only if aws_retry_strategy_schedule_retry() returns AWS_OP_SUCCESS. It will never be invoked synchronously from\n aws_retry_strategy_schedule_retry(). After attempting the operation, either call aws_retry_strategy_schedule_retry()\n with an aws_retry_error_type or call aws_retry_token_record_success() and then release the token via.\n aws_retry_token_release()."] pub type aws_retry_strategy_on_retry_ready_fn = :: std :: option :: Option < unsafe extern "C" fn (token : * mut aws_retry_token , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Optional function to supply your own generate random implementation"] pub type aws_generate_random_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) -> u64 > ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_retry_error_type { # [doc = " This is a connection level error such as a socket timeout, socket connect error, tls negotiation timeout etc...\n Typically these should never be applied for non-idempotent request types since in this scenario, it's impossible\n to know whether the operation had a side effect on the server."] AWS_RETRY_ERROR_TYPE_TRANSIENT = 0 , # [doc = " This is an error where the server explicitly told the client to back off, such as a 429 or 503 Http error."] AWS_RETRY_ERROR_TYPE_THROTTLING = 1 , # [doc = " This is a server error that isn't explicitly throttling but is considered by the client\n to be something that should be retried."] AWS_RETRY_ERROR_TYPE_SERVER_ERROR = 2 , # [doc = " Doesn't count against any budgets. This could be something like a 401 challenge in Http."] AWS_RETRY_ERROR_TYPE_CLIENT_ERROR = 3 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_retry_strategy_vtable { pub destroy : :: std :: option :: Option < unsafe extern "C" fn (retry_strategy : * mut aws_retry_strategy) > , pub acquire_token : :: std :: option :: Option < unsafe extern "C" fn (retry_strategy : * mut aws_retry_strategy , partition_id : * const aws_byte_cursor , on_acquired : aws_retry_strategy_on_retry_token_acquired_fn , user_data : * mut :: libc :: c_void , timeout_ms : u64) -> :: libc :: c_int > , pub schedule_retry : :: std :: option :: Option < unsafe extern "C" fn (token : * mut aws_retry_token , error_type : aws_retry_error_type , retry_ready : aws_retry_strategy_on_retry_ready_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > , pub record_success : :: std :: option :: Option < unsafe extern "C" fn (token : * mut aws_retry_token) -> :: libc :: c_int > , pub release_token : :: std :: option :: Option < unsafe extern "C" fn (token : * mut aws_retry_token) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_retry_strategy_vtable"] [:: std :: mem :: size_of :: < aws_retry_strategy_vtable > () - 40usize] ; ["Alignment of aws_retry_strategy_vtable"] [:: std :: mem :: align_of :: < aws_retry_strategy_vtable > () - 8usize] ; ["Offset of field: aws_retry_strategy_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , destroy) - 0usize] ; ["Offset of field: aws_retry_strategy_vtable::acquire_token"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , acquire_token) - 8usize] ; ["Offset of field: aws_retry_strategy_vtable::schedule_retry"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , schedule_retry) - 16usize] ; ["Offset of field: aws_retry_strategy_vtable::record_success"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , record_success) - 24usize] ; ["Offset of field: aws_retry_strategy_vtable::release_token"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , release_token) - 32usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_retry_strategy { pub allocator : * mut aws_allocator , pub vtable : * mut aws_retry_strategy_vtable , pub ref_count : aws_atomic_var , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_retry_strategy"] [:: std :: mem :: size_of :: < aws_retry_strategy > () - 32usize] ; ["Alignment of aws_retry_strategy"] [:: std :: mem :: align_of :: < aws_retry_strategy > () - 8usize] ; ["Offset of field: aws_retry_strategy::allocator"] [:: std :: mem :: offset_of ! (aws_retry_strategy , allocator) - 0usize] ; ["Offset of field: aws_retry_strategy::vtable"] [:: std :: mem :: offset_of ! (aws_retry_strategy , vtable) - 8usize] ; ["Offset of field: aws_retry_strategy::ref_count"] [:: std :: mem :: offset_of ! (aws_retry_strategy , ref_count) - 16usize] ; ["Offset of field: aws_retry_strategy::impl_"] [:: std :: mem :: offset_of ! (aws_retry_strategy , impl_) - 24usize] ; } ; impl Default for aws_retry_strategy { 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)] pub struct aws_retry_token { pub allocator : * mut aws_allocator , pub retry_strategy : * mut aws_retry_strategy , pub ref_count : aws_atomic_var , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_retry_token"] [:: std :: mem :: size_of :: < aws_retry_token > () - 32usize] ; ["Alignment of aws_retry_token"] [:: std :: mem :: align_of :: < aws_retry_token > () - 8usize] ; ["Offset of field: aws_retry_token::allocator"] [:: std :: mem :: offset_of ! (aws_retry_token , allocator) - 0usize] ; ["Offset of field: aws_retry_token::retry_strategy"] [:: std :: mem :: offset_of ! (aws_retry_token , retry_strategy) - 8usize] ; ["Offset of field: aws_retry_token::ref_count"] [:: std :: mem :: offset_of ! (aws_retry_token , ref_count) - 16usize] ; ["Offset of field: aws_retry_token::impl_"] [:: std :: mem :: offset_of ! (aws_retry_token , impl_) - 24usize] ; } ; impl Default for aws_retry_token { 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 (u32)] # [non_exhaustive] # [doc = " Jitter mode for exponential backoff.\n\n For a great writeup on these options see:\n https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_exponential_backoff_jitter_mode { AWS_EXPONENTIAL_BACKOFF_JITTER_DEFAULT = 0 , AWS_EXPONENTIAL_BACKOFF_JITTER_NONE = 1 , AWS_EXPONENTIAL_BACKOFF_JITTER_FULL = 2 , AWS_EXPONENTIAL_BACKOFF_JITTER_DECORRELATED = 3 , } # [doc = " Options for exponential backoff retry strategy. el_group must be set, any other option, if set to 0 will signify\n \"use defaults\""] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_exponential_backoff_retry_options { pub el_group : * mut aws_event_loop_group , pub max_retries : usize , pub backoff_scale_factor_ms : u32 , pub max_backoff_secs : u32 , # [doc = " Jitter mode to use, see comments for aws_exponential_backoff_jitter_mode.\n Default is AWS_EXPONENTIAL_BACKOFF_JITTER_DEFAULT"] pub jitter_mode : aws_exponential_backoff_jitter_mode , # [doc = " Deprecated. Use generate_random_impl instead\n By default this will be set to use aws_device_random. If you want something else, set it here."] pub generate_random : :: std :: option :: Option < unsafe extern "C" fn () -> u64 > , pub generate_random_impl : aws_generate_random_fn , # [doc = " Optional user data for the generate random generate_random_impl."] pub generate_random_user_data : * mut :: libc :: c_void , # [doc = " Optional shutdown callback that gets invoked, with appropriate user data,\n when the resources used by the retry_strategy are no longer in use."] pub shutdown_options : * const aws_shutdown_callback_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_exponential_backoff_retry_options"] [:: std :: mem :: size_of :: < aws_exponential_backoff_retry_options > () - 64usize] ; ["Alignment of aws_exponential_backoff_retry_options"] [:: std :: mem :: align_of :: < aws_exponential_backoff_retry_options > () - 8usize] ; ["Offset of field: aws_exponential_backoff_retry_options::el_group"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , el_group) - 0usize] ; ["Offset of field: aws_exponential_backoff_retry_options::max_retries"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , max_retries) - 8usize] ; ["Offset of field: aws_exponential_backoff_retry_options::backoff_scale_factor_ms"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , backoff_scale_factor_ms) - 16usize] ; ["Offset of field: aws_exponential_backoff_retry_options::max_backoff_secs"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , max_backoff_secs) - 20usize] ; ["Offset of field: aws_exponential_backoff_retry_options::jitter_mode"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , jitter_mode) - 24usize] ; ["Offset of field: aws_exponential_backoff_retry_options::generate_random"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , generate_random) - 32usize] ; ["Offset of field: aws_exponential_backoff_retry_options::generate_random_impl"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , generate_random_impl) - 40usize] ; ["Offset of field: aws_exponential_backoff_retry_options::generate_random_user_data"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , generate_random_user_data) - 48usize] ; ["Offset of field: aws_exponential_backoff_retry_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , shutdown_options) - 56usize] ; } ; impl Default for aws_exponential_backoff_retry_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)] pub struct aws_no_retry_options { # [doc = " Optional shutdown callback that gets invoked, with appropriate user data,\n when the resources used by the retry_strategy are no longer in use."] pub shutdown_options : * const aws_shutdown_callback_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_no_retry_options"] [:: std :: mem :: size_of :: < aws_no_retry_options > () - 8usize] ; ["Alignment of aws_no_retry_options"] [:: std :: mem :: align_of :: < aws_no_retry_options > () - 8usize] ; ["Offset of field: aws_no_retry_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_no_retry_options , shutdown_options) - 0usize] ; } ; impl Default for aws_no_retry_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)] pub struct aws_standard_retry_options { pub backoff_retry_options : aws_exponential_backoff_retry_options , # [doc = " capacity for partitions. Defaults to 500"] pub initial_bucket_capacity : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_standard_retry_options"] [:: std :: mem :: size_of :: < aws_standard_retry_options > () - 72usize] ; ["Alignment of aws_standard_retry_options"] [:: std :: mem :: align_of :: < aws_standard_retry_options > () - 8usize] ; ["Offset of field: aws_standard_retry_options::backoff_retry_options"] [:: std :: mem :: offset_of ! (aws_standard_retry_options , backoff_retry_options) - 0usize] ; ["Offset of field: aws_standard_retry_options::initial_bucket_capacity"] [:: std :: mem :: offset_of ! (aws_standard_retry_options , initial_bucket_capacity) - 64usize] ; } ; impl Default for aws_standard_retry_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 () } } } unsafe extern "C" { # [doc = " Acquire a reference count on retry_strategy."] pub fn aws_retry_strategy_acquire (retry_strategy : * mut aws_retry_strategy) ; } unsafe extern "C" { # [doc = " Releases a reference count on retry_strategy."] pub fn aws_retry_strategy_release (retry_strategy : * mut aws_retry_strategy) ; } unsafe extern "C" { # [doc = " Attempts to acquire a retry token for use with retries. On success, on_acquired will be invoked when a token is\n available, or an error will be returned if the timeout expires. partition_id identifies operations that should be\n grouped together. This allows for more sophisticated strategies such as AIMD and circuit breaker patterns. Pass NULL\n to use the global partition."] pub fn aws_retry_strategy_acquire_retry_token (retry_strategy : * mut aws_retry_strategy , partition_id : * const aws_byte_cursor , on_acquired : aws_retry_strategy_on_retry_token_acquired_fn , user_data : * mut :: libc :: c_void , timeout_ms : u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Schedules a retry based on the backoff and token based strategies. retry_ready is invoked when the retry is either\n ready for execution or if it has been canceled due to application shutdown.\n\n This function can return an error to reject the retry attempt if, for example, a circuit breaker has opened. If this\n occurs users should fail their calls back to their callers.\n\n error_type is used for book keeping. See the comments above for aws_retry_error_type."] pub fn aws_retry_strategy_schedule_retry (token : * mut aws_retry_token , error_type : aws_retry_error_type , retry_ready : aws_retry_strategy_on_retry_ready_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Records a successful retry. This is used for making future decisions to open up token buckets, AIMD breakers etc...\n some strategies such as exponential backoff will ignore this, but you should always call it after a successful\n operation or your system will never recover during an outage."] pub fn aws_retry_token_record_success (token : * mut aws_retry_token) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Increments reference count for token. This should be called any time you seat the token to a pointer you own."] pub fn aws_retry_token_acquire (token : * mut aws_retry_token) ; } unsafe extern "C" { # [doc = " Releases the reference count for token. This should always be invoked after either calling\n aws_retry_strategy_schedule_retry() and failing, or after calling aws_retry_token_record_success()."] pub fn aws_retry_token_release (token : * mut aws_retry_token) ; } unsafe extern "C" { # [doc = " Creates a retry strategy using exponential backoff. This strategy does not perform any bookkeeping on error types and\n success. There is no circuit breaker functionality in here. See the comments above for\n aws_exponential_backoff_retry_options."] pub fn aws_retry_strategy_new_exponential_backoff (allocator : * mut aws_allocator , config : * const aws_exponential_backoff_retry_options) -> * mut aws_retry_strategy ; } unsafe extern "C" { # [doc = " This is a retry implementation that cuts off traffic if it's\n detected that an endpoint partition is having availability\n problems. This is necessary to keep from making outages worse\n by scheduling work that's unlikely to succeed yet increases\n load on an already ailing system.\n\n We do this by creating a bucket for each partition. A partition\n is an arbitrary specifier. It can be anything: a region, a service,\n a combination of region and service, a literal dns name.... doesn't matter.\n\n Each bucket has a budget for maximum allowed retries. Different types of events\n carry different weights. Things that indicate an unhealthy partition such as\n transient errors (timeouts, unhealthy connection etc...) cost more.\n A retry for any other reason (service sending a 5xx response code) cost a bit less.\n When a retry is attempted this capacity is leased out to the retry. On success it is\n released back to the capacity pool. On failure, it remains leased.\n Operations that succeed without a retry slowly restore the capacity pool.\n\n If a partition runs out of capacity it is assumed unhealthy and retries will be blocked\n until capacity returns to the pool. To prevent a partition from staying unhealthy after\n an outage has recovered, new requests that succeed without a retry will increase the capacity\n slowly ( a new request gets a payback lease of 1, but the lease is never actually deducted from the capacity pool)."] pub fn aws_retry_strategy_new_standard (allocator : * mut aws_allocator , config : * const aws_standard_retry_options) -> * mut aws_retry_strategy ; } unsafe extern "C" { # [doc = " This retry strategy is used to disable retries. Passed config can be null.\n Calling `aws_retry_strategy_acquire_retry_token` will raise error `AWS_IO_RETRY_PERMISSION_DENIED`.\n Calling any function apart from the `aws_retry_strategy_acquire_retry_token` and `aws_retry_strategy_release` will\n result in a fatal error."] pub fn aws_retry_strategy_new_no_retry (allocator : * mut aws_allocator , config : * const aws_no_retry_options) -> * mut aws_retry_strategy ; } pub type aws_imds_client_shutdown_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " Optional callback and user data to be invoked when an imds client has fully shut down"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_imds_client_shutdown_options { pub shutdown_callback : aws_imds_client_shutdown_completed_fn , pub shutdown_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_imds_client_shutdown_options"] [:: std :: mem :: size_of :: < aws_imds_client_shutdown_options > () - 16usize] ; ["Alignment of aws_imds_client_shutdown_options"] [:: std :: mem :: align_of :: < aws_imds_client_shutdown_options > () - 8usize] ; ["Offset of field: aws_imds_client_shutdown_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_imds_client_shutdown_options , shutdown_callback) - 0usize] ; ["Offset of field: aws_imds_client_shutdown_options::shutdown_user_data"] [:: std :: mem :: offset_of ! (aws_imds_client_shutdown_options , shutdown_user_data) - 8usize] ; } ; impl Default for aws_imds_client_shutdown_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 () } } } # [doc = " Configuration options when creating an imds client"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_imds_client_options { pub shutdown_options : aws_imds_client_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub retry_strategy : * mut aws_retry_strategy , pub proxy_ev_settings : * const proxy_env_var_settings , pub imds_version : aws_imds_protocol_version , pub ec2_metadata_v1_disabled : bool , pub function_table : * mut aws_auth_http_system_vtable , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_imds_client_options"] [:: std :: mem :: size_of :: < aws_imds_client_options > () - 56usize] ; ["Alignment of aws_imds_client_options"] [:: std :: mem :: align_of :: < aws_imds_client_options > () - 8usize] ; ["Offset of field: aws_imds_client_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_imds_client_options , shutdown_options) - 0usize] ; ["Offset of field: aws_imds_client_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_imds_client_options , bootstrap) - 16usize] ; ["Offset of field: aws_imds_client_options::retry_strategy"] [:: std :: mem :: offset_of ! (aws_imds_client_options , retry_strategy) - 24usize] ; ["Offset of field: aws_imds_client_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_imds_client_options , proxy_ev_settings) - 32usize] ; ["Offset of field: aws_imds_client_options::imds_version"] [:: std :: mem :: offset_of ! (aws_imds_client_options , imds_version) - 40usize] ; ["Offset of field: aws_imds_client_options::ec2_metadata_v1_disabled"] [:: std :: mem :: offset_of ! (aws_imds_client_options , ec2_metadata_v1_disabled) - 44usize] ; ["Offset of field: aws_imds_client_options::function_table"] [:: std :: mem :: offset_of ! (aws_imds_client_options , function_table) - 48usize] ; } ; impl Default for aws_imds_client_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_imds_client_on_get_resource_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (resource : * const aws_byte_buf , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-categories.html"] # [repr (C)] pub struct aws_imds_iam_profile { pub last_updated : aws_date_time , pub instance_profile_arn : aws_byte_cursor , pub instance_profile_id : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_imds_iam_profile"] [:: std :: mem :: size_of :: < aws_imds_iam_profile > () - 168usize] ; ["Alignment of aws_imds_iam_profile"] [:: std :: mem :: align_of :: < aws_imds_iam_profile > () - 8usize] ; ["Offset of field: aws_imds_iam_profile::last_updated"] [:: std :: mem :: offset_of ! (aws_imds_iam_profile , last_updated) - 0usize] ; ["Offset of field: aws_imds_iam_profile::instance_profile_arn"] [:: std :: mem :: offset_of ! (aws_imds_iam_profile , instance_profile_arn) - 136usize] ; ["Offset of field: aws_imds_iam_profile::instance_profile_id"] [:: std :: mem :: offset_of ! (aws_imds_iam_profile , instance_profile_id) - 152usize] ; } ; impl Default for aws_imds_iam_profile { 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 = " Block of per-instance EC2-specific data\n\n https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html"] # [repr (C)] pub struct aws_imds_instance_info { pub marketplace_product_codes : aws_array_list , pub availability_zone : aws_byte_cursor , pub private_ip : aws_byte_cursor , pub version : aws_byte_cursor , pub instance_id : aws_byte_cursor , pub billing_products : aws_array_list , pub instance_type : aws_byte_cursor , pub account_id : aws_byte_cursor , pub image_id : aws_byte_cursor , pub pending_time : aws_date_time , pub architecture : aws_byte_cursor , pub kernel_id : aws_byte_cursor , pub ramdisk_id : aws_byte_cursor , pub region : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_imds_instance_info"] [:: std :: mem :: size_of :: < aws_imds_instance_info > () - 392usize] ; ["Alignment of aws_imds_instance_info"] [:: std :: mem :: align_of :: < aws_imds_instance_info > () - 8usize] ; ["Offset of field: aws_imds_instance_info::marketplace_product_codes"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , marketplace_product_codes) - 0usize] ; ["Offset of field: aws_imds_instance_info::availability_zone"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , availability_zone) - 40usize] ; ["Offset of field: aws_imds_instance_info::private_ip"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , private_ip) - 56usize] ; ["Offset of field: aws_imds_instance_info::version"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , version) - 72usize] ; ["Offset of field: aws_imds_instance_info::instance_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , instance_id) - 88usize] ; ["Offset of field: aws_imds_instance_info::billing_products"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , billing_products) - 104usize] ; ["Offset of field: aws_imds_instance_info::instance_type"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , instance_type) - 144usize] ; ["Offset of field: aws_imds_instance_info::account_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , account_id) - 160usize] ; ["Offset of field: aws_imds_instance_info::image_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , image_id) - 176usize] ; ["Offset of field: aws_imds_instance_info::pending_time"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , pending_time) - 192usize] ; ["Offset of field: aws_imds_instance_info::architecture"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , architecture) - 328usize] ; ["Offset of field: aws_imds_instance_info::kernel_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , kernel_id) - 344usize] ; ["Offset of field: aws_imds_instance_info::ramdisk_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , ramdisk_id) - 360usize] ; ["Offset of field: aws_imds_instance_info::region"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , region) - 376usize] ; } ; impl Default for aws_imds_instance_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 () } } } pub type aws_imds_client_on_get_array_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (array : * const aws_array_list , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_imds_client_on_get_credentials_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (credentials : * const aws_credentials , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_imds_client_on_get_iam_profile_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (iam_profile_info : * const aws_imds_iam_profile , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_imds_client_on_get_instance_info_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (instance_info : * const aws_imds_instance_info , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " AWS EC2 Metadata Client is used to retrieve AWS EC2 Instance Metadata info."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_imds_client { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " Creates a new imds client\n\n @param allocator memory allocator to use for creation and queries\n @param options configuration options for the imds client\n\n @return a newly-constructed imds client, or NULL on failure"] pub fn aws_imds_client_new (allocator : * mut aws_allocator , options : * const aws_imds_client_options) -> * mut aws_imds_client ; } unsafe extern "C" { # [doc = " Increments the ref count on the client\n\n @param client imds client to acquire a reference to"] pub fn aws_imds_client_acquire (client : * mut aws_imds_client) ; } unsafe extern "C" { # [doc = " Decrements the ref count on the client\n\n @param client imds client to release a reference to"] pub fn aws_imds_client_release (client : * mut aws_imds_client) ; } unsafe extern "C" { # [doc = " Queries a generic resource (string) from the ec2 instance metadata document\n\n @param client imds client to use for the query\n @param resource_path path of the resource to query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_resource_async (client : * mut aws_imds_client , resource_path : aws_byte_cursor , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the ami id of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ami_id (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the ami launch index of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ami_launch_index (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the ami manifest path of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ami_manifest_path (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the list of ancestor ami ids of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ancestor_ami_ids (client : * mut aws_imds_client , callback : aws_imds_client_on_get_array_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the instance-action of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_action (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the instance id of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_id (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the instance type of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_type (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the mac address of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_mac_address (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the private ip address of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_private_ip_address (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the availability zone of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_availability_zone (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the product codes of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_product_codes (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the public key of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_public_key (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the ramdisk id of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ramdisk_id (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the reservation id of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_reservation_id (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the list of the security groups of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_security_groups (client : * mut aws_imds_client , callback : aws_imds_client_on_get_array_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the list of block device mappings of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_block_device_mapping (client : * mut aws_imds_client , callback : aws_imds_client_on_get_array_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the attached iam role of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_attached_iam_role (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets temporary credentials based on the attached iam role of the ec2 instance\n\n @param client imds client to use for the query\n @param iam_role_name iam role name to get temporary credentials through\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_credentials (client : * mut aws_imds_client , iam_role_name : aws_byte_cursor , callback : aws_imds_client_on_get_credentials_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the iam profile information of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_iam_profile (client : * mut aws_imds_client , callback : aws_imds_client_on_get_iam_profile_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the user data of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_user_data (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the signature of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_signature (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the instance information data block of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_info (client : * mut aws_imds_client , callback : aws_imds_client_on_get_instance_info_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_hash_vtable { pub alg_name : * const :: libc :: c_char , pub provider : * const :: libc :: c_char , pub destroy : :: std :: option :: Option < unsafe extern "C" fn (hash : * mut aws_hash) > , pub update : :: std :: option :: Option < unsafe extern "C" fn (hash : * mut aws_hash , buf : * const aws_byte_cursor) -> :: libc :: c_int > , pub finalize : :: std :: option :: Option < unsafe extern "C" fn (hash : * mut aws_hash , out : * mut aws_byte_buf) -> :: libc :: c_int > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash_vtable"] [:: std :: mem :: size_of :: < aws_hash_vtable > () - 40usize] ; ["Alignment of aws_hash_vtable"] [:: std :: mem :: align_of :: < aws_hash_vtable > () - 8usize] ; ["Offset of field: aws_hash_vtable::alg_name"] [:: std :: mem :: offset_of ! (aws_hash_vtable , alg_name) - 0usize] ; ["Offset of field: aws_hash_vtable::provider"] [:: std :: mem :: offset_of ! (aws_hash_vtable , provider) - 8usize] ; ["Offset of field: aws_hash_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_hash_vtable , destroy) - 16usize] ; ["Offset of field: aws_hash_vtable::update"] [:: std :: mem :: offset_of ! (aws_hash_vtable , update) - 24usize] ; ["Offset of field: aws_hash_vtable::finalize"] [:: std :: mem :: offset_of ! (aws_hash_vtable , finalize) - 32usize] ; } ; impl Default for aws_hash_vtable { 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)] pub struct aws_hash { pub allocator : * mut aws_allocator , pub vtable : * mut aws_hash_vtable , pub digest_size : usize , pub good : bool , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash"] [:: std :: mem :: size_of :: < aws_hash > () - 40usize] ; ["Alignment of aws_hash"] [:: std :: mem :: align_of :: < aws_hash > () - 8usize] ; ["Offset of field: aws_hash::allocator"] [:: std :: mem :: offset_of ! (aws_hash , allocator) - 0usize] ; ["Offset of field: aws_hash::vtable"] [:: std :: mem :: offset_of ! (aws_hash , vtable) - 8usize] ; ["Offset of field: aws_hash::digest_size"] [:: std :: mem :: offset_of ! (aws_hash , digest_size) - 16usize] ; ["Offset of field: aws_hash::good"] [:: std :: mem :: offset_of ! (aws_hash , good) - 24usize] ; ["Offset of field: aws_hash::impl_"] [:: std :: mem :: offset_of ! (aws_hash , impl_) - 32usize] ; } ; impl Default for aws_hash { 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_hash_new_fn = :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator) -> * mut aws_hash > ; unsafe extern "C" { # [doc = " Allocates and initializes a sha512 hash instance."] pub fn aws_sha512_new (allocator : * mut aws_allocator) -> * mut aws_hash ; } unsafe extern "C" { # [doc = " Allocates and initializes a sha256 hash instance."] pub fn aws_sha256_new (allocator : * mut aws_allocator) -> * mut aws_hash ; } unsafe extern "C" { # [doc = " Allocates and initializes a sha1 hash instance."] pub fn aws_sha1_new (allocator : * mut aws_allocator) -> * mut aws_hash ; } unsafe extern "C" { # [doc = " Allocates and initializes an md5 hash instance."] pub fn aws_md5_new (allocator : * mut aws_allocator) -> * mut aws_hash ; } unsafe extern "C" { # [doc = " Cleans up and deallocates hash."] pub fn aws_hash_destroy (hash : * mut aws_hash) ; } unsafe extern "C" { # [doc = " Updates the running hash with to_hash. this can be called multiple times."] pub fn aws_hash_update (hash : * mut aws_hash , to_hash : * const aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Completes the hash computation and writes the final digest to output.\n Allocation of output is the caller's responsibility. If you specify\n truncate_to to something other than 0, the output will be truncated to that\n number of bytes. For example, if you want a SHA256 digest as the first 16\n bytes, set truncate_to to 16. If you want the full digest size, just set this\n to 0."] pub fn aws_hash_finalize (hash : * mut aws_hash , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Computes the md5 hash over input and writes the digest output to 'output'.\n Use this if you don't need to stream the data you're hashing and you can load\n the entire input to hash into memory."] pub fn aws_md5_compute (allocator : * mut aws_allocator , input : * const aws_byte_cursor , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Computes the sha512 hash over input and writes the digest output to 'output'.\n Use this if you don't need to stream the data you're hashing and you can load\n the entire input to hash into memory. If you specify truncate_to to something\n other than 0, the output will be truncated to that number of bytes. For\n example, if you want a SHA512 digest as the first 16 bytes, set truncate_to\n to 16. If you want the full digest size, just set this to 0."] pub fn aws_sha512_compute (allocator : * mut aws_allocator , input : * const aws_byte_cursor , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Computes the sha256 hash over input and writes the digest output to 'output'.\n Use this if you don't need to stream the data you're hashing and you can load\n the entire input to hash into memory. If you specify truncate_to to something\n other than 0, the output will be truncated to that number of bytes. For\n example, if you want a SHA256 digest as the first 16 bytes, set truncate_to\n to 16. If you want the full digest size, just set this to 0."] pub fn aws_sha256_compute (allocator : * mut aws_allocator , input : * const aws_byte_cursor , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Computes the sha1 hash over input and writes the digest output to 'output'.\n Use this if you don't need to stream the data you're hashing and you can load\n the entire input to hash into memory. If you specify truncate_to to something\n other than 0, the output will be truncated to that number of bytes. For\n example, if you want a SHA1 digest as the first 16 bytes, set truncate_to\n to 16. If you want the full digest size, just set this to 0."] pub fn aws_sha1_compute (allocator : * mut aws_allocator , input : * const aws_byte_cursor , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set the implementation of md5 to use. If you compiled without BYO_CRYPTO,\n you do not need to call this. However, if use this, we will honor it,\n regardless of compile options. This may be useful for testing purposes. If\n you did set BYO_CRYPTO, and you do not call this function you will\n segfault."] pub fn aws_set_md5_new_fn (fn_ : aws_hash_new_fn) ; } unsafe extern "C" { # [doc = " Set the implementation of sha512 to use. If you compiled without\n BYO_CRYPTO, you do not need to call this. However, if use this, we will\n honor it, regardless of compile options. This may be useful for testing\n purposes. If you did set BYO_CRYPTO, and you do not call this function\n you will segfault."] pub fn aws_set_sha512_new_fn (fn_ : aws_hash_new_fn) ; } unsafe extern "C" { # [doc = " Set the implementation of sha256 to use. If you compiled without\n BYO_CRYPTO, you do not need to call this. However, if use this, we will\n honor it, regardless of compile options. This may be useful for testing\n purposes. If you did set BYO_CRYPTO, and you do not call this function\n you will segfault."] pub fn aws_set_sha256_new_fn (fn_ : aws_hash_new_fn) ; } unsafe extern "C" { # [doc = " Set the implementation of sha1 to use. If you compiled without\n BYO_CRYPTO, you do not need to call this. However, if use this, we will\n honor it, regardless of compile options. This may be useful for testing\n purposes. If you did set BYO_CRYPTO, and you do not call this function\n you will segfault."] pub fn aws_set_sha1_new_fn (fn_ : aws_hash_new_fn) ; } unsafe extern "C" { # [doc = " The entry point function to perform a CRC32 (Ethernet, gzip) computation.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc32 parameter as an initial value unless continuing\n to update a running crc in a subsequent call."] pub fn aws_checksums_crc32 (input : * const u8 , length : :: libc :: c_int , previous_crc32 : u32) -> u32 ; } unsafe extern "C" { # [doc = " The entry point function to perform a CRC32 (Ethernet, gzip) computation.\n Supports buffer lengths up to size_t max.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc32 parameter as an initial value unless continuing\n to update a running crc in a subsequent call."] pub fn aws_checksums_crc32_ex (input : * const u8 , length : usize , previous_crc32 : u32) -> u32 ; } unsafe extern "C" { # [doc = " The entry point function to perform a Castagnoli CRC32c (iSCSI) computation.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc32 parameter as an initial value unless continuing\n to update a running crc in a subsequent call."] pub fn aws_checksums_crc32c (input : * const u8 , length : :: libc :: c_int , previous_crc32c : u32) -> u32 ; } unsafe extern "C" { # [doc = " The entry point function to perform a Castagnoli CRC32c (iSCSI) computation.\n Supports buffer lengths up to size_t max.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc32 parameter as an initial value unless continuing\n to update a running crc in a subsequent call."] pub fn aws_checksums_crc32c_ex (input : * const u8 , length : usize , previous_crc32c : u32) -> u32 ; } unsafe extern "C" { # [doc = " The entry point function to perform a CRC64-NVME (a.k.a. CRC64-Rocksoft) computation.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc64 parameter as an initial value unless continuing\n to update a running crc in a subsequent call.\n There are many variants of CRC64 algorithms. This CRC64 variant is bit-reflected (based on\n the non bit-reflected polynomial 0xad93d23594c93659) and inverts the CRC input and output bits."] pub fn aws_checksums_crc64nvme (input : * const u8 , length : :: libc :: c_int , previous_crc64 : u64) -> u64 ; } unsafe extern "C" { # [doc = " The entry point function to perform a CRC64-NVME (a.k.a. CRC64-Rocksoft) computation.\n Supports buffer lengths up to size_t max.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc64 parameter as an initial value unless continuing\n to update a running crc in a subsequent call.\n There are many variants of CRC64 algorithms. This CRC64 variant is bit-reflected (based on\n the non bit-reflected polynomial 0xad93d23594c93659) and inverts the CRC input and output bits."] pub fn aws_checksums_crc64nvme_ex (input : * const u8 , length : usize , previous_crc64 : u64) -> u64 ; } unsafe extern "C" { # [doc = " Combines two CRC32 (Ethernet, gzip) checksums computed over separate data blocks.\n This is equivalent to computing the CRC32 of the concatenated data blocks without\n having to re-scan the data.\n\n Given:\n   crc1 = CRC32(data_block_A)\n   crc2 = CRC32(data_block_B)\n\n This function computes:\n   result = CRC32(data_block_A || data_block_B)\n\n @param crc1 The CRC32 checksum of the first data block\n @param crc2 The CRC32 checksum of the second data block\n @param len2 The length (in bytes) of the original data that produced crc2.\n             This is NOT the size of the checksum (which is always 4 bytes),\n             but rather the size of the data block that was checksummed.\n @return The combined CRC32 checksum as if computed over the concatenated data"] pub fn aws_checksums_crc32_combine (crc1 : u32 , crc2 : u32 , len2 : u64) -> u32 ; } unsafe extern "C" { # [doc = " Combines two CRC32C (Castagnoli, iSCSI) checksums computed over separate data blocks.\n This is equivalent to computing the CRC32C of the concatenated data blocks without\n having to re-scan the data.\n\n Given:\n   crc1 = CRC32C(data_block_A)\n   crc2 = CRC32C(data_block_B)\n\n This function computes:\n   result = CRC32C(data_block_A || data_block_B)\n\n @param crc1 The CRC32C checksum of the first data block\n @param crc2 The CRC32C checksum of the second data block\n @param len2 The length (in bytes) of the original data that produced crc2.\n             This is NOT the size of the checksum (which is always 4 bytes),\n             but rather the size of the data block that was checksummed.\n @return The combined CRC32C checksum as if computed over the concatenated data"] pub fn aws_checksums_crc32c_combine (crc1 : u32 , crc2 : u32 , len2 : u64) -> u32 ; } unsafe extern "C" { # [doc = " Combines two CRC64-NVME (CRC64-Rocksoft) checksums computed over separate data blocks.\n This is equivalent to computing the CRC64-NVME of the concatenated data blocks without\n having to re-scan the data.\n\n Given:\n   crc1 = CRC64_NVME(data_block_A)\n   crc2 = CRC64_NVME(data_block_B)\n\n This function computes:\n   result = CRC64_NVME(data_block_A || data_block_B)\n\n @param crc1 The CRC64-NVME checksum of the first data block\n @param crc2 The CRC64-NVME checksum of the second data block\n @param len2 The length (in bytes) of the original data that produced crc2.\n             This is NOT the size of the checksum (which is always 8 bytes),\n             but rather the size of the data block that was checksummed.\n @return The combined CRC64-NVME checksum as if computed over the concatenated data"] pub fn aws_checksums_crc64nvme_combine (crc1 : u64 , crc2 : u64 , len2 : u64) -> u64 ; } pub type aws_log_channel_send_fn = :: std :: option :: Option < unsafe extern "C" fn (channel : * mut aws_log_channel , output : * mut aws_string) -> :: libc :: 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)] pub struct aws_log_channel_vtable { pub send : aws_log_channel_send_fn , pub clean_up : aws_log_channel_clean_up_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_channel_vtable"] [:: std :: mem :: size_of :: < aws_log_channel_vtable > () - 16usize] ; ["Alignment of aws_log_channel_vtable"] [:: std :: mem :: align_of :: < aws_log_channel_vtable > () - 8usize] ; ["Offset of field: aws_log_channel_vtable::send"] [:: std :: mem :: offset_of ! (aws_log_channel_vtable , send) - 0usize] ; ["Offset of field: aws_log_channel_vtable::clean_up"] [:: std :: mem :: offset_of ! (aws_log_channel_vtable , clean_up) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] 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 :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_channel"] [:: std :: mem :: size_of :: < aws_log_channel > () - 32usize] ; ["Alignment of aws_log_channel"] [:: std :: mem :: align_of :: < aws_log_channel > () - 8usize] ; ["Offset of field: aws_log_channel::vtable"] [:: std :: mem :: offset_of ! (aws_log_channel , vtable) - 0usize] ; ["Offset of field: aws_log_channel::allocator"] [:: std :: mem :: offset_of ! (aws_log_channel , allocator) - 8usize] ; ["Offset of field: aws_log_channel::writer"] [:: std :: mem :: offset_of ! (aws_log_channel , writer) - 16usize] ; ["Offset of field: aws_log_channel::impl_"] [:: std :: mem :: offset_of ! (aws_log_channel , impl_) - 24usize] ; } ; 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 () } } } unsafe extern "C" { pub fn aws_log_channel_init_foreground (channel : * mut aws_log_channel , allocator : * mut aws_allocator , writer : * mut aws_log_writer) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_channel_init_background (channel : * mut aws_log_channel , allocator : * mut aws_allocator , writer : * mut aws_log_writer) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_channel_clean_up (channel : * mut aws_log_channel) ; } pub type aws_log_formatter_format_fn = :: std :: option :: Option < unsafe extern "C" fn (formatter : * mut aws_log_formatter , formatted_output : * mut * mut aws_string , level : aws_log_level :: Type , subject : aws_log_subject_t , format : * const :: libc :: c_char , args : * mut __va_list_tag) -> :: libc :: 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)] pub struct aws_log_formatter_vtable { pub format : aws_log_formatter_format_fn , pub clean_up : aws_log_formatter_clean_up_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_formatter_vtable"] [:: std :: mem :: size_of :: < aws_log_formatter_vtable > () - 16usize] ; ["Alignment of aws_log_formatter_vtable"] [:: std :: mem :: align_of :: < aws_log_formatter_vtable > () - 8usize] ; ["Offset of field: aws_log_formatter_vtable::format"] [:: std :: mem :: offset_of ! (aws_log_formatter_vtable , format) - 0usize] ; ["Offset of field: aws_log_formatter_vtable::clean_up"] [:: std :: mem :: offset_of ! (aws_log_formatter_vtable , clean_up) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_log_formatter { pub vtable : * mut aws_log_formatter_vtable , pub allocator : * mut aws_allocator , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_formatter"] [:: std :: mem :: size_of :: < aws_log_formatter > () - 24usize] ; ["Alignment of aws_log_formatter"] [:: std :: mem :: align_of :: < aws_log_formatter > () - 8usize] ; ["Offset of field: aws_log_formatter::vtable"] [:: std :: mem :: offset_of ! (aws_log_formatter , vtable) - 0usize] ; ["Offset of field: aws_log_formatter::allocator"] [:: std :: mem :: offset_of ! (aws_log_formatter , allocator) - 8usize] ; ["Offset of field: aws_log_formatter::impl_"] [:: std :: mem :: offset_of ! (aws_log_formatter , impl_) - 16usize] ; } ; 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)] pub struct aws_log_formatter_standard_options { pub date_format : aws_date_format , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_formatter_standard_options"] [:: std :: mem :: size_of :: < aws_log_formatter_standard_options > () - 4usize] ; ["Alignment of aws_log_formatter_standard_options"] [:: std :: mem :: align_of :: < aws_log_formatter_standard_options > () - 4usize] ; ["Offset of field: aws_log_formatter_standard_options::date_format"] [:: std :: mem :: offset_of ! (aws_log_formatter_standard_options , date_format) - 0usize] ; } ; 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)] pub struct aws_logging_standard_formatting_data { pub log_line_buffer : * mut :: libc :: c_char , pub total_length : usize , pub level : aws_log_level :: Type , pub subject_name : * const :: libc :: c_char , pub format : * const :: libc :: c_char , pub date_format : aws_date_format , pub allocator : * mut aws_allocator , pub amount_written : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logging_standard_formatting_data"] [:: std :: mem :: size_of :: < aws_logging_standard_formatting_data > () - 64usize] ; ["Alignment of aws_logging_standard_formatting_data"] [:: std :: mem :: align_of :: < aws_logging_standard_formatting_data > () - 8usize] ; ["Offset of field: aws_logging_standard_formatting_data::log_line_buffer"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , log_line_buffer) - 0usize] ; ["Offset of field: aws_logging_standard_formatting_data::total_length"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , total_length) - 8usize] ; ["Offset of field: aws_logging_standard_formatting_data::level"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , level) - 16usize] ; ["Offset of field: aws_logging_standard_formatting_data::subject_name"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , subject_name) - 24usize] ; ["Offset of field: aws_logging_standard_formatting_data::format"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , format) - 32usize] ; ["Offset of field: aws_logging_standard_formatting_data::date_format"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , date_format) - 40usize] ; ["Offset of field: aws_logging_standard_formatting_data::allocator"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , allocator) - 48usize] ; ["Offset of field: aws_logging_standard_formatting_data::amount_written"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , amount_written) - 56usize] ; } ; 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 () } } } unsafe 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) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_formatter_clean_up (formatter : * mut aws_log_formatter) ; } unsafe extern "C" { pub fn aws_format_standard_log_line (formatting_data : * mut aws_logging_standard_formatting_data , args : * mut __va_list_tag) -> :: libc :: 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) -> :: libc :: 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)] pub struct aws_log_writer_vtable { pub write : aws_log_writer_write_fn , pub clean_up : aws_log_writer_clean_up_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_writer_vtable"] [:: std :: mem :: size_of :: < aws_log_writer_vtable > () - 16usize] ; ["Alignment of aws_log_writer_vtable"] [:: std :: mem :: align_of :: < aws_log_writer_vtable > () - 8usize] ; ["Offset of field: aws_log_writer_vtable::write"] [:: std :: mem :: offset_of ! (aws_log_writer_vtable , write) - 0usize] ; ["Offset of field: aws_log_writer_vtable::clean_up"] [:: std :: mem :: offset_of ! (aws_log_writer_vtable , clean_up) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_log_writer { pub vtable : * mut aws_log_writer_vtable , pub allocator : * mut aws_allocator , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_writer"] [:: std :: mem :: size_of :: < aws_log_writer > () - 24usize] ; ["Alignment of aws_log_writer"] [:: std :: mem :: align_of :: < aws_log_writer > () - 8usize] ; ["Offset of field: aws_log_writer::vtable"] [:: std :: mem :: offset_of ! (aws_log_writer , vtable) - 0usize] ; ["Offset of field: aws_log_writer::allocator"] [:: std :: mem :: offset_of ! (aws_log_writer , allocator) - 8usize] ; ["Offset of field: aws_log_writer::impl_"] [:: std :: mem :: offset_of ! (aws_log_writer , impl_) - 16usize] ; } ; 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)] pub struct aws_log_writer_file_options { pub filename : * const :: libc :: c_char , pub file : * mut FILE , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_writer_file_options"] [:: std :: mem :: size_of :: < aws_log_writer_file_options > () - 16usize] ; ["Alignment of aws_log_writer_file_options"] [:: std :: mem :: align_of :: < aws_log_writer_file_options > () - 8usize] ; ["Offset of field: aws_log_writer_file_options::filename"] [:: std :: mem :: offset_of ! (aws_log_writer_file_options , filename) - 0usize] ; ["Offset of field: aws_log_writer_file_options::file"] [:: std :: mem :: offset_of ! (aws_log_writer_file_options , file) - 8usize] ; } ; 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 () } } } unsafe extern "C" { pub fn aws_log_writer_init_stdout (writer : * mut aws_log_writer , allocator : * mut aws_allocator) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_writer_init_stderr (writer : * mut aws_log_writer , allocator : * mut aws_allocator) -> :: libc :: c_int ; } unsafe 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) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_writer_clean_up (writer : * mut aws_log_writer) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_socket_endpoint { _unused : [u8 ; 0] , } # [doc = " Invoked when connect completes.\n\n If unsuccessful, error_code will be set, connection will be NULL,\n and the on_shutdown callback will never be invoked.\n\n If successful, error_code will be 0 and connection will be valid.\n The user is now responsible for the connection and must\n call aws_http_connection_release() when they are done with it.\n\n The connection uses one event-loop thread to do all its work.\n The thread invoking this callback will be the same thread that invokes all\n future callbacks for this connection and its streams."] pub type aws_http_on_client_connection_setup_fn = :: std :: option :: Option < unsafe extern "C" fn (connection : * mut aws_http_connection , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when the connection has finished shutting down.\n Never invoked if on_setup failed.\n This is always invoked on connection's event-loop thread.\n Note that the connection is not completely done until on_shutdown has been invoked\n AND aws_http_connection_release() has been called."] pub type aws_http_on_client_connection_shutdown_fn = :: std :: option :: Option < unsafe extern "C" fn (connection : * mut aws_http_connection , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when the HTTP/2 settings change is complete.\n If connection setup successfully this will always be invoked whether settings change successfully or unsuccessfully.\n If error_code is AWS_ERROR_SUCCESS (0), then the peer has acknowledged the settings and the change has been applied.\n If error_code is non-zero, then a connection error occurred before the settings could be fully acknowledged and\n applied. This is always invoked on the connection's event-loop thread."] pub type aws_http2_on_change_settings_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (http2_connection : * mut aws_http_connection , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when the HTTP/2 PING completes, whether peer has acknowledged it or not.\n If error_code is AWS_ERROR_SUCCESS (0), then the peer has acknowledged the PING and round_trip_time_ns will be the\n round trip time in nano seconds for the connection.\n If error_code is non-zero, then a connection error occurred before the PING get acknowledgment and round_trip_time_ns\n will be useless in this case."] pub type aws_http2_on_ping_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (http2_connection : * mut aws_http_connection , round_trip_time_ns : u64 , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when an HTTP/2 GOAWAY frame is received from peer.\n Implies that the peer has initiated shutdown, or encountered a serious error.\n Once a GOAWAY is received, no further streams may be created on this connection.\n\n @param http2_connection This HTTP/2 connection.\n @param last_stream_id ID of the last locally-initiated stream that peer will\n      process. Any locally-initiated streams with a higher ID are ignored by\n      peer, and are safe to retry on another connection.\n @param http2_error_code The HTTP/2 error code (RFC-7540 section 7) sent by peer.\n      `enum aws_http2_error_code` lists official codes.\n @param debug_data The debug data sent by peer. It can be empty. (NOTE: this data is only valid for the lifetime of\n      the callback. Make a deep copy if you wish to keep it longer.)\n @param user_data User-data passed to the callback."] pub type aws_http2_on_goaway_received_fn = :: std :: option :: Option < unsafe extern "C" fn (http2_connection : * mut aws_http_connection , last_stream_id : u32 , http2_error_code : u32 , debug_data : aws_byte_cursor , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when new HTTP/2 settings from peer have been applied.\n Settings_array is the array of aws_http2_settings that contains all the settings we just changed in the order we\n applied (the order settings arrived). Num_settings is the number of elements in that array."] pub type aws_http2_on_remote_settings_change_fn = :: std :: option :: Option < unsafe extern "C" fn (http2_connection : * mut aws_http_connection , settings_array : * const aws_http2_setting , num_settings : usize , user_data : * mut :: libc :: c_void) > ; # [doc = " Callback invoked on each statistics sample.\n\n connection_nonce is unique to each connection for disambiguation of each callback per connection."] pub type aws_http_statistics_observer_fn = :: std :: option :: Option < unsafe extern "C" fn (connection_nonce : usize , stats_list : * const aws_array_list , user_data : * mut :: libc :: c_void) > ; # [doc = " Configuration options for connection monitoring"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_connection_monitoring_options { # [doc = " minimum required throughput of the connection.  Throughput is only measured against the interval of time where\n there is actual io to perform.  Read and write throughput are measured and checked independently of one another."] pub minimum_throughput_bytes_per_second : u64 , pub allowable_throughput_failure_interval_seconds : u32 , # [doc = " invoked on each statistics publish by the underlying IO channel. Install this callback to receive the statistics\n for observation. This field is optional."] pub statistics_observer_fn : aws_http_statistics_observer_fn , # [doc = " user_data to be passed to statistics_observer_fn."] pub statistics_observer_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_connection_monitoring_options"] [:: std :: mem :: size_of :: < aws_http_connection_monitoring_options > () - 32usize] ; ["Alignment of aws_http_connection_monitoring_options"] [:: std :: mem :: align_of :: < aws_http_connection_monitoring_options > () - 8usize] ; ["Offset of field: aws_http_connection_monitoring_options::minimum_throughput_bytes_per_second"] [:: std :: mem :: offset_of ! (aws_http_connection_monitoring_options , minimum_throughput_bytes_per_second) - 0usize] ; ["Offset of field: aws_http_connection_monitoring_options::allowable_throughput_failure_interval_seconds"] [:: std :: mem :: offset_of ! (aws_http_connection_monitoring_options , allowable_throughput_failure_interval_seconds) - 8usize] ; ["Offset of field: aws_http_connection_monitoring_options::statistics_observer_fn"] [:: std :: mem :: offset_of ! (aws_http_connection_monitoring_options , statistics_observer_fn) - 16usize] ; ["Offset of field: aws_http_connection_monitoring_options::statistics_observer_user_data"] [:: std :: mem :: offset_of ! (aws_http_connection_monitoring_options , statistics_observer_user_data) - 24usize] ; } ; impl Default for aws_http_connection_monitoring_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 () } } } # [doc = " Options specific to HTTP/1.x connections."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http1_connection_options { # [doc = " Optional\n Capacity in bytes of the HTTP/1 connection's read buffer.\n The buffer grows if the flow-control window of the incoming HTTP-stream\n reaches zero. If the buffer reaches capacity, no further socket data is\n read until the HTTP-stream's window opens again, allowing data to resume flowing.\n\n Ignored if `manual_window_management` is false.\n If zero is specified (the default) then a default capacity is chosen.\n A capacity that is too small may hinder throughput.\n A capacity that is too big may waste memory without helping throughput."] pub read_buffer_capacity : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http1_connection_options"] [:: std :: mem :: size_of :: < aws_http1_connection_options > () - 8usize] ; ["Alignment of aws_http1_connection_options"] [:: std :: mem :: align_of :: < aws_http1_connection_options > () - 8usize] ; ["Offset of field: aws_http1_connection_options::read_buffer_capacity"] [:: std :: mem :: offset_of ! (aws_http1_connection_options , read_buffer_capacity) - 0usize] ; } ; # [doc = " Options specific to HTTP/2 connections."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http2_connection_options { # [doc = " Optional\n The data of settings to change for initial settings.\n Note: each setting has its boundary. If settings_array is not set, num_settings has to be 0 to send an empty\n SETTINGS frame."] pub initial_settings_array : * mut aws_http2_setting , # [doc = " Required\n The num of settings to change (Length of the initial_settings_array)."] pub num_initial_settings : usize , # [doc = " Optional.\n Invoked when the HTTP/2 initial settings change is complete.\n If failed to setup the connection, this will not be invoked.\n Otherwise, this will be invoked, whether settings change successfully or unsuccessfully.\n See `aws_http2_on_change_settings_complete_fn`."] pub on_initial_settings_completed : aws_http2_on_change_settings_complete_fn , # [doc = " Optional\n The max number of recently-closed streams to remember.\n Set it to zero to use the default setting, AWS_HTTP2_DEFAULT_MAX_CLOSED_STREAMS\n\n If the connection receives a frame for a closed stream,\n the frame will be ignored or cause a connection error,\n depending on the frame type and how the stream was closed.\n Remembering more streams reduces the chances that a late frame causes\n a connection error, but costs some memory."] pub max_closed_streams : usize , # [doc = " Optional.\n Invoked when a valid GOAWAY frame received.\n See `aws_http2_on_goaway_received_fn`."] pub on_goaway_received : aws_http2_on_goaway_received_fn , # [doc = " Optional.\n Invoked when new settings from peer have been applied.\n See `aws_http2_on_remote_settings_change_fn`."] pub on_remote_settings_change : aws_http2_on_remote_settings_change_fn , # [doc = " Optional.\n Set to true to manually manage the flow-control window of whole HTTP/2 connection.\n\n If false, the connection will maintain its flow-control windows such that\n no back-pressure is applied and data arrives as fast as possible.\n\n If true, the flow-control window of the whole connection will shrink as body data\n is received (headers, padding, and other metadata do not affect the window) for every streams\n created on this connection.\n The initial connection flow-control window is 65,535.\n Once the connection's flow-control window reaches to 0, all the streams on the connection stop receiving any\n further data.\n The user must call aws_http2_connection_update_window() to increment the connection's\n window and keep data flowing.\n Note: the padding of data frame counts to the flow-control window.\n But, the client will always automatically update the window for padding even for manual window update."] pub conn_manual_window_management : bool , # [doc = " Optional.\n The threshold to send out a window update frame for the connection.\n Ignored if `conn_manual_window_management` is false.\n When the window_size_self for the connection is larger than the threshold,\n client will batch the window update and not send it out until the window_size_self\n drops below the threshold.\n Default to half of the initial connection flow-control window size, which is 32767."] pub conn_window_size_threshold_to_send_update : u32 , # [doc = " Optional.\n The threshold to send out a window update frame for the streams.\n Ignored if `manual_window_management` is false.\n When the window_size_self for the stream is larger than the threshold,\n client will batch the window update and not send it out until the window_size_self\n drops below the threshold.\n Default to half of the `initial_window_size`."] pub stream_window_size_threshold_to_send_update : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http2_connection_options"] [:: std :: mem :: size_of :: < aws_http2_connection_options > () - 64usize] ; ["Alignment of aws_http2_connection_options"] [:: std :: mem :: align_of :: < aws_http2_connection_options > () - 8usize] ; ["Offset of field: aws_http2_connection_options::initial_settings_array"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , initial_settings_array) - 0usize] ; ["Offset of field: aws_http2_connection_options::num_initial_settings"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , num_initial_settings) - 8usize] ; ["Offset of field: aws_http2_connection_options::on_initial_settings_completed"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , on_initial_settings_completed) - 16usize] ; ["Offset of field: aws_http2_connection_options::max_closed_streams"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , max_closed_streams) - 24usize] ; ["Offset of field: aws_http2_connection_options::on_goaway_received"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , on_goaway_received) - 32usize] ; ["Offset of field: aws_http2_connection_options::on_remote_settings_change"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , on_remote_settings_change) - 40usize] ; ["Offset of field: aws_http2_connection_options::conn_manual_window_management"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , conn_manual_window_management) - 48usize] ; ["Offset of field: aws_http2_connection_options::conn_window_size_threshold_to_send_update"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , conn_window_size_threshold_to_send_update) - 52usize] ; ["Offset of field: aws_http2_connection_options::stream_window_size_threshold_to_send_update"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , stream_window_size_threshold_to_send_update) - 56usize] ; } ; impl Default for aws_http2_connection_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 () } } } # [doc = " Options for creating an HTTP client connection.\n Initialize with AWS_HTTP_CLIENT_CONNECTION_OPTIONS_INIT to set default values."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_client_connection_options { # [doc = " The sizeof() this struct, used for versioning.\n Set by AWS_HTTP_CLIENT_CONNECTION_OPTIONS_INIT."] pub self_size : usize , # [doc = " Required.\n Must outlive the connection."] pub allocator : * mut aws_allocator , # [doc = " Required.\n The connection keeps the bootstrap alive via ref-counting."] pub bootstrap : * mut aws_client_bootstrap , # [doc = " Required.\n aws_http_client_connect() makes a copy."] pub host_name : aws_byte_cursor , # [doc = " Required."] pub port : u32 , # [doc = " Required.\n aws_http_client_connect() makes a copy."] pub socket_options : * const aws_socket_options , # [doc = " Optional.\n aws_http_client_connect() deep-copies all contents,\n and keeps `aws_tls_ctx` alive via ref-counting."] pub tls_options : * const aws_tls_connection_options , # [doc = " Optional\n Configuration options related to http proxy usage.\n Relevant fields are copied internally."] pub proxy_options : * const aws_http_proxy_options , pub proxy_ev_settings : * const proxy_env_var_settings , # [doc = " Optional\n Configuration options related to connection health monitoring"] pub monitoring_options : * const aws_http_connection_monitoring_options , # [doc = " Optional (ignored if 0).\n After a request is fully sent, if the server does not begin responding within N milliseconds,\n then fail with AWS_ERROR_HTTP_RESPONSE_FIRST_BYTE_TIMEOUT.\n This can be overridden per-request by aws_http_make_request_options.response_first_byte_timeout_ms.\n TODO: Only supported in HTTP/1.1 now, support it in HTTP/2"] pub response_first_byte_timeout_ms : u64 , # [doc = " Set to true to manually manage the flow-control window of each stream.\n\n If false, the connection will maintain its flow-control windows such that\n no back-pressure is applied and data arrives as fast as possible.\n\n If true, the flow-control window of each stream will shrink as body data\n is received (headers, padding, and other metadata do not affect the window).\n `initial_window_size` determines the starting size of each stream's window.\n\n If a stream's flow-control window reaches 0, no further data will be received. The user must call\n aws_http_stream_update_window() to increment the stream's window and keep data flowing.\n\n If a HTTP/2 connection created, it will ONLY control the stream window management.\n Connection window management is controlled by `conn_manual_window_management`.\n `stream_window_size_threshold_to_send_update` controls when to send the WINDOW_UPDATE frame for the stream.\n Note: the padding of data frame counts to the flow-control window. But, the client will always automatically\n update the window for padding even for manual window update."] pub manual_window_management : bool , # [doc = " The starting size of each HTTP stream's flow-control window.\n Required if `manual_window_management` is true,\n ignored if `manual_window_management` is false.\n\n For HTTP/2 connection, this value will end up being one of the initial settings for the connection,\n `AWS_HTTP2_SETTINGS_INITIAL_WINDOW_SIZE`.\n The corresponding settings from `initial_settings_array` will override this value.\n Notes:\n  - the setting value has the limitation of 2^31-1, otherwise the connection will be failed to be established with\n      AWS_ERROR_INVALID_ARGUMENT.\n  - when this set to 0, the initial window size will be set to 0, when `manual_window_management` is true."] pub initial_window_size : usize , # [doc = " User data for callbacks\n Optional."] pub user_data : * mut :: libc :: c_void , # [doc = " Invoked when connect completes.\n Required.\n See `aws_http_on_client_connection_setup_fn`."] pub on_setup : aws_http_on_client_connection_setup_fn , # [doc = " Invoked when the connection has finished shutting down.\n Never invoked if setup failed.\n Optional.\n See `aws_http_on_client_connection_shutdown_fn`."] pub on_shutdown : aws_http_on_client_connection_shutdown_fn , # [doc = " Optional.\n When true, use prior knowledge to set up an HTTP/2 connection on a cleartext\n connection.\n When TLS is set and this is true, the connection will failed to be established,\n as prior knowledge only works for cleartext TLS.\n Refer to RFC7540 3.4"] pub prior_knowledge_http2 : bool , # [doc = " Optional.\n Pointer to the hash map containing the ALPN string to protocol to use.\n Hash from `struct aws_string *` to `enum aws_http_version`.\n If not set, only the predefined string `h2` and `http/1.1` will be recognized. Other negotiated ALPN string will\n result in a HTTP1/1 connection\n Note: Connection will keep a deep copy of the table and the strings."] pub alpn_string_map : * mut aws_hash_table , # [doc = " Options specific to HTTP/1.x connections.\n Optional.\n Ignored if connection is not HTTP/1.x.\n If connection is HTTP/1.x and options were not specified, default values are used."] pub http1_options : * const aws_http1_connection_options , # [doc = " Options specific to HTTP/2 connections.\n Optional.\n Ignored if connection is not HTTP/2.\n If connection is HTTP/2 and options were not specified, default values are used."] pub http2_options : * const aws_http2_connection_options , # [doc = " Optional.\n Requests the channel/connection be bound to a specific event loop rather than chosen sequentially from the\n event loop group associated with the client bootstrap."] pub requested_event_loop : * mut aws_event_loop , # [doc = " Optional\n Host resolution override that allows the user to override DNS behavior for this particular connection."] pub host_resolution_config : * const aws_host_resolution_config , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_client_connection_options"] [:: std :: mem :: size_of :: < aws_http_client_connection_options > () - 184usize] ; ["Alignment of aws_http_client_connection_options"] [:: std :: mem :: align_of :: < aws_http_client_connection_options > () - 8usize] ; ["Offset of field: aws_http_client_connection_options::self_size"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , self_size) - 0usize] ; ["Offset of field: aws_http_client_connection_options::allocator"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , allocator) - 8usize] ; ["Offset of field: aws_http_client_connection_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , bootstrap) - 16usize] ; ["Offset of field: aws_http_client_connection_options::host_name"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , host_name) - 24usize] ; ["Offset of field: aws_http_client_connection_options::port"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , port) - 40usize] ; ["Offset of field: aws_http_client_connection_options::socket_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , socket_options) - 48usize] ; ["Offset of field: aws_http_client_connection_options::tls_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , tls_options) - 56usize] ; ["Offset of field: aws_http_client_connection_options::proxy_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , proxy_options) - 64usize] ; ["Offset of field: aws_http_client_connection_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , proxy_ev_settings) - 72usize] ; ["Offset of field: aws_http_client_connection_options::monitoring_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , monitoring_options) - 80usize] ; ["Offset of field: aws_http_client_connection_options::response_first_byte_timeout_ms"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , response_first_byte_timeout_ms) - 88usize] ; ["Offset of field: aws_http_client_connection_options::manual_window_management"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , manual_window_management) - 96usize] ; ["Offset of field: aws_http_client_connection_options::initial_window_size"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , initial_window_size) - 104usize] ; ["Offset of field: aws_http_client_connection_options::user_data"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , user_data) - 112usize] ; ["Offset of field: aws_http_client_connection_options::on_setup"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , on_setup) - 120usize] ; ["Offset of field: aws_http_client_connection_options::on_shutdown"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , on_shutdown) - 128usize] ; ["Offset of field: aws_http_client_connection_options::prior_knowledge_http2"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , prior_knowledge_http2) - 136usize] ; ["Offset of field: aws_http_client_connection_options::alpn_string_map"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , alpn_string_map) - 144usize] ; ["Offset of field: aws_http_client_connection_options::http1_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , http1_options) - 152usize] ; ["Offset of field: aws_http_client_connection_options::http2_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , http2_options) - 160usize] ; ["Offset of field: aws_http_client_connection_options::requested_event_loop"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , requested_event_loop) - 168usize] ; ["Offset of field: aws_http_client_connection_options::host_resolution_config"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , host_resolution_config) - 176usize] ; } ; impl Default for aws_http_client_connection_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 () } } } impl aws_http2_settings_id { pub const AWS_HTTP2_SETTINGS_HEADER_TABLE_SIZE : aws_http2_settings_id = aws_http2_settings_id :: AWS_HTTP2_SETTINGS_BEGIN_RANGE ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http2_settings_id { AWS_HTTP2_SETTINGS_BEGIN_RANGE = 1 , AWS_HTTP2_SETTINGS_ENABLE_PUSH = 2 , AWS_HTTP2_SETTINGS_MAX_CONCURRENT_STREAMS = 3 , AWS_HTTP2_SETTINGS_INITIAL_WINDOW_SIZE = 4 , AWS_HTTP2_SETTINGS_MAX_FRAME_SIZE = 5 , AWS_HTTP2_SETTINGS_MAX_HEADER_LIST_SIZE = 6 , AWS_HTTP2_SETTINGS_END_RANGE = 7 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http2_setting { pub id : aws_http2_settings_id , pub value : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http2_setting"] [:: std :: mem :: size_of :: < aws_http2_setting > () - 8usize] ; ["Alignment of aws_http2_setting"] [:: std :: mem :: align_of :: < aws_http2_setting > () - 4usize] ; ["Offset of field: aws_http2_setting::id"] [:: std :: mem :: offset_of ! (aws_http2_setting , id) - 0usize] ; ["Offset of field: aws_http2_setting::value"] [:: std :: mem :: offset_of ! (aws_http2_setting , value) - 4usize] ; } ; impl Default for aws_http2_setting { 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 () } } } unsafe extern "C" { # [doc = " Asynchronously establish a client connection.\n The on_setup callback is invoked when the operation has created a connection or failed."] pub fn aws_http_client_connect (options : * const aws_http_client_connection_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Users must release the connection when they are done with it.\n The connection's memory cannot be reclaimed until this is done.\n If the connection was not already shutting down, it will be shut down.\n\n Users should always wait for the on_shutdown() callback to be called before releasing any data passed to the\n http_connection (Eg aws_tls_connection_options, aws_socket_options) otherwise there will be race conditions between\n http_connection shutdown tasks and memory release tasks, causing Segfaults."] pub fn aws_http_connection_release (connection : * mut aws_http_connection) ; } unsafe extern "C" { # [doc = " Begin shutdown sequence of the connection if it hasn't already started. This will schedule shutdown tasks on the\n EventLoop that may send HTTP/TLS/TCP shutdown messages to peers if necessary, and will eventually cause internal\n connection memory to stop being accessed and on_shutdown() callback to be called.\n\n It's safe to call this function regardless of the connection state as long as you hold a reference to the connection."] pub fn aws_http_connection_close (connection : * mut aws_http_connection) ; } unsafe extern "C" { # [doc = " Stop accepting new requests for the connection. It will NOT start the shutdown process for the connection. The\n requests that are already open can still wait to be completed, but new requests will fail to be created,"] pub fn aws_http_connection_stop_new_requests (connection : * mut aws_http_connection) ; } unsafe extern "C" { # [doc = " Returns true unless the connection is closed or closing."] pub fn aws_http_connection_is_open (connection : * const aws_http_connection) -> bool ; } unsafe extern "C" { # [doc = " Return whether the connection can make a new requests.\n If false, then a new connection must be established to make further requests."] pub fn aws_http_connection_new_requests_allowed (connection : * const aws_http_connection) -> bool ; } unsafe extern "C" { # [doc = " Returns true if this is a client connection."] pub fn aws_http_connection_is_client (connection : * const aws_http_connection) -> bool ; } unsafe extern "C" { pub fn aws_http_connection_get_version (connection : * const aws_http_connection) -> aws_http_version ; } unsafe extern "C" { # [doc = " Returns the channel hosting the HTTP connection.\n Do not expose this function to language bindings."] pub fn aws_http_connection_get_channel (connection : * mut aws_http_connection) -> * mut aws_channel ; } unsafe extern "C" { # [doc = " Returns the remote endpoint of the HTTP connection."] pub fn aws_http_connection_get_remote_endpoint (connection : * const aws_http_connection) -> * const aws_socket_endpoint ; } unsafe extern "C" { # [doc = " Initialize an map copied from the *src map, which maps `struct aws_string *` to `enum aws_http_version`."] pub fn aws_http_alpn_map_init_copy (allocator : * mut aws_allocator , dest : * mut aws_hash_table , src : * mut aws_hash_table) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initialize an empty hash-table that maps `struct aws_string *` to `enum aws_http_version`.\n This map can used in aws_http_client_connections_options.alpn_string_map."] pub fn aws_http_alpn_map_init (allocator : * mut aws_allocator , map : * mut aws_hash_table) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Checks http proxy options for correctness"] pub fn aws_http_options_validate_proxy_configuration (options : * const aws_http_client_connection_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Send a SETTINGS frame (HTTP/2 only).\n SETTINGS will be applied locally when SETTINGS ACK is received from peer.\n\n @param http2_connection HTTP/2 connection.\n @param settings_array The array of settings to change. Note: each setting has its boundary.\n @param num_settings The num of settings to change in settings_array.\n @param on_completed Optional callback, see `aws_http2_on_change_settings_complete_fn`.\n @param user_data User-data pass to on_completed callback."] pub fn aws_http2_connection_change_settings (http2_connection : * mut aws_http_connection , settings_array : * const aws_http2_setting , num_settings : usize , on_completed : aws_http2_on_change_settings_complete_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Send a PING frame (HTTP/2 only).\n Round-trip-time is calculated when PING ACK is received from peer.\n\n @param http2_connection HTTP/2 connection.\n @param optional_opaque_data Optional payload for PING frame.\n      Must be NULL, or exactly 8 bytes (AWS_HTTP2_PING_DATA_SIZE).\n      If NULL, the 8 byte payload will be all zeroes.\n @param on_completed Optional callback, invoked when PING ACK is received from peer,\n      or when a connection error prevents the PING ACK from being received.\n      Callback always fires on the connection's event-loop thread.\n @param user_data User-data pass to on_completed callback."] pub fn aws_http2_connection_ping (http2_connection : * mut aws_http_connection , optional_opaque_data : * const aws_byte_cursor , on_completed : aws_http2_on_ping_complete_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the local settings we are using to affect the decoding.\n\n @param http2_connection HTTP/2 connection.\n @param out_settings fixed size array of aws_http2_setting gets set to the local settings"] pub fn aws_http2_connection_get_local_settings (http2_connection : * const aws_http_connection , out_settings : * mut aws_http2_setting) ; } unsafe extern "C" { # [doc = " Get the settings received from remote peer, which we are using to restricts the message to send.\n\n @param http2_connection HTTP/2 connection.\n @param out_settings fixed size array of aws_http2_setting gets set to the remote settings"] pub fn aws_http2_connection_get_remote_settings (http2_connection : * const aws_http_connection , out_settings : * mut aws_http2_setting) ; } unsafe extern "C" { # [doc = " Send a custom GOAWAY frame (HTTP/2 only).\n\n Note that the connection automatically attempts to send a GOAWAY during\n shutdown (unless a GOAWAY with a valid Last-Stream-ID has already been sent).\n\n This call can be used to gracefully warn the peer of an impending shutdown\n (http2_error=0, allow_more_streams=true), or to customize the final GOAWAY\n frame that is sent by this connection.\n\n The other end may not receive the goaway, if the connection already closed.\n\n @param http2_connection HTTP/2 connection.\n @param http2_error The HTTP/2 error code (RFC-7540 section 7) to send.\n      `enum aws_http2_error_code` lists official codes.\n @param allow_more_streams If true, new peer-initiated streams will continue\n      to be acknowledged and the GOAWAY's Last-Stream-ID will be set to a max value.\n      If false, new peer-initiated streams will be ignored and the GOAWAY's\n      Last-Stream-ID will be set to the latest acknowledged stream.\n @param optional_debug_data Optional debug data to send. Size must not exceed 16KB."] pub fn aws_http2_connection_send_goaway (http2_connection : * mut aws_http_connection , http2_error : u32 , allow_more_streams : bool , optional_debug_data : * const aws_byte_cursor) ; } unsafe extern "C" { # [doc = " Get data about the latest GOAWAY frame sent to peer (HTTP/2 only).\n If no GOAWAY has been sent, AWS_ERROR_HTTP_DATA_NOT_AVAILABLE will be raised.\n Note that GOAWAY frames are typically sent automatically by the connection\n during shutdown.\n\n @param http2_connection HTTP/2 connection.\n @param out_http2_error Gets set to HTTP/2 error code sent in most recent GOAWAY.\n @param out_last_stream_id Gets set to Last-Stream-ID sent in most recent GOAWAY."] pub fn aws_http2_connection_get_sent_goaway (http2_connection : * mut aws_http_connection , out_http2_error : * mut u32 , out_last_stream_id : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get data about the latest GOAWAY frame received from peer (HTTP/2 only).\n If no GOAWAY has been received, or the GOAWAY payload is still in transmitting,\n AWS_ERROR_HTTP_DATA_NOT_AVAILABLE will be raised.\n\n @param http2_connection HTTP/2 connection.\n @param out_http2_error Gets set to HTTP/2 error code received in most recent GOAWAY.\n @param out_last_stream_id Gets set to Last-Stream-ID received in most recent GOAWAY."] pub fn aws_http2_connection_get_received_goaway (http2_connection : * mut aws_http_connection , out_http2_error : * mut u32 , out_last_stream_id : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Increment the connection's flow-control window to keep data flowing (HTTP/2 only).\n\n If the connection was created with `conn_manual_window_management` set true,\n the flow-control window of the connection will shrink as body data is received for all the streams created on it.\n (headers, padding, and other metadata do not affect the window).\n The initial connection flow-control window is 65,535.\n Once the connection's flow-control window reaches to 0, all the streams on the connection stop receiving any further\n data.\n\n If `conn_manual_window_management` is false, this call will have no effect.\n The connection maintains its flow-control windows such that\n no back-pressure is applied and data arrives as fast as possible.\n\n If you are not connected, this call will have no effect.\n\n Crashes when the connection is not http2 connection.\n The limit of the Maximum Size is 2**31 - 1.\n And client will make sure the WINDOW_UPDATE frame to be valid.\n\n The client control exactly when the WINDOW_UPDATE frame sent.\n Check `conn_window_size_threshold_to_send_update` for details.\n\n @param http2_connection HTTP/2 connection.\n @param increment_size The size to increment for the connection's flow control window"] pub fn aws_http2_connection_update_window (http2_connection : * mut aws_http_connection , increment_size : u32) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_async_input_stream { pub vtable : * const aws_async_input_stream_vtable , pub alloc : * mut aws_allocator , pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_async_input_stream"] [:: std :: mem :: size_of :: < aws_async_input_stream > () - 48usize] ; ["Alignment of aws_async_input_stream"] [:: std :: mem :: align_of :: < aws_async_input_stream > () - 8usize] ; ["Offset of field: aws_async_input_stream::vtable"] [:: std :: mem :: offset_of ! (aws_async_input_stream , vtable) - 0usize] ; ["Offset of field: aws_async_input_stream::alloc"] [:: std :: mem :: offset_of ! (aws_async_input_stream , alloc) - 8usize] ; ["Offset of field: aws_async_input_stream::ref_count"] [:: std :: mem :: offset_of ! (aws_async_input_stream , ref_count) - 16usize] ; ["Offset of field: aws_async_input_stream::impl_"] [:: std :: mem :: offset_of ! (aws_async_input_stream , impl_) - 40usize] ; } ; impl Default for aws_async_input_stream { 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)] pub struct aws_async_input_stream_vtable { # [doc = " Destroy the stream, its refcount has reached 0."] pub destroy : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_async_input_stream) > , # [doc = " Read once into the buffer.\n Complete the read when at least 1 byte is read, the buffer is full, or EOF is reached.\n Do not resize the buffer (do not use \"aws_byte_buf_xyz_dynamic()\" functions)\n Do not assume that buffer len starts at 0.\n You may assume that read() won't be called again until the current one completes.\n You may assume that the buffer has some space available.\n Return a future, which will contain an error code if something went wrong,\n or a result bool indicating whether EOF has been reached."] pub read : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_async_input_stream , dest : * mut aws_byte_buf) -> * mut aws_future_bool > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_async_input_stream_vtable"] [:: std :: mem :: size_of :: < aws_async_input_stream_vtable > () - 16usize] ; ["Alignment of aws_async_input_stream_vtable"] [:: std :: mem :: align_of :: < aws_async_input_stream_vtable > () - 8usize] ; ["Offset of field: aws_async_input_stream_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_async_input_stream_vtable , destroy) - 0usize] ; ["Offset of field: aws_async_input_stream_vtable::read"] [:: std :: mem :: offset_of ! (aws_async_input_stream_vtable , read) - 8usize] ; } ; unsafe extern "C" { # [doc = " Initialize aws_async_input_stream \"base class\""] pub fn aws_async_input_stream_init_base (stream : * mut aws_async_input_stream , alloc : * mut aws_allocator , vtable : * const aws_async_input_stream_vtable , impl_ : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Increment reference count.\n You may pass in NULL (has no effect).\n Returns whatever pointer was passed in."] pub fn aws_async_input_stream_acquire (stream : * mut aws_async_input_stream) -> * mut aws_async_input_stream ; } unsafe extern "C" { # [doc = " Decrement reference count.\n You may pass in NULL (has no effect).\n Always returns NULL."] pub fn aws_async_input_stream_release (stream : * mut aws_async_input_stream) -> * mut aws_async_input_stream ; } unsafe extern "C" { # [doc = " Read once from the async stream into the buffer.\n The read completes when at least 1 byte is read, the buffer is full, or EOF is reached.\n Depending on implementation, the read could complete at any time.\n It may complete synchronously. It may complete on another thread.\n Returns a future, which will contain an error code if something went wrong,\n or a result bool indicating whether EOF has been reached.\n\n WARNING: The buffer must have space available.\n WARNING: Do not read again until the previous read is complete."] pub fn aws_async_input_stream_read (stream : * mut aws_async_input_stream , dest : * mut aws_byte_buf) -> * mut aws_future_bool ; } unsafe extern "C" { # [doc = " Read repeatedly from the async stream until the buffer is full, or EOF is reached.\n Depending on implementation, this could complete at any time.\n It may complete synchronously. It may complete on another thread.\n Returns a future, which will contain an error code if something went wrong,\n or a result bool indicating whether EOF has been reached.\n\n WARNING: The buffer must have space available.\n WARNING: Do not read again until the previous read is complete."] pub fn aws_async_input_stream_read_to_fill (stream : * mut aws_async_input_stream , dest : * mut aws_byte_buf) -> * mut aws_future_bool ; } pub type aws_crt_statistics_category_t = u32 ; pub const AWS_CRT_STATISTICS_CATEGORY_STRIDE_BITS : _bindgen_ty_22 = _bindgen_ty_22 :: AWS_CRT_STATISTICS_CATEGORY_STRIDE_BITS ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_22 { AWS_CRT_STATISTICS_CATEGORY_STRIDE_BITS = 8 , } # [repr (u32)] # [non_exhaustive] # [doc = " The common-specific range of the aws_crt_statistics_category cross-library enum.\n\n This enum functions as an RTTI value that lets statistics handler's interpret (via cast) a\n specific statistics structure if the RTTI value is understood.\n\n Common doesn't have any statistics structures presently, so its range is essentially empty.\n"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_crt_common_statistics_category { AWSCRT_STAT_CAT_INVALID = 0 , } # [doc = " Pattern-struct that functions as a base \"class\" for all statistics structures.  To conform\n to the pattern, a statistics structure must have its first member be the category.  In that\n case it becomes \"safe\" to cast from aws_crt_statistics_base to the specific statistics structure\n based on the category value."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_crt_statistics_base { pub category : aws_crt_statistics_category_t , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_crt_statistics_base"] [:: std :: mem :: size_of :: < aws_crt_statistics_base > () - 4usize] ; ["Alignment of aws_crt_statistics_base"] [:: std :: mem :: align_of :: < aws_crt_statistics_base > () - 4usize] ; ["Offset of field: aws_crt_statistics_base::category"] [:: std :: mem :: offset_of ! (aws_crt_statistics_base , category) - 0usize] ; } ; # [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)] pub struct aws_crt_statistics_sample_interval { pub begin_time_ms : u64 , pub end_time_ms : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_crt_statistics_sample_interval"] [:: std :: mem :: size_of :: < aws_crt_statistics_sample_interval > () - 16usize] ; ["Alignment of aws_crt_statistics_sample_interval"] [:: std :: mem :: align_of :: < aws_crt_statistics_sample_interval > () - 8usize] ; ["Offset of field: aws_crt_statistics_sample_interval::begin_time_ms"] [:: std :: mem :: offset_of ! (aws_crt_statistics_sample_interval , begin_time_ms) - 0usize] ; ["Offset of field: aws_crt_statistics_sample_interval::end_time_ms"] [:: std :: mem :: offset_of ! (aws_crt_statistics_sample_interval , end_time_ms) - 8usize] ; } ; 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 :: libc :: 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_crt_statistics_handler_vtable"] [:: std :: mem :: size_of :: < aws_crt_statistics_handler_vtable > () - 24usize] ; ["Alignment of aws_crt_statistics_handler_vtable"] [:: std :: mem :: align_of :: < aws_crt_statistics_handler_vtable > () - 8usize] ; ["Offset of field: aws_crt_statistics_handler_vtable::process_statistics"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler_vtable , process_statistics) - 0usize] ; ["Offset of field: aws_crt_statistics_handler_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler_vtable , destroy) - 8usize] ; ["Offset of field: aws_crt_statistics_handler_vtable::get_report_interval_ms"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler_vtable , get_report_interval_ms) - 16usize] ; } ; # [doc = " Base structure for all statistics handler implementations.\n\n A statistics handler is an object that listens to a stream of polymorphic (via the category RTTI enum) statistics\n structures emitted from some arbitrary source.  In the initial implementation, statistics handlers are primarily\n attached to channels, where they monitor IO throughput and state data (from channel handlers) to determine a\n connection's health.\n\n Statistics handlers are a generalization of the timeout and bandwidth filters that are often associated with\n SDK network connections.  Configurable, default implementations are defined at the protocol level (http, etc...)\n where they can be attached at connection (channel) creation time."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_crt_statistics_handler { pub vtable : * mut aws_crt_statistics_handler_vtable , pub allocator : * mut aws_allocator , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_crt_statistics_handler"] [:: std :: mem :: size_of :: < aws_crt_statistics_handler > () - 24usize] ; ["Alignment of aws_crt_statistics_handler"] [:: std :: mem :: align_of :: < aws_crt_statistics_handler > () - 8usize] ; ["Offset of field: aws_crt_statistics_handler::vtable"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler , vtable) - 0usize] ; ["Offset of field: aws_crt_statistics_handler::allocator"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler , allocator) - 8usize] ; ["Offset of field: aws_crt_statistics_handler::impl_"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler , impl_) - 16usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Submits a list of statistics objects to a statistics handler for processing\n\n handler - the statistics handler that will process the statistics objects\n interval - time period over which the statistics were gathered\n stats - list of pointers to structures that can be case to aws_crt_statistics_base (i.e. have category as a first\n   member)\n 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 :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Queries the frequency (via an interval in milliseconds) which a statistics handler would like to be informed\n of statistics."] pub fn aws_crt_statistics_handler_get_report_interval_ms (handler : * mut aws_crt_statistics_handler) -> u64 ; } unsafe extern "C" { # [doc = " completely destroys a statistics handler.  The handler's cleanup function must clean up the impl portion completely\n (including its allocation, if done separately)."] pub fn aws_crt_statistics_handler_destroy (handler : * mut aws_crt_statistics_handler) ; } pub type aws_priority_queue_compare_fn = :: std :: option :: Option < unsafe extern "C" fn (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> :: libc :: c_int > ; # [repr (C)] # [derive (Debug , Copy , Clone)] 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\n the first call to aws_priority_queue_push_bp is made, and is subsequently maintained\n through any heap node manipulations.\n\n Each element is a struct aws_priority_queue_node *, pointing to a backpointer field\n owned by the calling code, or a NULL. The backpointer field is continually updated\n with information needed to locate and remove a specific node later on."] pub backpointers : aws_array_list , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_priority_queue"] [:: std :: mem :: size_of :: < aws_priority_queue > () - 88usize] ; ["Alignment of aws_priority_queue"] [:: std :: mem :: align_of :: < aws_priority_queue > () - 8usize] ; ["Offset of field: aws_priority_queue::pred"] [:: std :: mem :: offset_of ! (aws_priority_queue , pred) - 0usize] ; ["Offset of field: aws_priority_queue::container"] [:: std :: mem :: offset_of ! (aws_priority_queue , container) - 8usize] ; ["Offset of field: aws_priority_queue::backpointers"] [:: std :: mem :: offset_of ! (aws_priority_queue , backpointers) - 48usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_priority_queue_node"] [:: std :: mem :: size_of :: < aws_priority_queue_node > () - 8usize] ; ["Alignment of aws_priority_queue_node"] [:: std :: mem :: align_of :: < aws_priority_queue_node > () - 8usize] ; ["Offset of field: aws_priority_queue_node::current_index"] [:: std :: mem :: offset_of ! (aws_priority_queue_node , current_index) - 0usize] ; } ; unsafe extern "C" { # [doc = " Initializes a priority queue struct for use. This mode will grow memory automatically (exponential model)\n Default size is the inital size of the queue\n item_size is the size of each element in bytes. Mixing items types is not supported by this API.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes a priority queue struct for use. This mode will not allocate any additional memory. When the heap fills\n new enqueue operations will fail with AWS_ERROR_PRIORITY_QUEUE_FULL.\n\n Heaps initialized using this call do not support the aws_priority_queue_push_ref call with a non-NULL backpointer\n parameter.\n\n heap is the raw memory allocated for this priority_queue\n item_count is the maximum number of elements the raw heap can contain\n item_size is the size of each element in bytes. Mixing items types is not supported by this API.\n 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 :: libc :: c_void , item_count : usize , item_size : usize , pred : aws_priority_queue_compare_fn) ; } unsafe extern "C" { # [doc = " Checks that the backpointer at a specific index of the queue is\n 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 ; } unsafe extern "C" { # [doc = " Checks that the backpointers of the priority queue are either NULL\n or correctly allocated to point at aws_priority_queue_nodes. This\n check is O(n), as it accesses every backpointer in a loop, and thus\n shouldn't be used carelessly."] pub fn aws_priority_queue_backpointers_valid_deep (queue : * const aws_priority_queue) -> bool ; } unsafe extern "C" { # [doc = " Checks that the backpointers of the priority queue satisfy validity\n constraints."] pub fn aws_priority_queue_backpointers_valid (queue : * const aws_priority_queue) -> bool ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies item into the queue and places it in the proper priority order. Complexity: O(log(n)).\n\n If the backpointer parameter is non-null, the heap will continually update the pointed-to field\n with information needed to remove the node later on. *backpointer must remain valid until the node\n is removed from the heap, and may be updated on any mutating operation on the priority queue.\n\n If the node is removed, the backpointer will be set to a sentinel value that indicates that the\n node has already been removed. It is safe (and a no-op) to call aws_priority_queue_remove with\n such a sentinel value."] pub fn aws_priority_queue_push_ref (queue : * mut aws_priority_queue , item : * mut :: libc :: c_void , backpointer : * mut aws_priority_queue_node) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the element of the highest priority, and removes it from the queue.. Complexity: O(log(n)).\n 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 :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes a specific node from the priority queue. Complexity: O(log(n))\n After removing a node (using either _remove or _pop), the backpointer set at push_ref time is set\n to a sentinel value. If this sentinel value is passed to aws_priority_queue_remove,\n AWS_ERROR_PRIORITY_QUEUE_BAD_NODE will be raised. Note, however, that passing uninitialized\n 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 :: libc :: c_void , node : * const aws_priority_queue_node) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Obtains a pointer to the element of the highest priority. Complexity: constant time.\n 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 :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes all elements from the queue, but does not free internal memory."] pub fn aws_priority_queue_clear (queue : * mut aws_priority_queue) ; } unsafe extern "C" { # [doc = " Current number of elements in the queue"] pub fn aws_priority_queue_size (queue : * const aws_priority_queue) -> usize ; } unsafe extern "C" { # [doc = " Current allocated capacity for the queue, in dynamic mode this grows over time, in static mode, this will never\n change."] pub fn aws_priority_queue_capacity (queue : * const aws_priority_queue) -> usize ; } unsafe extern "C" { # [doc = " Initializes a queue node to a default value that indicates the node is not in the queue.\n\n @param node priority queue node to initialize with a default value"] pub fn aws_priority_queue_node_init (node : * mut aws_priority_queue_node) ; } unsafe extern "C" { # [doc = " Checks if a priority queue node is currently in a priority queue.\n\n @param node priority queue node to check usage for\n\n @return true if the node is in a queue, false otherwise"] pub fn aws_priority_queue_node_is_in_queue (node : * const aws_priority_queue_node) -> bool ; } impl aws_task_status { pub const AWS_TASK_STATUS_RUN_READY : aws_task_status = aws_task_status (0) ; pub const AWS_TASK_STATUS_CANCELED : aws_task_status = aws_task_status (1) ; } # [repr (transparent)] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub struct aws_task_status (pub :: libc :: c_uint) ; # [doc = " A scheduled function."] pub type aws_task_fn = :: std :: option :: Option < unsafe extern "C" fn (task : * mut aws_task , arg : * mut :: libc :: c_void , arg1 : aws_task_status) > ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_task { pub fn_ : aws_task_fn , pub arg : * mut :: libc :: c_void , pub timestamp : u64 , pub node : aws_linked_list_node , pub priority_queue_node : aws_priority_queue_node , pub type_tag : * const :: libc :: 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_task__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_task__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_task__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_task__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_task__bindgen_ty_1::scheduled"] [:: std :: mem :: offset_of ! (aws_task__bindgen_ty_1 , scheduled) - 0usize] ; ["Offset of field: aws_task__bindgen_ty_1::reserved"] [:: std :: mem :: offset_of ! (aws_task__bindgen_ty_1 , reserved) - 0usize] ; } ; 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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_task"] [:: std :: mem :: size_of :: < aws_task > () - 64usize] ; ["Alignment of aws_task"] [:: std :: mem :: align_of :: < aws_task > () - 8usize] ; ["Offset of field: aws_task::fn_"] [:: std :: mem :: offset_of ! (aws_task , fn_) - 0usize] ; ["Offset of field: aws_task::arg"] [:: std :: mem :: offset_of ! (aws_task , arg) - 8usize] ; ["Offset of field: aws_task::timestamp"] [:: std :: mem :: offset_of ! (aws_task , timestamp) - 16usize] ; ["Offset of field: aws_task::node"] [:: std :: mem :: offset_of ! (aws_task , node) - 24usize] ; ["Offset of field: aws_task::priority_queue_node"] [:: std :: mem :: offset_of ! (aws_task , priority_queue_node) - 40usize] ; ["Offset of field: aws_task::type_tag"] [:: std :: mem :: offset_of ! (aws_task , type_tag) - 48usize] ; ["Offset of field: aws_task::abi_extension"] [:: std :: mem :: offset_of ! (aws_task , abi_extension) - 56usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_task_scheduler"] [:: std :: mem :: size_of :: < aws_task_scheduler > () - 160usize] ; ["Alignment of aws_task_scheduler"] [:: std :: mem :: align_of :: < aws_task_scheduler > () - 8usize] ; ["Offset of field: aws_task_scheduler::alloc"] [:: std :: mem :: offset_of ! (aws_task_scheduler , alloc) - 0usize] ; ["Offset of field: aws_task_scheduler::timed_queue"] [:: std :: mem :: offset_of ! (aws_task_scheduler , timed_queue) - 8usize] ; ["Offset of field: aws_task_scheduler::timed_list"] [:: std :: mem :: offset_of ! (aws_task_scheduler , timed_list) - 96usize] ; ["Offset of field: aws_task_scheduler::asap_list"] [:: std :: mem :: offset_of ! (aws_task_scheduler , asap_list) - 128usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Init an aws_task"] pub fn aws_task_init (task : * mut aws_task , fn_ : aws_task_fn , arg : * mut :: libc :: c_void , type_tag : * const :: libc :: c_char) ; } unsafe extern "C" { pub fn aws_task_run (task : * mut aws_task , status : aws_task_status) ; } unsafe extern "C" { # [doc = " Initializes a task scheduler instance."] pub fn aws_task_scheduler_init (scheduler : * mut aws_task_scheduler , alloc : * mut aws_allocator) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Empties and executes all queued tasks, passing the AWS_TASK_STATUS_CANCELED status to the task function.\n 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) ; } unsafe extern "C" { pub fn aws_task_scheduler_is_valid (scheduler : * const aws_task_scheduler) -> bool ; } unsafe extern "C" { # [doc = " Returns whether the scheduler has any scheduled tasks.\n next_task_time (optional) will be set to time of the next task, note that 0 will be set if tasks were\n 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 ; } unsafe extern "C" { # [doc = " Schedules a task to run immediately.\n 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) ; } unsafe extern "C" { # [doc = " Schedules a task to run at time_to_run.\n 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) ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Sequentially execute all tasks scheduled to run at, or before current_time.\n AWS_TASK_STATUS_RUN_READY will be passed to the task function as the task status.\n\n 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) ; } unsafe 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 :: libc :: c_char ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_channel_direction { AWS_CHANNEL_DIR_READ = 0 , AWS_CHANNEL_DIR_WRITE = 1 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop_local_object { _unused : [u8 ; 0] , } pub type aws_channel_on_setup_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (channel : * mut aws_channel , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_channel_on_shutdown_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (channel : * mut aws_channel , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_channel_slot { pub alloc : * mut aws_allocator , pub channel : * mut aws_channel , pub adj_left : * mut aws_channel_slot , pub adj_right : * mut aws_channel_slot , pub handler : * mut aws_channel_handler , pub window_size : usize , pub upstream_message_overhead : usize , pub current_window_update_batch_size : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_slot"] [:: std :: mem :: size_of :: < aws_channel_slot > () - 64usize] ; ["Alignment of aws_channel_slot"] [:: std :: mem :: align_of :: < aws_channel_slot > () - 8usize] ; ["Offset of field: aws_channel_slot::alloc"] [:: std :: mem :: offset_of ! (aws_channel_slot , alloc) - 0usize] ; ["Offset of field: aws_channel_slot::channel"] [:: std :: mem :: offset_of ! (aws_channel_slot , channel) - 8usize] ; ["Offset of field: aws_channel_slot::adj_left"] [:: std :: mem :: offset_of ! (aws_channel_slot , adj_left) - 16usize] ; ["Offset of field: aws_channel_slot::adj_right"] [:: std :: mem :: offset_of ! (aws_channel_slot , adj_right) - 24usize] ; ["Offset of field: aws_channel_slot::handler"] [:: std :: mem :: offset_of ! (aws_channel_slot , handler) - 32usize] ; ["Offset of field: aws_channel_slot::window_size"] [:: std :: mem :: offset_of ! (aws_channel_slot , window_size) - 40usize] ; ["Offset of field: aws_channel_slot::upstream_message_overhead"] [:: std :: mem :: offset_of ! (aws_channel_slot , upstream_message_overhead) - 48usize] ; ["Offset of field: aws_channel_slot::current_window_update_batch_size"] [:: std :: mem :: offset_of ! (aws_channel_slot , current_window_update_batch_size) - 56usize] ; } ; impl Default for aws_channel_slot { 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_channel_task_fn = :: std :: option :: Option < unsafe extern "C" fn (channel_task : * mut aws_channel_task , arg : * mut :: libc :: c_void , status : aws_task_status) > ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_channel_task { pub wrapper_task : aws_task , pub task_fn : aws_channel_task_fn , pub arg : * mut :: libc :: c_void , pub type_tag : * const :: libc :: c_char , pub node : aws_linked_list_node , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_task"] [:: std :: mem :: size_of :: < aws_channel_task > () - 104usize] ; ["Alignment of aws_channel_task"] [:: std :: mem :: align_of :: < aws_channel_task > () - 8usize] ; ["Offset of field: aws_channel_task::wrapper_task"] [:: std :: mem :: offset_of ! (aws_channel_task , wrapper_task) - 0usize] ; ["Offset of field: aws_channel_task::task_fn"] [:: std :: mem :: offset_of ! (aws_channel_task , task_fn) - 64usize] ; ["Offset of field: aws_channel_task::arg"] [:: std :: mem :: offset_of ! (aws_channel_task , arg) - 72usize] ; ["Offset of field: aws_channel_task::type_tag"] [:: std :: mem :: offset_of ! (aws_channel_task , type_tag) - 80usize] ; ["Offset of field: aws_channel_task::node"] [:: std :: mem :: offset_of ! (aws_channel_task , node) - 88usize] ; } ; impl Default for aws_channel_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 , Default , Copy , Clone)] pub struct aws_channel_handler_vtable { # [doc = " Called by the channel when a message is available for processing in the read direction. It is your\n responsibility to call aws_mem_release(message->allocator, message); on message when you are finished with it.\n You must only call `aws_mem_release(message->allocator, message);` if the `process_read_message`\n returns AWS_OP_SUCCESS. In case of an error, you must not clean up the message and should just raise the error.\n\n Also keep in mind that your slot's internal window has been decremented. You'll want to call\n aws_channel_slot_increment_read_window() at some point in the future if you want to keep receiving data."] pub process_read_message : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , message : * mut aws_io_message) -> :: libc :: c_int > , # [doc = " Called by the channel when a message is available for processing in the write direction. It is your\n responsibility to call aws_mem_release(message->allocator, message); on message when you are finished with it.\n You must only call `aws_mem_release(message->allocator, message);` if the `process_read_message`\n returns AWS_OP_SUCCESS. In case of an error, you must not clean up the message and should just raise the error."] pub process_write_message : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , message : * mut aws_io_message) -> :: libc :: c_int > , # [doc = " Called by the channel when a downstream handler has issued a window increment. You'll want to update your\n internal state and likely propagate a window increment message of your own by calling\n 'aws_channel_slot_increment_read_window()'"] pub increment_read_window : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , size : usize) -> :: libc :: c_int > , # [doc = " The channel calls shutdown on all handlers twice, once to shut down reading, and once to shut down writing.\n Shutdown always begins with the left-most handler, and proceeds to the right with dir set to\n AWS_CHANNEL_DIR_READ. Then shutdown is called on handlers from right to left with dir set to\n AWS_CHANNEL_DIR_WRITE.\n\n The shutdown process does not need to complete immediately and may rely on scheduled tasks.\n The handler must call aws_channel_slot_on_handler_shutdown_complete() when it is finished,\n which propagates shutdown to the next handler.  If 'free_scarce_resources_immediately' is true,\n then resources vulnerable to denial-of-service attacks (such as sockets and file handles)\n must be closed immediately before the shutdown() call returns."] pub shutdown : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , dir : aws_channel_direction , error_code : :: libc :: c_int , free_scarce_resources_immediately : bool) -> :: libc :: c_int > , # [doc = " Called by the channel when the handler is added to a slot, to get the initial window size."] pub initial_window_size : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) -> usize > , # [doc = " Called by the channel anytime a handler is added or removed, provides a hint for downstream\n handlers to avoid message fragmentation due to message overhead."] pub message_overhead : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) -> usize > , # [doc = " Clean up any resources and deallocate yourself. The shutdown process will already be completed before this\n function is called."] pub destroy : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) > , # [doc = " Directs the channel handler to reset all of the internal statistics it tracks about itself."] pub reset_statistics : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) > , # [doc = " Adds a pointer to the handler's internal statistics (if they exist) to a list of statistics structures\n associated with the channel's handler chain."] pub gather_statistics : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , stats_list : * mut aws_array_list) > , pub trigger_read : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_handler_vtable"] [:: std :: mem :: size_of :: < aws_channel_handler_vtable > () - 80usize] ; ["Alignment of aws_channel_handler_vtable"] [:: std :: mem :: align_of :: < aws_channel_handler_vtable > () - 8usize] ; ["Offset of field: aws_channel_handler_vtable::process_read_message"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , process_read_message) - 0usize] ; ["Offset of field: aws_channel_handler_vtable::process_write_message"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , process_write_message) - 8usize] ; ["Offset of field: aws_channel_handler_vtable::increment_read_window"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , increment_read_window) - 16usize] ; ["Offset of field: aws_channel_handler_vtable::shutdown"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , shutdown) - 24usize] ; ["Offset of field: aws_channel_handler_vtable::initial_window_size"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , initial_window_size) - 32usize] ; ["Offset of field: aws_channel_handler_vtable::message_overhead"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , message_overhead) - 40usize] ; ["Offset of field: aws_channel_handler_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , destroy) - 48usize] ; ["Offset of field: aws_channel_handler_vtable::reset_statistics"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , reset_statistics) - 56usize] ; ["Offset of field: aws_channel_handler_vtable::gather_statistics"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , gather_statistics) - 64usize] ; ["Offset of field: aws_channel_handler_vtable::trigger_read"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , trigger_read) - 72usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_channel_handler { pub vtable : * mut aws_channel_handler_vtable , pub alloc : * mut aws_allocator , pub slot : * mut aws_channel_slot , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_handler"] [:: std :: mem :: size_of :: < aws_channel_handler > () - 32usize] ; ["Alignment of aws_channel_handler"] [:: std :: mem :: align_of :: < aws_channel_handler > () - 8usize] ; ["Offset of field: aws_channel_handler::vtable"] [:: std :: mem :: offset_of ! (aws_channel_handler , vtable) - 0usize] ; ["Offset of field: aws_channel_handler::alloc"] [:: std :: mem :: offset_of ! (aws_channel_handler , alloc) - 8usize] ; ["Offset of field: aws_channel_handler::slot"] [:: std :: mem :: offset_of ! (aws_channel_handler , slot) - 16usize] ; ["Offset of field: aws_channel_handler::impl_"] [:: std :: mem :: offset_of ! (aws_channel_handler , impl_) - 24usize] ; } ; impl Default for aws_channel_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 () } } } # [doc = " Args for creating a new channel.\n  event_loop to use for IO and tasks. on_setup_completed will be invoked when\n  the setup process is finished It will be executed in the event loop's thread.\n  on_shutdown_completed will be executed upon channel shutdown.\n\n  enable_read_back_pressure toggles whether or not back pressure will be applied in the channel.\n  Leave this option off unless you're using something like reactive-streams, since it is a slight throughput\n  penalty.\n\n  Unless otherwise\n  specified all functions for channels and channel slots must be executed within that channel's event-loop's thread."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_channel_options { pub event_loop : * mut aws_event_loop , pub on_setup_completed : aws_channel_on_setup_completed_fn , pub on_shutdown_completed : aws_channel_on_shutdown_completed_fn , pub setup_user_data : * mut :: libc :: c_void , pub shutdown_user_data : * mut :: libc :: c_void , pub enable_read_back_pressure : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_options"] [:: std :: mem :: size_of :: < aws_channel_options > () - 48usize] ; ["Alignment of aws_channel_options"] [:: std :: mem :: align_of :: < aws_channel_options > () - 8usize] ; ["Offset of field: aws_channel_options::event_loop"] [:: std :: mem :: offset_of ! (aws_channel_options , event_loop) - 0usize] ; ["Offset of field: aws_channel_options::on_setup_completed"] [:: std :: mem :: offset_of ! (aws_channel_options , on_setup_completed) - 8usize] ; ["Offset of field: aws_channel_options::on_shutdown_completed"] [:: std :: mem :: offset_of ! (aws_channel_options , on_shutdown_completed) - 16usize] ; ["Offset of field: aws_channel_options::setup_user_data"] [:: std :: mem :: offset_of ! (aws_channel_options , setup_user_data) - 24usize] ; ["Offset of field: aws_channel_options::shutdown_user_data"] [:: std :: mem :: offset_of ! (aws_channel_options , shutdown_user_data) - 32usize] ; ["Offset of field: aws_channel_options::enable_read_back_pressure"] [:: std :: mem :: offset_of ! (aws_channel_options , enable_read_back_pressure) - 40usize] ; } ; impl Default for aws_channel_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 () } } } unsafe extern "C" { pub static mut g_aws_channel_max_fragment_size : usize ; } unsafe extern "C" { # [doc = " Initializes channel_task for use."] pub fn aws_channel_task_init (channel_task : * mut aws_channel_task , task_fn : aws_channel_task_fn , arg : * mut :: libc :: c_void , type_tag : * const :: libc :: c_char) ; } unsafe extern "C" { # [doc = " Allocates new channel, Unless otherwise specified all functions for channels and channel slots must be executed\n within that channel's event-loop's thread. channel_options are copied."] pub fn aws_channel_new (allocator : * mut aws_allocator , creation_args : * const aws_channel_options) -> * mut aws_channel ; } unsafe extern "C" { # [doc = " Mark the channel, along with all slots and handlers, for destruction.\n Must be called after shutdown has completed.\n Can be called from any thread assuming 'aws_channel_shutdown()' has completed.\n Note that memory will not be freed until all users which acquired holds on the channel via\n aws_channel_acquire_hold(), release them via aws_channel_release_hold()."] pub fn aws_channel_destroy (channel : * mut aws_channel) ; } unsafe extern "C" { # [doc = " Initiates shutdown of the channel. Shutdown will begin with the left-most slot. Each handler will invoke\n 'aws_channel_slot_on_handler_shutdown_complete' once they've finished their shutdown process for the read direction.\n Once the right-most slot has shutdown in the read direction, the process will start shutting down starting on the\n right-most slot. Once the left-most slot has shutdown in the write direction, 'callbacks->shutdown_completed' will be\n invoked in the event loop's thread.\n\n This function can be called from any thread."] pub fn aws_channel_shutdown (channel : * mut aws_channel , error_code : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Prevent a channel's memory from being freed.\n Any number of users may acquire a hold to prevent a channel and its handlers from being unexpectedly freed.\n Any user which acquires a hold must release it via aws_channel_release_hold().\n Memory will be freed once all holds are released and aws_channel_destroy() has been called."] pub fn aws_channel_acquire_hold (channel : * mut aws_channel) ; } unsafe extern "C" { # [doc = " Release a hold on the channel's memory, allowing it to be freed.\n This may be called before or after aws_channel_destroy()."] pub fn aws_channel_release_hold (channel : * mut aws_channel) ; } unsafe extern "C" { # [doc = " Allocates and initializes a new slot for use with the channel. If this is the first slot in the channel, it will\n automatically be added to the channel as the first slot. For all subsequent calls on a given channel, the slot will\n need to be added to the channel via. the aws_channel_slot_insert_right(), aws_channel_slot_insert_end(), and\n aws_channel_slot_insert_left() APIs."] pub fn aws_channel_slot_new (channel : * mut aws_channel) -> * mut aws_channel_slot ; } unsafe extern "C" { # [doc = " Fetches the event loop the channel is a part of."] pub fn aws_channel_get_event_loop (channel : * mut aws_channel) -> * mut aws_event_loop ; } unsafe extern "C" { # [doc = " Fetches the current timestamp from the event-loop's clock, in nanoseconds."] pub fn aws_channel_current_clock_time (channel : * mut aws_channel , time_nanos : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Retrieves an object by key from the event loop's local storage."] pub fn aws_channel_fetch_local_object (channel : * mut aws_channel , key : * const :: libc :: c_void , obj : * mut aws_event_loop_local_object) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Stores an object by key in the event loop's local storage."] pub fn aws_channel_put_local_object (channel : * mut aws_channel , key : * const :: libc :: c_void , obj : * const aws_event_loop_local_object) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes an object by key from the event loop's local storage."] pub fn aws_channel_remove_local_object (channel : * mut aws_channel , key : * const :: libc :: c_void , removed_obj : * mut aws_event_loop_local_object) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Acquires a message from the event loop's message pool. size_hint is merely a hint, it may be smaller than you\n requested and you are responsible for checking the bounds of it. If the returned message is not large enough, you\n must send multiple messages. This cannot fail, it never returns NULL."] pub fn aws_channel_acquire_message_from_pool (channel : * mut aws_channel , message_type : aws_io_message_type , size_hint : usize) -> * mut aws_io_message ; } unsafe extern "C" { # [doc = " Schedules a task to run on the event loop as soon as possible.\n This is the ideal way to move a task into the correct thread. It's also handy for context switches.\n This function is safe to call from any thread.\n\n If called from the channel's event loop, the task will get directly added to the run-now list.\n If called from outside the channel's event loop, the task will go into a cross-thread task queue.\n\n If tasks must be serialized relative to some source synchronization, you may not want to use this API\n because tasks submitted from the event loop thread can \"jump ahead\" of tasks submitted from external threads\n due to this optimization.  If this is a problem, you can either refactor your submission logic or use\n the aws_channel_schedule_task_now_serialized variant which does not perform this optimization.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_channel_schedule_task_now (channel : * mut aws_channel , task : * mut aws_channel_task) ; } unsafe extern "C" { # [doc = " Schedules a task to run on the event loop as soon as possible.\n\n This variant always uses the cross thread queue rather than conditionally skipping it when already in\n the destination event loop.  While not \"optimal\", this allows us to serialize task execution no matter where\n the task was submitted from: if you are submitting tasks from a critical section, the serialized order that you\n submit is guaranteed to be the order that they execute on the event loop.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_channel_schedule_task_now_serialized (channel : * mut aws_channel , task : * mut aws_channel_task) ; } unsafe extern "C" { # [doc = " Schedules a task to run on the event loop at the specified time.\n This is the ideal way to move a task into the correct thread. It's also handy for context switches.\n Use aws_channel_current_clock_time() to get the current time in nanoseconds.\n This function is safe to call from any thread.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_channel_schedule_task_future (channel : * mut aws_channel , task : * mut aws_channel_task , run_at_nanos : u64) ; } unsafe extern "C" { # [doc = " Instrument a channel with a statistics handler.  While instrumented with a statistics handler, the channel\n will periodically report per-channel-handler-specific statistics about handler performance and state.\n\n Assigning a statistics handler to a channel is a transfer of ownership -- the channel will clean up\n the handler appropriately.  Statistics handlers may be changed dynamically (for example, the upgrade\n from a vanilla http channel to a websocket channel), but this function may only be called from the\n event loop thread that the channel is a part of.\n\n The first possible hook to set a statistics handler is the channel's creation callback."] pub fn aws_channel_set_statistics_handler (channel : * mut aws_channel , handler : * mut aws_crt_statistics_handler) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Returns true if the caller is on the event loop's thread. If false, you likely need to use\n aws_channel_schedule_task(). This function is safe to call from any thread."] pub fn aws_channel_thread_is_callers_thread (channel : * mut aws_channel) -> bool ; } unsafe extern "C" { # [doc = " Sets the handler for a slot, the slot will also call get_current_window_size() and propagate a window update\n upstream."] pub fn aws_channel_slot_set_handler (slot : * mut aws_channel_slot , handler : * mut aws_channel_handler) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes slot from the channel and deallocates the slot and its handler."] pub fn aws_channel_slot_remove (slot : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Replaces remove with new_slot. Deallocates remove and its handler."] pub fn aws_channel_slot_replace (remove : * mut aws_channel_slot , new_slot : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " inserts 'to_add' to the position immediately to the right of slot. Note that the first call to\n aws_channel_slot_new() adds it to the channel implicitly."] pub fn aws_channel_slot_insert_right (slot : * mut aws_channel_slot , to_add : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Inserts to 'to_add' the end of the channel. Note that the first call to\n aws_channel_slot_new() adds it to the channel implicitly."] pub fn aws_channel_slot_insert_end (channel : * mut aws_channel , to_add : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " inserts 'to_add' to the position immediately to the left of slot. Note that the first call to\n aws_channel_slot_new() adds it to the channel implicitly."] pub fn aws_channel_slot_insert_left (slot : * mut aws_channel_slot , to_add : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Sends a message to the adjacent slot in the channel based on dir. Also does window size checking.\n\n NOTE: if this function returns an error code, it is the caller's responsibility to release message\n back to the pool. If this function returns AWS_OP_SUCCESS, the recipient of the message has taken\n ownership of the message. So, for example, don't release a message to the pool and then return an error.\n If you encounter an error condition in this case, shutdown the channel with the appropriate error code."] pub fn aws_channel_slot_send_message (slot : * mut aws_channel_slot , message : * mut aws_io_message , dir : aws_channel_direction) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Convenience function that invokes aws_channel_acquire_message_from_pool(),\n asking for the largest reasonable DATA message that can be sent in the write direction,\n with upstream overhead accounted for. This cannot fail, it never returns NULL."] pub fn aws_channel_slot_acquire_max_message_for_write (slot : * mut aws_channel_slot) -> * mut aws_io_message ; } unsafe extern "C" { # [doc = " Issues a window update notification upstream (to the left.)"] pub fn aws_channel_slot_increment_read_window (slot : * mut aws_channel_slot , window : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Called by handlers once they have finished their shutdown in the 'dir' direction. Propagates the shutdown process\n to the next handler in the channel."] pub fn aws_channel_slot_on_handler_shutdown_complete (slot : * mut aws_channel_slot , dir : aws_channel_direction , err_code : :: libc :: c_int , free_scarce_resources_immediately : bool) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initiates shutdown on slot. callbacks->on_shutdown_completed will be called\n once the shutdown process is completed."] pub fn aws_channel_slot_shutdown (slot : * mut aws_channel_slot , dir : aws_channel_direction , err_code : :: libc :: c_int , free_scarce_resources_immediately : bool) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Fetches the downstream read window. This gives you the information necessary to honor the read window. If you call\n send_message() and it exceeds this window, the message will be rejected."] pub fn aws_channel_slot_downstream_read_window (slot : * mut aws_channel_slot) -> usize ; } unsafe extern "C" { # [doc = " Fetches the current overhead of upstream handlers. This provides a hint to avoid fragmentation if you care."] pub fn aws_channel_slot_upstream_message_overhead (slot : * mut aws_channel_slot) -> usize ; } unsafe extern "C" { # [doc = " Calls destroy on handler's vtable"] pub fn aws_channel_handler_destroy (handler : * mut aws_channel_handler) ; } unsafe extern "C" { # [doc = " Calls process_read_message on handler's vtable"] pub fn aws_channel_handler_process_read_message (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , message : * mut aws_io_message) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Calls process_write_message on handler's vtable."] pub fn aws_channel_handler_process_write_message (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , message : * mut aws_io_message) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Calls on_window_update on handler's vtable."] pub fn aws_channel_handler_increment_read_window (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , size : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " calls shutdown_direction on handler's vtable."] pub fn aws_channel_handler_shutdown (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , dir : aws_channel_direction , error_code : :: libc :: c_int , free_scarce_resources_immediately : bool) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Calls initial_window_size on handler's vtable."] pub fn aws_channel_handler_initial_window_size (handler : * mut aws_channel_handler) -> usize ; } unsafe extern "C" { pub fn aws_channel_get_first_slot (channel : * mut aws_channel) -> * mut aws_channel_slot ; } unsafe extern "C" { # [doc = " A way for external processes to force a read by the data-source channel handler.  Necessary in certain cases, like\n when a server channel finishes setting up its initial handlers, a read may have already been triggered on the\n socket (the client's CLIENT_HELLO tls payload, for example) and absent further data/notifications, this data\n would never get processed."] pub fn aws_channel_trigger_read (channel : * mut aws_channel) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_address_record_type { AWS_ADDRESS_RECORD_TYPE_A = 0 , AWS_ADDRESS_RECORD_TYPE_AAAA = 1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_get_host_address_flags { AWS_GET_HOST_ADDRESS_COUNT_RECORD_TYPE_A = 1 , AWS_GET_HOST_ADDRESS_COUNT_RECORD_TYPE_AAAA = 2 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_host_address { pub allocator : * mut aws_allocator , pub host : * const aws_string , pub address : * const aws_string , pub record_type : aws_address_record_type , pub expiry : u64 , pub use_count : usize , pub connection_failure_count : usize , pub weight : u8 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_address"] [:: std :: mem :: size_of :: < aws_host_address > () - 64usize] ; ["Alignment of aws_host_address"] [:: std :: mem :: align_of :: < aws_host_address > () - 8usize] ; ["Offset of field: aws_host_address::allocator"] [:: std :: mem :: offset_of ! (aws_host_address , allocator) - 0usize] ; ["Offset of field: aws_host_address::host"] [:: std :: mem :: offset_of ! (aws_host_address , host) - 8usize] ; ["Offset of field: aws_host_address::address"] [:: std :: mem :: offset_of ! (aws_host_address , address) - 16usize] ; ["Offset of field: aws_host_address::record_type"] [:: std :: mem :: offset_of ! (aws_host_address , record_type) - 24usize] ; ["Offset of field: aws_host_address::expiry"] [:: std :: mem :: offset_of ! (aws_host_address , expiry) - 32usize] ; ["Offset of field: aws_host_address::use_count"] [:: std :: mem :: offset_of ! (aws_host_address , use_count) - 40usize] ; ["Offset of field: aws_host_address::connection_failure_count"] [:: std :: mem :: offset_of ! (aws_host_address , connection_failure_count) - 48usize] ; ["Offset of field: aws_host_address::weight"] [:: std :: mem :: offset_of ! (aws_host_address , weight) - 56usize] ; } ; impl Default for aws_host_address { 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 once an address has been resolved for host. The type in host_addresses is struct aws_host_address (by-value).\n The caller does not own this memory and you must copy the host address before returning from this function if you\n plan to use it later. For convenience, we've provided the aws_host_address_copy() and aws_host_address_clean_up()\n functions."] pub type aws_on_host_resolved_result_fn = :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , host_name : * const aws_string , err_code : :: libc :: c_int , host_addresses : * const aws_array_list , user_data : * mut :: libc :: c_void) > ; # [doc = " Function signature for configuring your own resolver (the default just uses getaddrinfo()). The type in\n output_addresses is struct aws_host_address (by-value). We assume this function blocks, hence this absurdly\n complicated design."] pub type aws_resolve_host_implementation_fn = :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , host_name : * const aws_string , output_addresses : * mut aws_array_list , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_host_resolution_config { pub impl_ : aws_resolve_host_implementation_fn , pub max_ttl : usize , pub impl_data : * mut :: libc :: c_void , pub resolve_frequency_ns : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolution_config"] [:: std :: mem :: size_of :: < aws_host_resolution_config > () - 32usize] ; ["Alignment of aws_host_resolution_config"] [:: std :: mem :: align_of :: < aws_host_resolution_config > () - 8usize] ; ["Offset of field: aws_host_resolution_config::impl_"] [:: std :: mem :: offset_of ! (aws_host_resolution_config , impl_) - 0usize] ; ["Offset of field: aws_host_resolution_config::max_ttl"] [:: std :: mem :: offset_of ! (aws_host_resolution_config , max_ttl) - 8usize] ; ["Offset of field: aws_host_resolution_config::impl_data"] [:: std :: mem :: offset_of ! (aws_host_resolution_config , impl_data) - 16usize] ; ["Offset of field: aws_host_resolution_config::resolve_frequency_ns"] [:: std :: mem :: offset_of ! (aws_host_resolution_config , resolve_frequency_ns) - 24usize] ; } ; impl Default for aws_host_resolution_config { 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)] pub struct aws_host_resolver_purge_host_options { pub host : * const aws_string , pub on_host_purge_complete_callback : aws_simple_completion_callback , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolver_purge_host_options"] [:: std :: mem :: size_of :: < aws_host_resolver_purge_host_options > () - 24usize] ; ["Alignment of aws_host_resolver_purge_host_options"] [:: std :: mem :: align_of :: < aws_host_resolver_purge_host_options > () - 8usize] ; ["Offset of field: aws_host_resolver_purge_host_options::host"] [:: std :: mem :: offset_of ! (aws_host_resolver_purge_host_options , host) - 0usize] ; ["Offset of field: aws_host_resolver_purge_host_options::on_host_purge_complete_callback"] [:: std :: mem :: offset_of ! (aws_host_resolver_purge_host_options , on_host_purge_complete_callback) - 8usize] ; ["Offset of field: aws_host_resolver_purge_host_options::user_data"] [:: std :: mem :: offset_of ! (aws_host_resolver_purge_host_options , user_data) - 16usize] ; } ; impl Default for aws_host_resolver_purge_host_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 () } } } # [doc = " should you absolutely disdain the default implementation, feel free to implement your own."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_host_resolver_vtable { # [doc = " clean up everything you allocated, but not resolver itself."] pub destroy : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver) > , # [doc = " resolve the host by host_name, the user owns host_name, so it needs to be copied if you persist it,\n invoke res with the result. This function should never block."] pub resolve_host : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , host_name : * const aws_string , res : aws_on_host_resolved_result_fn , config : * const aws_host_resolution_config , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > , # [doc = " gives your implementation a hint that an address has some failed connections occuring. Do whatever you want (or\n nothing) about it."] pub record_connection_failure : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , address : * const aws_host_address) -> :: libc :: c_int > , # [doc = " @Deprecated Use purge_cache_with_callback instead\n wipe out anything you have cached."] pub purge_cache : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver) -> :: libc :: c_int > , # [doc = " wipe out anything you have cached."] pub purge_cache_with_callback : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , on_purge_cache_complete_callback : aws_simple_completion_callback , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > , # [doc = " wipe out anything cached for a specific host"] pub purge_host_cache : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , options : * const aws_host_resolver_purge_host_options) -> :: libc :: c_int > , # [doc = " get number of addresses for a given host."] pub get_host_address_count : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , host_name : * const aws_string , flags : u32) -> usize > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolver_vtable"] [:: std :: mem :: size_of :: < aws_host_resolver_vtable > () - 56usize] ; ["Alignment of aws_host_resolver_vtable"] [:: std :: mem :: align_of :: < aws_host_resolver_vtable > () - 8usize] ; ["Offset of field: aws_host_resolver_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , destroy) - 0usize] ; ["Offset of field: aws_host_resolver_vtable::resolve_host"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , resolve_host) - 8usize] ; ["Offset of field: aws_host_resolver_vtable::record_connection_failure"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , record_connection_failure) - 16usize] ; ["Offset of field: aws_host_resolver_vtable::purge_cache"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , purge_cache) - 24usize] ; ["Offset of field: aws_host_resolver_vtable::purge_cache_with_callback"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , purge_cache_with_callback) - 32usize] ; ["Offset of field: aws_host_resolver_vtable::purge_host_cache"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , purge_host_cache) - 40usize] ; ["Offset of field: aws_host_resolver_vtable::get_host_address_count"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , get_host_address_count) - 48usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_host_resolver { pub allocator : * mut aws_allocator , pub impl_ : * mut :: libc :: c_void , pub vtable : * mut aws_host_resolver_vtable , pub ref_count : aws_ref_count , pub shutdown_options : aws_shutdown_callback_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolver"] [:: std :: mem :: size_of :: < aws_host_resolver > () - 64usize] ; ["Alignment of aws_host_resolver"] [:: std :: mem :: align_of :: < aws_host_resolver > () - 8usize] ; ["Offset of field: aws_host_resolver::allocator"] [:: std :: mem :: offset_of ! (aws_host_resolver , allocator) - 0usize] ; ["Offset of field: aws_host_resolver::impl_"] [:: std :: mem :: offset_of ! (aws_host_resolver , impl_) - 8usize] ; ["Offset of field: aws_host_resolver::vtable"] [:: std :: mem :: offset_of ! (aws_host_resolver , vtable) - 16usize] ; ["Offset of field: aws_host_resolver::ref_count"] [:: std :: mem :: offset_of ! (aws_host_resolver , ref_count) - 24usize] ; ["Offset of field: aws_host_resolver::shutdown_options"] [:: std :: mem :: offset_of ! (aws_host_resolver , shutdown_options) - 48usize] ; } ; impl Default for aws_host_resolver { 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)] pub struct aws_host_resolver_default_options { pub max_entries : usize , pub el_group : * mut aws_event_loop_group , pub shutdown_options : * const aws_shutdown_callback_options , pub system_clock_override_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolver_default_options"] [:: std :: mem :: size_of :: < aws_host_resolver_default_options > () - 32usize] ; ["Alignment of aws_host_resolver_default_options"] [:: std :: mem :: align_of :: < aws_host_resolver_default_options > () - 8usize] ; ["Offset of field: aws_host_resolver_default_options::max_entries"] [:: std :: mem :: offset_of ! (aws_host_resolver_default_options , max_entries) - 0usize] ; ["Offset of field: aws_host_resolver_default_options::el_group"] [:: std :: mem :: offset_of ! (aws_host_resolver_default_options , el_group) - 8usize] ; ["Offset of field: aws_host_resolver_default_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_host_resolver_default_options , shutdown_options) - 16usize] ; ["Offset of field: aws_host_resolver_default_options::system_clock_override_fn"] [:: std :: mem :: offset_of ! (aws_host_resolver_default_options , system_clock_override_fn) - 24usize] ; } ; impl Default for aws_host_resolver_default_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 () } } } unsafe extern "C" { # [doc = " Copies `from` to `to`."] pub fn aws_host_address_copy (from : * const aws_host_address , to : * mut aws_host_address) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Moves `from` to `to`. After this call, from is no longer usable. Though, it could be resused for another\n move or copy operation."] pub fn aws_host_address_move (from : * mut aws_host_address , to : * mut aws_host_address) ; } unsafe extern "C" { # [doc = " Cleans up the memory for `address`"] pub fn aws_host_address_clean_up (address : * mut aws_host_address) ; } unsafe extern "C" { # [doc = " WARNING! do not call this function directly (getaddrinfo()): it blocks. Provide a pointer to this function for other\n resolution functions."] pub fn aws_default_dns_resolve (allocator : * mut aws_allocator , host_name : * const aws_string , output_addresses : * mut aws_array_list , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Creates a host resolver with the default behavior. Here's the behavior:\n\n Since there's not a reliable way to do non-blocking DNS without a ton of risky work that would need years of testing\n on every Unix system in existence, we work around it by doing a threaded implementation.\n\n When you request an address, it checks the cache. If the entry isn't in the cache it creates a new one.\n Each entry has a potentially short lived back-ground thread based on ttl for the records. Once we've populated the\n cache and you keep the resolver active, the resolution callback will be invoked immediately. When it's idle, it will\n take a little while in the background thread to fetch more, evaluate TTLs etc... In that case your callback will be\n invoked from the background thread.\n\n --------------------------------------------------------------------------------------------------------------------\n\n A few things to note about TTLs and connection failures.\n\n We attempt to honor your max ttl but will not honor it if dns queries are failing or all of your connections are\n marked as failed. Once we are able to query dns again, we will re-evaluate the TTLs.\n\n Upon notification connection failures, we move them to a separate list. Eventually we retry them when it's likely\n that the endpoint is healthy again or we don't really have another choice, but we try to keep them out of your\n hot path.\n\n ---------------------------------------------------------------------------------------------------------------------\n\n Finally, this entire design attempts to prevent problems where developers have to choose between large TTLs and thus\n sticky hosts or short TTLs and good fleet utilization but now higher latencies. In this design, we resolve every\n second in the background (only while you're actually using the record), but we do not expire the earlier resolved\n addresses until max ttl has passed.\n\n This for example, should enable you to hit thousands of hosts in the Amazon S3 fleet instead of just one or two."] pub fn aws_host_resolver_new_default (allocator : * mut aws_allocator , options : * const aws_host_resolver_default_options) -> * mut aws_host_resolver ; } unsafe extern "C" { # [doc = " Increments the reference count on the host resolver, allowing the caller to take a reference to it.\n\n Returns the same host resolver passed in."] pub fn aws_host_resolver_acquire (resolver : * mut aws_host_resolver) -> * mut aws_host_resolver ; } unsafe extern "C" { # [doc = " Decrements a host resolver's ref count.  When the ref count drops to zero, the resolver will be destroyed."] pub fn aws_host_resolver_release (resolver : * mut aws_host_resolver) ; } unsafe extern "C" { # [doc = " calls resolve_host on the vtable. config will be copied."] pub fn aws_host_resolver_resolve_host (resolver : * mut aws_host_resolver , host_name : * const aws_string , res : aws_on_host_resolved_result_fn , config : * const aws_host_resolution_config , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " calls record_connection_failure on the vtable."] pub fn aws_host_resolver_record_connection_failure (resolver : * mut aws_host_resolver , address : * const aws_host_address) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " @Deprecated Use purge_cache_with_callback instead\n calls purge_cache on the vtable."] pub fn aws_host_resolver_purge_cache (resolver : * mut aws_host_resolver) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Calls aws_host_resolver_purge_cache_with_callback on the vtable which will wipe out everything host resolver has\n cached."] pub fn aws_host_resolver_purge_cache_with_callback (resolver : * mut aws_host_resolver , on_purge_cache_complete_callback : aws_simple_completion_callback , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes the cache for a host asynchronously."] pub fn aws_host_resolver_purge_host_cache (resolver : * mut aws_host_resolver , options : * const aws_host_resolver_purge_host_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " get number of addresses for a given host."] pub fn aws_host_resolver_get_host_address_count (resolver : * mut aws_host_resolver , host_name : * const aws_string , flags : u32) -> usize ; } unsafe extern "C" { # [doc = " Returns the default host resolution config used internally if none specified.\n\n @return default host resolution config"] pub fn aws_host_resolver_init_default_resolution_config () -> aws_host_resolution_config ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_socket { _unused : [u8 ; 0] , } # [doc = " Generic event function for channel lifecycle events.\n\n Callbacks are provided for:\n   (1) Channel creation\n   (2) Channel setup - If TLS is being used, this function is called once the socket has connected, the channel has\n been initialized, and TLS has been successfully negotiated. A TLS handler has already been added to the channel. If\n TLS negotiation fails, this function will be called with the corresponding error code. If TLS is not being used, this\n function is called once the socket has connected and the channel has been initialized.\n   (3) Channel shutdown\n\n These callbacks are always invoked within the thread of the event-loop that the channel is assigned to.\n\n This function does NOT always imply \"success\" -- if error_code is AWS_OP_SUCCESS then everything was successful,\n otherwise an error condition occurred."] pub type aws_client_bootstrap_on_channel_event_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_client_bootstrap , error_code : :: libc :: c_int , channel : * mut aws_channel , user_data : * mut :: libc :: c_void) > ; # [doc = " If ALPN is being used this function will be invoked by the channel once an ALPN message is received. The returned\n channel_handler will be added to, and managed by, the channel."] pub type aws_channel_on_protocol_negotiated_fn = :: std :: option :: Option < unsafe extern "C" fn (new_slot : * mut aws_channel_slot , protocol : * mut aws_byte_buf , user_data : * mut :: libc :: c_void) -> * mut aws_channel_handler > ; # [doc = " Called after client bootstrap has been completely cleaned up, after its last refcount is released."] pub type aws_client_bootstrap_shutdown_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " aws_client_bootstrap handles creation and setup of channels that communicate via socket with a specific endpoint."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_client_bootstrap { pub allocator : * mut aws_allocator , pub event_loop_group : * mut aws_event_loop_group , pub host_resolver : * mut aws_host_resolver , pub host_resolver_config : aws_host_resolution_config , pub on_protocol_negotiated : aws_channel_on_protocol_negotiated_fn , pub ref_count : aws_ref_count , pub on_shutdown_complete : aws_client_bootstrap_shutdown_complete_fn , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_client_bootstrap"] [:: std :: mem :: size_of :: < aws_client_bootstrap > () - 104usize] ; ["Alignment of aws_client_bootstrap"] [:: std :: mem :: align_of :: < aws_client_bootstrap > () - 8usize] ; ["Offset of field: aws_client_bootstrap::allocator"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , allocator) - 0usize] ; ["Offset of field: aws_client_bootstrap::event_loop_group"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , event_loop_group) - 8usize] ; ["Offset of field: aws_client_bootstrap::host_resolver"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , host_resolver) - 16usize] ; ["Offset of field: aws_client_bootstrap::host_resolver_config"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , host_resolver_config) - 24usize] ; ["Offset of field: aws_client_bootstrap::on_protocol_negotiated"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , on_protocol_negotiated) - 56usize] ; ["Offset of field: aws_client_bootstrap::ref_count"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , ref_count) - 64usize] ; ["Offset of field: aws_client_bootstrap::on_shutdown_complete"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , on_shutdown_complete) - 88usize] ; ["Offset of field: aws_client_bootstrap::user_data"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , user_data) - 96usize] ; } ; impl Default for aws_client_bootstrap { 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 = " aws_client_bootstrap creation options."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_client_bootstrap_options { pub event_loop_group : * mut aws_event_loop_group , pub host_resolver : * mut aws_host_resolver , pub host_resolution_config : * const aws_host_resolution_config , pub on_shutdown_complete : aws_client_bootstrap_shutdown_complete_fn , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_client_bootstrap_options"] [:: std :: mem :: size_of :: < aws_client_bootstrap_options > () - 40usize] ; ["Alignment of aws_client_bootstrap_options"] [:: std :: mem :: align_of :: < aws_client_bootstrap_options > () - 8usize] ; ["Offset of field: aws_client_bootstrap_options::event_loop_group"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , event_loop_group) - 0usize] ; ["Offset of field: aws_client_bootstrap_options::host_resolver"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , host_resolver) - 8usize] ; ["Offset of field: aws_client_bootstrap_options::host_resolution_config"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , host_resolution_config) - 16usize] ; ["Offset of field: aws_client_bootstrap_options::on_shutdown_complete"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , on_shutdown_complete) - 24usize] ; ["Offset of field: aws_client_bootstrap_options::user_data"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , user_data) - 32usize] ; } ; impl Default for aws_client_bootstrap_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 () } } } # [doc = " If TLS is being used, this function is called once the socket has received an incoming connection, the channel has\n been initialized, and TLS has been successfully negotiated. A TLS handler has already been added to the channel. If\n TLS negotiation fails, this function will be called with the corresponding error code.\n\n If TLS is not being used, this function is called once the socket has received an incoming connection and the channel\n has been initialized.\n\n This function is always called within the thread of the event-loop that the new channel is assigned to upon success.\n\n On failure, the channel might not be assigned to an event loop yet, and will thus be invoked on the listener's\n event-loop thread.\n\n This function does NOT mean \"success\", if error_code is AWS_OP_SUCCESS then everything was successful, otherwise an\n error condition occurred.\n\n If an error occurred, you do not need to shutdown the channel. The `aws_channel_client_shutdown_callback` will be\n invoked once the channel has finished shutting down."] pub type aws_server_bootstrap_on_accept_channel_setup_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_server_bootstrap , error_code : :: libc :: c_int , channel : * mut aws_channel , user_data : * mut :: libc :: c_void) > ; # [doc = " Once the channel shuts down, this function will be invoked within the thread of\n the event-loop that the channel is assigned to.\n\n Note: this function is only invoked if the channel was successfully setup,\n e.g. aws_server_bootstrap_on_accept_channel_setup_fn() was invoked without an error code."] pub type aws_server_bootstrap_on_accept_channel_shutdown_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_server_bootstrap , error_code : :: libc :: c_int , channel : * mut aws_channel , user_data : * mut :: libc :: c_void) > ; # [doc = " This function is only used for async listener (Apple Network Framework in this case).\n Once the server listener socket is finished setup and starting listening, this fuction\n will be invoked."] pub type aws_server_bootstrap_on_listener_setup_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_server_bootstrap , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Once the server listener socket is finished destroying, and all the existing connections are closed, this fuction\n will be invoked."] pub type aws_server_bootstrap_on_server_listener_destroy_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_server_bootstrap , user_data : * mut :: libc :: c_void) > ; # [doc = " aws_server_bootstrap manages listening sockets, creating and setting up channels to handle each incoming connection."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_server_bootstrap { pub allocator : * mut aws_allocator , pub event_loop_group : * mut aws_event_loop_group , pub on_protocol_negotiated : aws_channel_on_protocol_negotiated_fn , pub ref_count : aws_ref_count , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_server_bootstrap"] [:: std :: mem :: size_of :: < aws_server_bootstrap > () - 48usize] ; ["Alignment of aws_server_bootstrap"] [:: std :: mem :: align_of :: < aws_server_bootstrap > () - 8usize] ; ["Offset of field: aws_server_bootstrap::allocator"] [:: std :: mem :: offset_of ! (aws_server_bootstrap , allocator) - 0usize] ; ["Offset of field: aws_server_bootstrap::event_loop_group"] [:: std :: mem :: offset_of ! (aws_server_bootstrap , event_loop_group) - 8usize] ; ["Offset of field: aws_server_bootstrap::on_protocol_negotiated"] [:: std :: mem :: offset_of ! (aws_server_bootstrap , on_protocol_negotiated) - 16usize] ; ["Offset of field: aws_server_bootstrap::ref_count"] [:: std :: mem :: offset_of ! (aws_server_bootstrap , ref_count) - 24usize] ; } ; impl Default for aws_server_bootstrap { 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 = " Socket-based channel creation options.\n\n bootstrap - configs name resolution and which event loop group the connection will be seated into\n host_name - host to connect to; if a dns address, will be resolved prior to connecting\n port - port to connect to\n socket_options - socket properties, including type (tcp vs. udp vs. unix domain) and connect timeout.  TLS\n   connections are currently restricted to tcp (AWS_SOCKET_STREAM) only.\n tls_options - (optional) tls context to apply after connection establishment.  If NULL, the connection will\n   not be protected by TLS.\n creation_callback - (optional) callback invoked when the channel is first created.  This is always right after\n   the connection was successfully established.  *Does NOT* get called if the initial connect failed.\n setup_callback - callback invoked once the channel is ready for use and TLS has been negotiated or if an error\n   is encountered\n shutdown_callback - callback invoked once the channel has shutdown.\n enable_read_back_pressure - controls whether or not back pressure will be applied in the channel\n user_data - arbitrary data to pass back to the various callbacks\n requested_event_loop - if set, the connection will be placed on the requested event loop rather than one\n  chosen internally from the bootstrap's associated event loop group.  It is an error to pass in an event loop\n  that is not associated with the bootstrap's event loop group.\n\n Immediately after the `shutdown_callback` returns, the channel is cleaned up automatically. All callbacks are invoked\n in the thread of the event-loop that the new channel is assigned to.\n"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_socket_channel_bootstrap_options { pub bootstrap : * mut aws_client_bootstrap , pub host_name : * const :: libc :: c_char , pub port : u32 , pub socket_options : * const aws_socket_options , pub tls_options : * const aws_tls_connection_options , pub creation_callback : aws_client_bootstrap_on_channel_event_fn , pub setup_callback : aws_client_bootstrap_on_channel_event_fn , pub shutdown_callback : aws_client_bootstrap_on_channel_event_fn , pub enable_read_back_pressure : bool , pub user_data : * mut :: libc :: c_void , pub requested_event_loop : * mut aws_event_loop , pub host_resolution_override_config : * const aws_host_resolution_config , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_socket_channel_bootstrap_options"] [:: std :: mem :: size_of :: < aws_socket_channel_bootstrap_options > () - 96usize] ; ["Alignment of aws_socket_channel_bootstrap_options"] [:: std :: mem :: align_of :: < aws_socket_channel_bootstrap_options > () - 8usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , bootstrap) - 0usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::host_name"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , host_name) - 8usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::port"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , port) - 16usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::socket_options"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , socket_options) - 24usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::tls_options"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , tls_options) - 32usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::creation_callback"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , creation_callback) - 40usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::setup_callback"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , setup_callback) - 48usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , shutdown_callback) - 56usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::enable_read_back_pressure"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , enable_read_back_pressure) - 64usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::user_data"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , user_data) - 72usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::requested_event_loop"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , requested_event_loop) - 80usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::host_resolution_override_config"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , host_resolution_override_config) - 88usize] ; } ; impl Default for aws_socket_channel_bootstrap_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 () } } } # [doc = " Arguments to setup a server socket listener which will also negotiate and configure TLS.\n This creates a socket listener bound to `host` and 'port' using socket options `options`, and TLS options\n `tls_options`. `incoming_callback` will be invoked once an incoming channel is ready for use and TLS is\n finished negotiating, or if an error is encountered. `shutdown_callback` will be invoked once the channel has\n shutdown. `destroy_callback` will be invoked after the server socket listener is destroyed, and all associated\n connections and channels have finished shutting down. Immediately after the `shutdown_callback` returns, the channel\n is cleaned up automatically. All callbacks are invoked in the thread of the event-loop that listener is assigned to.\n\n Upon shutdown of your application, you'll want to call `aws_server_bootstrap_destroy_socket_listener` with the return\n value from this function.\n\n The socket type in `options` must be AWS_SOCKET_STREAM if tls_options is set.\n DTLS is not currently supported for tls."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_server_socket_channel_bootstrap_options { pub bootstrap : * mut aws_server_bootstrap , pub host_name : * const :: libc :: c_char , pub port : u32 , pub socket_options : * const aws_socket_options , pub tls_options : * const aws_tls_connection_options , pub setup_callback : aws_server_bootstrap_on_listener_setup_fn , pub incoming_callback : aws_server_bootstrap_on_accept_channel_setup_fn , pub shutdown_callback : aws_server_bootstrap_on_accept_channel_shutdown_fn , pub destroy_callback : aws_server_bootstrap_on_server_listener_destroy_fn , pub enable_read_back_pressure : bool , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_server_socket_channel_bootstrap_options"] [:: std :: mem :: size_of :: < aws_server_socket_channel_bootstrap_options > () - 88usize] ; ["Alignment of aws_server_socket_channel_bootstrap_options"] [:: std :: mem :: align_of :: < aws_server_socket_channel_bootstrap_options > () - 8usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , bootstrap) - 0usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::host_name"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , host_name) - 8usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::port"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , port) - 16usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::socket_options"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , socket_options) - 24usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::tls_options"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , tls_options) - 32usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::setup_callback"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , setup_callback) - 40usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::incoming_callback"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , incoming_callback) - 48usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , shutdown_callback) - 56usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::destroy_callback"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , destroy_callback) - 64usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::enable_read_back_pressure"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , enable_read_back_pressure) - 72usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::user_data"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , user_data) - 80usize] ; } ; impl Default for aws_server_socket_channel_bootstrap_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 () } } } unsafe extern "C" { # [doc = " Create the client bootstrap."] pub fn aws_client_bootstrap_new (allocator : * mut aws_allocator , options : * const aws_client_bootstrap_options) -> * mut aws_client_bootstrap ; } unsafe extern "C" { # [doc = " Increments a client bootstrap's ref count, allowing the caller to take a reference to it.\n\n Returns the same client bootstrap passed in."] pub fn aws_client_bootstrap_acquire (bootstrap : * mut aws_client_bootstrap) -> * mut aws_client_bootstrap ; } unsafe extern "C" { # [doc = " Decrements a client bootstrap's ref count.  When the ref count drops to zero, the bootstrap will be destroyed."] pub fn aws_client_bootstrap_release (bootstrap : * mut aws_client_bootstrap) ; } unsafe extern "C" { # [doc = " When using TLS, if ALPN is used, this callback will be invoked from the channel. The returned handler will be added\n to the channel."] pub fn aws_client_bootstrap_set_alpn_callback (bootstrap : * mut aws_client_bootstrap , on_protocol_negotiated : aws_channel_on_protocol_negotiated_fn) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Sets up a client socket channel."] pub fn aws_client_bootstrap_new_socket_channel (options : * mut aws_socket_channel_bootstrap_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes the server bootstrap with `allocator` and `el_group`. This object manages listeners, server connections,\n and channels."] pub fn aws_server_bootstrap_new (allocator : * mut aws_allocator , el_group : * mut aws_event_loop_group) -> * mut aws_server_bootstrap ; } unsafe extern "C" { # [doc = " Increments a server bootstrap's ref count, allowing the caller to take a reference to it.\n\n Returns the same server bootstrap passed in."] pub fn aws_server_bootstrap_acquire (bootstrap : * mut aws_server_bootstrap) -> * mut aws_server_bootstrap ; } unsafe extern "C" { # [doc = " Decrements a server bootstrap's ref count.  When the ref count drops to zero, the bootstrap will be destroyed."] pub fn aws_server_bootstrap_release (bootstrap : * mut aws_server_bootstrap) ; } unsafe extern "C" { # [doc = " When using TLS, if ALPN is used, this callback will be invoked from the channel. The returned handler will be added\n to the channel."] pub fn aws_server_bootstrap_set_alpn_callback (bootstrap : * mut aws_server_bootstrap , on_protocol_negotiated : aws_channel_on_protocol_negotiated_fn) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Sets up a server socket listener. If you are planning on using TLS, use\n `aws_server_bootstrap_new_tls_socket_listener` instead. This creates a socket listener bound to `local_endpoint`\n using socket options `options`. `incoming_callback` will be invoked once an incoming channel is ready for use or if\n an error is encountered. `shutdown_callback` will be invoked once the channel has shutdown. `destroy_callback` will\n be invoked after the server socket listener is destroyed, and all associated connections and channels have finished\n shutting down. Immediately after the `shutdown_callback` returns, the channel is cleaned up automatically. All\n callbacks are invoked the thread of the event-loop that the listening socket is assigned to\n\n `setup_callback`. If set, the callback will be asynchronously invoked when the listener is ready for use. For Apple\n Network Framework, the listener is not usable until the callback is invoked. If the listener creation failed\n (return NULL), the `setup_callback` will not be invoked.\n\n Upon shutdown of your application, you'll want to call `aws_server_bootstrap_destroy_socket_listener` with the return\n value from this function.\n\n bootstrap_options is copied."] pub fn aws_server_bootstrap_new_socket_listener (bootstrap_options : * const aws_server_socket_channel_bootstrap_options) -> * mut aws_socket ; } unsafe extern "C" { # [doc = " Shuts down 'listener' and cleans up any resources associated with it. Any incoming channels on `listener` will still\n be active. `destroy_callback` will be invoked after the server socket listener is destroyed, and all associated\n connections and channels have finished shutting down."] pub fn aws_server_bootstrap_destroy_socket_listener (bootstrap : * mut aws_server_bootstrap , listener : * mut aws_socket) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop_options { _unused : [u8 ; 0] , } # [doc = " @internal"] pub type aws_event_loop_on_event_fn = :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , handle : * mut aws_io_handle , events : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " @internal"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_event_loop_vtable { pub start_destroy : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) > , pub complete_destroy : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) > , pub run : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) -> :: libc :: c_int > , pub stop : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) -> :: libc :: c_int > , pub wait_for_stop_completion : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) -> :: libc :: c_int > , pub schedule_task_now : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , task : * mut aws_task) > , pub schedule_task_now_serialized : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , task : * mut aws_task) > , pub schedule_task_future : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , task : * mut aws_task , run_at_nanos : u64) > , pub cancel_task : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , task : * mut aws_task) > , pub connect_to_io_completion_port : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , handle : * mut aws_io_handle) -> :: libc :: c_int > , pub subscribe_to_io_events : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , handle : * mut aws_io_handle , events : :: libc :: c_int , on_event : aws_event_loop_on_event_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > , pub unsubscribe_from_io_events : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , handle : * mut aws_io_handle) -> :: libc :: c_int > , pub free_io_event_resources : :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > , pub is_on_callers_thread : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) -> bool > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_event_loop_vtable"] [:: std :: mem :: size_of :: < aws_event_loop_vtable > () - 112usize] ; ["Alignment of aws_event_loop_vtable"] [:: std :: mem :: align_of :: < aws_event_loop_vtable > () - 8usize] ; ["Offset of field: aws_event_loop_vtable::start_destroy"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , start_destroy) - 0usize] ; ["Offset of field: aws_event_loop_vtable::complete_destroy"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , complete_destroy) - 8usize] ; ["Offset of field: aws_event_loop_vtable::run"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , run) - 16usize] ; ["Offset of field: aws_event_loop_vtable::stop"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , stop) - 24usize] ; ["Offset of field: aws_event_loop_vtable::wait_for_stop_completion"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , wait_for_stop_completion) - 32usize] ; ["Offset of field: aws_event_loop_vtable::schedule_task_now"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , schedule_task_now) - 40usize] ; ["Offset of field: aws_event_loop_vtable::schedule_task_now_serialized"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , schedule_task_now_serialized) - 48usize] ; ["Offset of field: aws_event_loop_vtable::schedule_task_future"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , schedule_task_future) - 56usize] ; ["Offset of field: aws_event_loop_vtable::cancel_task"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , cancel_task) - 64usize] ; ["Offset of field: aws_event_loop_vtable::connect_to_io_completion_port"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , connect_to_io_completion_port) - 72usize] ; ["Offset of field: aws_event_loop_vtable::subscribe_to_io_events"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , subscribe_to_io_events) - 80usize] ; ["Offset of field: aws_event_loop_vtable::unsubscribe_from_io_events"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , unsubscribe_from_io_events) - 88usize] ; ["Offset of field: aws_event_loop_vtable::free_io_event_resources"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , free_io_event_resources) - 96usize] ; ["Offset of field: aws_event_loop_vtable::is_on_callers_thread"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , is_on_callers_thread) - 104usize] ; } ; # [repr (u32)] # [non_exhaustive] # [doc = " Event Loop Type.  If set to `AWS_EVENT_LOOP_PLATFORM_DEFAULT`, the event loop will automatically use the platform’s\n default.\n\n Default Event Loop Type\n Linux       | AWS_EVENT_LOOP_EPOLL\n Windows     | AWS_EVENT_LOOP_IOCP\n BSD Variants| AWS_EVENT_LOOP_KQUEUE\n macOS       | AWS_EVENT_LOOP_KQUEUE\n iOS         | AWS_EVENT_LOOP_DISPATCH_QUEUE"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_event_loop_type { AWS_EVENT_LOOP_PLATFORM_DEFAULT = 0 , AWS_EVENT_LOOP_EPOLL = 1 , AWS_EVENT_LOOP_IOCP = 2 , AWS_EVENT_LOOP_KQUEUE = 3 , AWS_EVENT_LOOP_DISPATCH_QUEUE = 4 , } # [doc = " Event loop group configuration options"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop_group_options { # [doc = " How many event loops that event loop group should contain.  For most group types, this implies\n the creation and management of an analagous amount of managed threads"] pub loop_count : u16 , # [doc = " Event loop type. If the event loop type is set to AWS_EVENT_LOOP_PLATFORM_DEFAULT, the\n creation function will automatically use the platform’s default event loop type."] pub type_ : aws_event_loop_type , # [doc = " Optional callback to invoke when the event loop group finishes destruction."] pub shutdown_options : * const aws_shutdown_callback_options , # [doc = " Optional configuration to control how the event loop group's threads bind to CPU groups"] pub cpu_group : * const u16 , # [doc = " Override for the clock function that event loops should use.  Defaults to the system's high resolution\n timer.\n\n Do not bind this value to managed code; it is only used in timing-sensitive tests."] pub clock_override : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_event_loop_group_options"] [:: std :: mem :: size_of :: < aws_event_loop_group_options > () - 32usize] ; ["Alignment of aws_event_loop_group_options"] [:: std :: mem :: align_of :: < aws_event_loop_group_options > () - 8usize] ; ["Offset of field: aws_event_loop_group_options::loop_count"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , loop_count) - 0usize] ; ["Offset of field: aws_event_loop_group_options::type_"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , type_) - 4usize] ; ["Offset of field: aws_event_loop_group_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , shutdown_options) - 8usize] ; ["Offset of field: aws_event_loop_group_options::cpu_group"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , cpu_group) - 16usize] ; ["Offset of field: aws_event_loop_group_options::clock_override"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , clock_override) - 24usize] ; } ; impl Default for aws_event_loop_group_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 () } } } unsafe extern "C" { # [doc = " The event loop will schedule the task and run it on the event loop thread as soon as possible.\n Note that cancelled tasks may execute outside the event loop thread.\n This function may be called from outside or inside the event loop thread.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_event_loop_schedule_task_now (event_loop : * mut aws_event_loop , task : * mut aws_task) ; } unsafe extern "C" { # [doc = " Variant of aws_event_loop_schedule_task_now that forces all tasks to go through the cross thread task queue,\n guaranteeing that order-of-submission is order-of-execution.  If you need this guarantee, you must use this\n function; the base function contains short-circuiting logic that breaks ordering invariants.  Beyond that, all\n properties of aws_event_loop_schedule_task_now apply to this function as well.\n\n Serialization guarantee does not apply to task cancellation (which can occur out-of-order or even out-of-thread in\n certain cases)."] pub fn aws_event_loop_schedule_task_now_serialized (event_loop : * mut aws_event_loop , task : * mut aws_task) ; } unsafe extern "C" { # [doc = " The event loop will schedule the task and run it at the specified time.\n Use aws_event_loop_current_clock_time() to query the current time in nanoseconds.\n Note that cancelled tasks may execute outside the event loop thread.\n This function may be called from outside or inside the event loop thread.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_event_loop_schedule_task_future (event_loop : * mut aws_event_loop , task : * mut aws_task , run_at_nanos : u64) ; } unsafe extern "C" { # [doc = " Cancels task.\n This function must be called from the event loop's thread, and is only guaranteed\n to work properly on tasks scheduled from within the event loop's thread.\n The task will be executed with the AWS_TASK_STATUS_CANCELED status inside this call."] pub fn aws_event_loop_cancel_task (event_loop : * mut aws_event_loop , task : * mut aws_task) ; } unsafe extern "C" { # [doc = " Returns true if the event loop's thread is the same thread that called this function, otherwise false."] pub fn aws_event_loop_thread_is_callers_thread (event_loop : * mut aws_event_loop) -> bool ; } unsafe extern "C" { # [doc = " Gets the current timestamp for the event loop's clock, in nanoseconds. This function is thread-safe."] pub fn aws_event_loop_current_clock_time (event_loop : * const aws_event_loop , time_nanos : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Creation function for event loop groups."] pub fn aws_event_loop_group_new (allocator : * mut aws_allocator , options : * const aws_event_loop_group_options) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " Increments the reference count on the event loop group, allowing the caller to take a reference to it.\n\n Returns the same event loop group passed in."] pub fn aws_event_loop_group_acquire (el_group : * mut aws_event_loop_group) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " Decrements an event loop group's ref count.  When the ref count drops to zero, the event loop group will be\n destroyed."] pub fn aws_event_loop_group_release (el_group : * mut aws_event_loop_group) ; } unsafe extern "C" { # [doc = " Increments the reference count on the event loop group from event loop, allowing the caller to take a reference to\n it.\n\n Returns the base event loop group of the event loop, or null if the event loop does not belong to a group."] pub fn aws_event_loop_group_acquire_from_event_loop (event_loop : * mut aws_event_loop) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " Decrements the ref count of the event loop's base event loop group.  When the ref count drops to zero, the event loop\n group will be destroyed."] pub fn aws_event_loop_group_release_from_event_loop (event_loop : * mut aws_event_loop) ; } unsafe extern "C" { # [doc = " Returns the event loop at a particular index.  If the index is out of bounds, null is returned."] pub fn aws_event_loop_group_get_loop_at (el_group : * mut aws_event_loop_group , index : usize) -> * mut aws_event_loop ; } unsafe extern "C" { # [doc = " Gets the number of event loops managed by an event loop group."] pub fn aws_event_loop_group_get_loop_count (el_group : * const aws_event_loop_group) -> usize ; } unsafe extern "C" { # [doc = " Gets the event loop type used by an event loop group."] pub fn aws_event_loop_group_get_type (el_group : * const aws_event_loop_group) -> aws_event_loop_type ; } unsafe extern "C" { # [doc = " Fetches the next loop for use. The purpose is to enable load balancing across loops. You should not depend on how\n this load balancing is done as it is subject to change in the future. Currently it uses the \"best-of-two\" algorithm\n based on the load factor of each loop."] pub fn aws_event_loop_group_get_next_loop (el_group : * mut aws_event_loop_group) -> * mut aws_event_loop ; } unsafe extern "C" { # [doc = " @deprecated - use aws_event_loop_group_new() instead"] pub fn aws_event_loop_group_new_default (alloc : * mut aws_allocator , max_threads : u16 , shutdown_options : * const aws_shutdown_callback_options) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " @deprecated - use aws_event_loop_group_new() instead"] pub fn aws_event_loop_group_new_default_pinned_to_cpu_group (alloc : * mut aws_allocator , max_threads : u16 , cpu_group : u16 , shutdown_options : * const aws_shutdown_callback_options) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " @internal - Don't use outside of testing.\n\n Returns the opaque internal user data of an event loop.  Can be cast into a specific implementation by\n privileged consumers."] pub fn aws_event_loop_get_impl (event_loop : * mut aws_event_loop) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " @internal - Don't use outside of testing.\n\n Initializes the base structure used by all event loop implementations with test-oriented overrides."] pub fn aws_event_loop_new_base (allocator : * mut aws_allocator , clock : aws_io_clock_fn , vtable : * mut aws_event_loop_vtable , impl_ : * mut :: libc :: c_void) -> * mut aws_event_loop ; } unsafe extern "C" { # [doc = " @internal - Don't use outside of testing.\n\n Common cleanup code for all implementations.\n This is only called from the *destroy() function of event loop implementations."] pub fn aws_event_loop_clean_up_base (event_loop : * mut aws_event_loop) ; } unsafe extern "C" { # [doc = " @internal - Don't use outside of testing.\n\n Destroys an event loop implementation.\n If the event loop is still in a running state, this function will block waiting on the event loop to shutdown.\n If the event loop is shared by multiple threads then destroy must be called by exactly one thread. All other threads\n must ensure their API calls to the event loop happen-before the call to destroy.\n\n Internally, this calls aws_event_loop_start_destroy() followed by aws_event_loop_complete_destroy()"] pub fn aws_event_loop_destroy (event_loop : * mut aws_event_loop) ; } unsafe extern "C" { # [doc = " @internal\n\n Signals an event loop to begin its destruction process.  If an event loop's implementation of this API does anything,\n it must be quick and non-blocking.  Most event loop implementations have an empty implementation for this function."] pub fn aws_event_loop_start_destroy (event_loop : * mut aws_event_loop) ; } unsafe extern "C" { # [doc = " @internal\n\n Waits for an event loop to complete its destruction process.  aws_event_loop_start_destroy() must have been called\n previously for this function to not deadlock."] pub fn aws_event_loop_complete_destroy (event_loop : * mut aws_event_loop) ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_stream_seek_basis { AWS_SSB_BEGIN = 0 , AWS_SSB_END = 2 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_stream_status { pub is_end_of_stream : bool , pub is_valid : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_stream_status"] [:: std :: mem :: size_of :: < aws_stream_status > () - 2usize] ; ["Alignment of aws_stream_status"] [:: std :: mem :: align_of :: < aws_stream_status > () - 1usize] ; ["Offset of field: aws_stream_status::is_end_of_stream"] [:: std :: mem :: offset_of ! (aws_stream_status , is_end_of_stream) - 0usize] ; ["Offset of field: aws_stream_status::is_valid"] [:: std :: mem :: offset_of ! (aws_stream_status , is_valid) - 1usize] ; } ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_input_stream_vtable { pub seek : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream , offset : i64 , basis : aws_stream_seek_basis) -> :: libc :: c_int > , # [doc = " Stream as much data as will fit into the destination buffer and update its length.\n The destination buffer's capacity MUST NOT be changed.\n\n Return AWS_OP_SUCCESS if the read is successful.\n If AWS_OP_ERR is returned, the stream is assumed to be invalid and any data written to the buffer is ignored.\n\n If no more data is currently available, or the end of the stream has been reached, simply return AWS_OP_SUCCESS\n without touching the destination buffer."] pub read : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream , dest : * mut aws_byte_buf) -> :: libc :: c_int > , pub get_status : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream , status : * mut aws_stream_status) -> :: libc :: c_int > , pub get_length : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream , out_length : * mut i64) -> :: libc :: c_int > , # [doc = " Optional.\n If not set, the default aws_ref_count_acquire/release will be used.\n Set for high level language binding that has its own refcounting implementation and needs to be kept alive from\n C.\n If set, ref_count member will not be used."] pub acquire : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream) > , pub release : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_input_stream_vtable"] [:: std :: mem :: size_of :: < aws_input_stream_vtable > () - 48usize] ; ["Alignment of aws_input_stream_vtable"] [:: std :: mem :: align_of :: < aws_input_stream_vtable > () - 8usize] ; ["Offset of field: aws_input_stream_vtable::seek"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , seek) - 0usize] ; ["Offset of field: aws_input_stream_vtable::read"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , read) - 8usize] ; ["Offset of field: aws_input_stream_vtable::get_status"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , get_status) - 16usize] ; ["Offset of field: aws_input_stream_vtable::get_length"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , get_length) - 24usize] ; ["Offset of field: aws_input_stream_vtable::acquire"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , acquire) - 32usize] ; ["Offset of field: aws_input_stream_vtable::release"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , release) - 40usize] ; } ; # [doc = " Base class for input streams.\n Note: when you implement one input stream, the ref_count needs to be initialized to clean up the resource when\n reaches to zero."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_input_stream { pub impl_ : * mut :: libc :: c_void , pub vtable : * const aws_input_stream_vtable , pub ref_count : aws_ref_count , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_input_stream"] [:: std :: mem :: size_of :: < aws_input_stream > () - 40usize] ; ["Alignment of aws_input_stream"] [:: std :: mem :: align_of :: < aws_input_stream > () - 8usize] ; ["Offset of field: aws_input_stream::impl_"] [:: std :: mem :: offset_of ! (aws_input_stream , impl_) - 0usize] ; ["Offset of field: aws_input_stream::vtable"] [:: std :: mem :: offset_of ! (aws_input_stream , vtable) - 8usize] ; ["Offset of field: aws_input_stream::ref_count"] [:: std :: mem :: offset_of ! (aws_input_stream , ref_count) - 16usize] ; } ; impl Default for aws_input_stream { 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 () } } } unsafe extern "C" { # [doc = " Increments the reference count on the input stream, allowing the caller to take a reference to it.\n\n Returns the same input stream passed in."] pub fn aws_input_stream_acquire (stream : * mut aws_input_stream) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Decrements a input stream's ref count.  When the ref count drops to zero, the input stream will be destroyed.\n\n Returns NULL always."] pub fn aws_input_stream_release (stream : * mut aws_input_stream) -> * mut aws_input_stream ; } unsafe extern "C" { pub fn aws_input_stream_seek (stream : * mut aws_input_stream , offset : i64 , basis : aws_stream_seek_basis) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_input_stream_read (stream : * mut aws_input_stream , dest : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_input_stream_get_status (stream : * mut aws_input_stream , status : * mut aws_stream_status) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_input_stream_get_length (stream : * mut aws_input_stream , out_length : * mut i64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_input_stream_destroy (stream : * mut aws_input_stream) ; } unsafe extern "C" { pub fn aws_input_stream_new_from_cursor (allocator : * mut aws_allocator , cursor : * const aws_byte_cursor) -> * mut aws_input_stream ; } unsafe extern "C" { pub fn aws_input_stream_new_from_file (allocator : * mut aws_allocator , file_name : * const :: libc :: c_char) -> * mut aws_input_stream ; } unsafe extern "C" { pub fn aws_input_stream_new_from_open_file (allocator : * mut aws_allocator , file : * mut FILE) -> * mut aws_input_stream ; } # [doc = " Data representing a URI. uri_str is always allocated and filled in.\n The other portions are merely storing offsets into uri_str."] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 : u32 , pub path : aws_byte_cursor , pub query_string : aws_byte_cursor , pub path_and_query : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_uri"] [:: std :: mem :: size_of :: < aws_uri > () - 200usize] ; ["Alignment of aws_uri"] [:: std :: mem :: align_of :: < aws_uri > () - 8usize] ; ["Offset of field: aws_uri::self_size"] [:: std :: mem :: offset_of ! (aws_uri , self_size) - 0usize] ; ["Offset of field: aws_uri::allocator"] [:: std :: mem :: offset_of ! (aws_uri , allocator) - 8usize] ; ["Offset of field: aws_uri::uri_str"] [:: std :: mem :: offset_of ! (aws_uri , uri_str) - 16usize] ; ["Offset of field: aws_uri::scheme"] [:: std :: mem :: offset_of ! (aws_uri , scheme) - 48usize] ; ["Offset of field: aws_uri::authority"] [:: std :: mem :: offset_of ! (aws_uri , authority) - 64usize] ; ["Offset of field: aws_uri::userinfo"] [:: std :: mem :: offset_of ! (aws_uri , userinfo) - 80usize] ; ["Offset of field: aws_uri::user"] [:: std :: mem :: offset_of ! (aws_uri , user) - 96usize] ; ["Offset of field: aws_uri::password"] [:: std :: mem :: offset_of ! (aws_uri , password) - 112usize] ; ["Offset of field: aws_uri::host_name"] [:: std :: mem :: offset_of ! (aws_uri , host_name) - 128usize] ; ["Offset of field: aws_uri::port"] [:: std :: mem :: offset_of ! (aws_uri , port) - 144usize] ; ["Offset of field: aws_uri::path"] [:: std :: mem :: offset_of ! (aws_uri , path) - 152usize] ; ["Offset of field: aws_uri::query_string"] [:: std :: mem :: offset_of ! (aws_uri , query_string) - 168usize] ; ["Offset of field: aws_uri::path_and_query"] [:: std :: mem :: offset_of ! (aws_uri , path_and_query) - 184usize] ; } ; 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\n will be stored in key"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_uri_param { pub key : aws_byte_cursor , pub value : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_uri_param"] [:: std :: mem :: size_of :: < aws_uri_param > () - 32usize] ; ["Alignment of aws_uri_param"] [:: std :: mem :: align_of :: < aws_uri_param > () - 8usize] ; ["Offset of field: aws_uri_param::key"] [:: std :: mem :: offset_of ! (aws_uri_param , key) - 0usize] ; ["Offset of field: aws_uri_param::value"] [:: std :: mem :: offset_of ! (aws_uri_param , value) - 16usize] ; } ; 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\n be initialized before passing them to aws_uri_init().\n\n query_string and query_params are exclusive to each other. If you set\n query_string, do not prepend it with '?'"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_uri_builder_options { pub scheme : aws_byte_cursor , pub path : aws_byte_cursor , pub host_name : aws_byte_cursor , pub port : u32 , pub query_params : * mut aws_array_list , pub query_string : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_uri_builder_options"] [:: std :: mem :: size_of :: < aws_uri_builder_options > () - 80usize] ; ["Alignment of aws_uri_builder_options"] [:: std :: mem :: align_of :: < aws_uri_builder_options > () - 8usize] ; ["Offset of field: aws_uri_builder_options::scheme"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , scheme) - 0usize] ; ["Offset of field: aws_uri_builder_options::path"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , path) - 16usize] ; ["Offset of field: aws_uri_builder_options::host_name"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , host_name) - 32usize] ; ["Offset of field: aws_uri_builder_options::port"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , port) - 48usize] ; ["Offset of field: aws_uri_builder_options::query_params"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , query_params) - 56usize] ; ["Offset of field: aws_uri_builder_options::query_string"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , query_string) - 64usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Parses 'uri_str' and initializes uri. Returns AWS_OP_SUCCESS, on success, AWS_OP_ERR on failure.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes uri to values specified in options. Returns AWS_OP_SUCCESS, on success, AWS_OP_ERR on failure.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_uri_clean_up (uri : * mut aws_uri) ; } unsafe extern "C" { # [doc = " Returns the scheme portion of the uri (e.g. http, https, ftp, ftps, etc...). If the scheme was not present\n in the uri, the returned value will be empty. It is the users job to determine the appropriate defaults\n if this field is empty, based on protocol, port, etc..."] pub fn aws_uri_scheme (uri : * const aws_uri) -> * const aws_byte_cursor ; } unsafe extern "C" { # [doc = " Returns the authority portion of the uri (host[:port]). If it was not present, this was a request uri. In that\n case, the value will be empty."] pub fn aws_uri_authority (uri : * const aws_uri) -> * const aws_byte_cursor ; } unsafe extern "C" { # [doc = " Returns the path portion of the uri, including any leading '/'. If not present, this value will be empty."] pub fn aws_uri_path (uri : * const aws_uri) -> * const aws_byte_cursor ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Returns the port portion of the authority if it was present, otherwise, returns 0.\n 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) -> u32 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " For iterating over the params in the query string.\n `param` is an in/out argument used to track progress, it MUST be zeroed out to start.\n If true is returned, `param` contains the value of the next param.\n If false is returned, there are no further params.\n\n Edge cases:\n 1) Entries without '=' sign are treated as having a key and no value.\n    Example: First param in query string \"a&b=c\" has key=\"a\" value=\"\"\n\n 2) Blank entries are skipped.\n    Example: The only param in query string \"&&a=b\" is key=\"a\" value=\"b\""] pub fn aws_query_string_next_param (query_string : aws_byte_cursor , param : * mut aws_uri_param) -> bool ; } unsafe extern "C" { # [doc = " Parses query string and stores the parameters in 'out_params'. Returns AWS_OP_SUCCESS on success and\n AWS_OP_ERR on failure. The user is responsible for initializing out_params with item size of struct aws_query_param.\n The user is also responsible for cleaning up out_params when finished."] pub fn aws_query_string_params (query_string : aws_byte_cursor , out_params : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " For iterating over the params in the uri query string.\n `param` is an in/out argument used to track progress, it MUST be zeroed out to start.\n If true is returned, `param` contains the value of the next param.\n If false is returned, there are no further params.\n\n Edge cases:\n 1) Entries without '=' sign are treated as having a key and no value.\n    Example: First param in query string \"a&b=c\" has key=\"a\" value=\"\"\n\n 2) Blank entries are skipped.\n    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 ; } unsafe extern "C" { # [doc = " Parses query string and stores the parameters in 'out_params'. Returns AWS_OP_SUCCESS on success and\n AWS_OP_ERR on failure. The user is responsible for initializing out_params with item size of struct aws_query_param.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Writes the uri path encoding of a cursor to a buffer.  This is the modified version of rfc3986 used by\n sigv4 signing."] pub fn aws_byte_buf_append_encoding_uri_path (buffer : * mut aws_byte_buf , cursor : * const aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Writes the uri query param encoding (passthrough alnum + '-' '_' '~' '.') of a UTF-8 cursor to a buffer\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Writes the uri decoding of a UTF-8 cursor to a buffer,\n replacing %xx escapes by their single byte equivalent.\n 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) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_errors { AWS_ERROR_S3_MISSING_CONTENT_RANGE_HEADER = 14336 , AWS_ERROR_S3_INVALID_CONTENT_RANGE_HEADER = 14337 , AWS_ERROR_S3_MISSING_CONTENT_LENGTH_HEADER = 14338 , AWS_ERROR_S3_INVALID_CONTENT_LENGTH_HEADER = 14339 , AWS_ERROR_S3_MISSING_ETAG = 14340 , AWS_ERROR_S3_INTERNAL_ERROR = 14341 , AWS_ERROR_S3_SLOW_DOWN = 14342 , AWS_ERROR_S3_INVALID_RESPONSE_STATUS = 14343 , AWS_ERROR_S3_MISSING_UPLOAD_ID = 14344 , AWS_ERROR_S3_PROXY_PARSE_FAILED = 14345 , AWS_ERROR_S3_UNSUPPORTED_PROXY_SCHEME = 14346 , AWS_ERROR_S3_CANCELED = 14347 , AWS_ERROR_S3_INVALID_RANGE_HEADER = 14348 , AWS_ERROR_S3_MULTIRANGE_HEADER_UNSUPPORTED = 14349 , AWS_ERROR_S3_RESPONSE_CHECKSUM_MISMATCH = 14350 , AWS_ERROR_S3_CHECKSUM_CALCULATION_FAILED = 14351 , AWS_ERROR_S3_PAUSED = 14352 , AWS_ERROR_S3_LIST_PARTS_PARSE_FAILED = 14353 , AWS_ERROR_S3_RESUMED_PART_CHECKSUM_MISMATCH = 14354 , AWS_ERROR_S3_RESUME_FAILED = 14355 , AWS_ERROR_S3_OBJECT_MODIFIED = 14356 , AWS_ERROR_S3_NON_RECOVERABLE_ASYNC_ERROR = 14357 , AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE = 14358 , AWS_ERROR_S3_INCORRECT_CONTENT_LENGTH = 14359 , AWS_ERROR_S3_REQUEST_TIME_TOO_SKEWED = 14360 , AWS_ERROR_S3_FILE_MODIFIED = 14361 , AWS_ERROR_S3_EXCEEDS_MEMORY_LIMIT = 14362 , AWS_ERROR_S3_INVALID_MEMORY_LIMIT_CONFIG = 14363 , AWS_ERROR_S3EXPRESS_CREATE_SESSION_FAILED = 14364 , AWS_ERROR_S3_INTERNAL_PART_SIZE_MISMATCH_RETRYING_WITH_RANGE = 14365 , AWS_ERROR_S3_REQUEST_HAS_COMPLETED = 14366 , AWS_ERROR_S3_RECV_FILE_ALREADY_EXISTS = 14367 , AWS_ERROR_S3_RECV_FILE_NOT_FOUND = 14368 , AWS_ERROR_S3_REQUEST_TIMEOUT = 14369 , AWS_ERROR_S3_BUFFER_ALLOCATION_FAILED = 14370 , AWS_ERROR_S3_END_RANGE = 15359 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_subject { AWS_LS_S3_GENERAL = 14336 , AWS_LS_S3_CLIENT = 14337 , AWS_LS_S3_CLIENT_STATS = 14338 , AWS_LS_S3_REQUEST = 14339 , AWS_LS_S3_META_REQUEST = 14340 , AWS_LS_S3_ENDPOINT = 14341 , AWS_LS_S3_LAST = 15359 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_platform_info { pub instance_type : aws_byte_cursor , pub max_throughput_gbps : f64 , pub has_recommended_configuration : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_platform_info"] [:: std :: mem :: size_of :: < aws_s3_platform_info > () - 32usize] ; ["Alignment of aws_s3_platform_info"] [:: std :: mem :: align_of :: < aws_s3_platform_info > () - 8usize] ; ["Offset of field: aws_s3_platform_info::instance_type"] [:: std :: mem :: offset_of ! (aws_s3_platform_info , instance_type) - 0usize] ; ["Offset of field: aws_s3_platform_info::max_throughput_gbps"] [:: std :: mem :: offset_of ! (aws_s3_platform_info , max_throughput_gbps) - 16usize] ; ["Offset of field: aws_s3_platform_info::has_recommended_configuration"] [:: std :: mem :: offset_of ! (aws_s3_platform_info , has_recommended_configuration) - 24usize] ; } ; impl Default for aws_s3_platform_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 () } } } unsafe extern "C" { # [doc = " Initializes internal datastructures used by aws-c-s3.\n Must be called before using any functionality in aws-c-s3."] pub fn aws_s3_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Shuts down the internal datastructures used by aws-c-s3."] pub fn aws_s3_library_clean_up () ; } unsafe extern "C" { pub fn aws_s3_get_current_platform_info () -> * const aws_s3_platform_info ; } unsafe extern "C" { pub fn aws_s3_get_current_platform_ec2_intance_type (cached_only : bool) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_s3_get_platforms_with_recommended_config () -> aws_array_list ; } # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_s3_buffer_ticket { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_new (alloc : * mut aws_allocator) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_set_result_by_move (future : * mut aws_future_s3_buffer_ticket , pointer_address : * mut * mut aws_s3_buffer_ticket) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_get_result_by_move (future : * mut aws_future_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_peek_result (future : * const aws_future_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_acquire (future : * mut aws_future_s3_buffer_ticket) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_release (future : * mut aws_future_s3_buffer_ticket) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_set_error (future : * mut aws_future_s3_buffer_ticket , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_is_done (future : * const aws_future_s3_buffer_ticket) -> bool ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_get_error (future : * const aws_future_s3_buffer_ticket) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_register_callback (future : * mut aws_future_s3_buffer_ticket , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_register_callback_if_not_done (future : * mut aws_future_s3_buffer_ticket , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_register_event_loop_callback (future : * mut aws_future_s3_buffer_ticket , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_register_channel_callback (future : * mut aws_future_s3_buffer_ticket , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_wait (future : * mut aws_future_s3_buffer_ticket , timeout_ns : u64) -> bool ; } # [doc = " Meta information about ticket reservation request."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_buffer_pool_reserve_meta { pub client : * mut aws_s3_client , pub meta_request : * mut aws_s3_meta_request , pub size : usize , pub can_block : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_pool_reserve_meta"] [:: std :: mem :: size_of :: < aws_s3_buffer_pool_reserve_meta > () - 32usize] ; ["Alignment of aws_s3_buffer_pool_reserve_meta"] [:: std :: mem :: align_of :: < aws_s3_buffer_pool_reserve_meta > () - 8usize] ; ["Offset of field: aws_s3_buffer_pool_reserve_meta::client"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_reserve_meta , client) - 0usize] ; ["Offset of field: aws_s3_buffer_pool_reserve_meta::meta_request"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_reserve_meta , meta_request) - 8usize] ; ["Offset of field: aws_s3_buffer_pool_reserve_meta::size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_reserve_meta , size) - 16usize] ; ["Offset of field: aws_s3_buffer_pool_reserve_meta::can_block"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_reserve_meta , can_block) - 24usize] ; } ; impl Default for aws_s3_buffer_pool_reserve_meta { 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)] pub struct aws_s3_buffer_ticket_vtable { # [doc = " Get buffer associated with the ticket.\n Note: can be called multiple times and the same buffer should be returned. In some cases ticket might not be\n claimed at all."] pub claim : :: std :: option :: Option < unsafe extern "C" fn (ticket : * mut aws_s3_buffer_ticket) -> aws_byte_buf > , pub acquire : :: std :: option :: Option < unsafe extern "C" fn (ticket : * mut aws_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket > , pub release : :: std :: option :: Option < unsafe extern "C" fn (ticket : * mut aws_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_ticket_vtable"] [:: std :: mem :: size_of :: < aws_s3_buffer_ticket_vtable > () - 24usize] ; ["Alignment of aws_s3_buffer_ticket_vtable"] [:: std :: mem :: align_of :: < aws_s3_buffer_ticket_vtable > () - 8usize] ; ["Offset of field: aws_s3_buffer_ticket_vtable::claim"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket_vtable , claim) - 0usize] ; ["Offset of field: aws_s3_buffer_ticket_vtable::acquire"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket_vtable , acquire) - 8usize] ; ["Offset of field: aws_s3_buffer_ticket_vtable::release"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket_vtable , release) - 16usize] ; } ; # [doc = " Generic memory pool interface.\n Allows consumers of aws-c-s3 to override how buffer allocation for part buffers is done.\n Refer to docs/memory_aware_request_execution.md for details on how default implementation works.\n WARNING: this is currently experimental feature and does not provide API stability guarantees so should be used with\n caution. At highlevel the flow is as follows:\n - crt scheduler queues up requests to be prepared\n - requests being prepared will try to reserve mem (i.e. obtain a ticket) and wait until they get it before proceeding\n - once mem is reserved requests will proceed with the pipeline\n - request will acquire buffer from the ticket when needed\n - ticket is released when request is done with the buffer\n Note: in some cases pipeline can stall if new buffer cannot be allocated (ex. async writes flow).\n In this case reserve request will indicate that not granting the ticket can block and buffer pool should try to\n allocate ticket right away (or wait and call waker when mem is allocated for the case of async writes).\n Note for custom pool implementations: Scheduler keeps track of all outstanding futures and will error them out when\n request is paused or cancelled. Its still fine for memory pool implementation to deliver ticket (it will just be\n released by future right away with no side effects) or just ignore the future if its already in error state."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_buffer_ticket { pub vtable : * mut aws_s3_buffer_ticket_vtable , pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_ticket"] [:: std :: mem :: size_of :: < aws_s3_buffer_ticket > () - 40usize] ; ["Alignment of aws_s3_buffer_ticket"] [:: std :: mem :: align_of :: < aws_s3_buffer_ticket > () - 8usize] ; ["Offset of field: aws_s3_buffer_ticket::vtable"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket , vtable) - 0usize] ; ["Offset of field: aws_s3_buffer_ticket::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket , ref_count) - 8usize] ; ["Offset of field: aws_s3_buffer_ticket::impl_"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket , impl_) - 32usize] ; } ; impl Default for aws_s3_buffer_ticket { 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 () } } } unsafe extern "C" { pub fn aws_s3_buffer_ticket_claim (ticket : * mut aws_s3_buffer_ticket) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_s3_buffer_ticket_acquire (ticket : * mut aws_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket ; } unsafe extern "C" { pub fn aws_s3_buffer_ticket_release (ticket : * mut aws_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket ; } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_buffer_pool_vtable { pub reserve : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool , meta : aws_s3_buffer_pool_reserve_meta) -> * mut aws_future_s3_buffer_ticket > , # [doc = " Trim the pool. This is mostly a suggestion, which pool can decide to ignore. Triggered by CRT when\n client has been idle for some time."] pub trim : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool) > , # [doc = " Optimize the buffer pool for allocations of a specific size.\n Creates a separate list of blocks dedicated to this size for better memory efficiency."] pub add_special_size : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool , buffer_size : usize) -> :: libc :: c_int > , # [doc = " Release all special-sized blocks from the buffer pool.\n This frees all memory allocated for the special size optimization."] pub release_special_size : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool , buffer_size : usize) > , # [doc = " Align a range size to the buffer pool's allocation strategy.\n Returns the optimal aligned size based on the buffer pool's configuration."] pub derive_aligned_buffer_size : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool , size : u64) -> u64 > , pub acquire : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool) -> * mut aws_s3_buffer_pool > , pub release : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool) -> * mut aws_s3_buffer_pool > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_pool_vtable"] [:: std :: mem :: size_of :: < aws_s3_buffer_pool_vtable > () - 56usize] ; ["Alignment of aws_s3_buffer_pool_vtable"] [:: std :: mem :: align_of :: < aws_s3_buffer_pool_vtable > () - 8usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::reserve"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , reserve) - 0usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::trim"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , trim) - 8usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::add_special_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , add_special_size) - 16usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::release_special_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , release_special_size) - 24usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::derive_aligned_buffer_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , derive_aligned_buffer_size) - 32usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::acquire"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , acquire) - 40usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::release"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , release) - 48usize] ; } ; # [doc = " Polymorphic buffer pool."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_buffer_pool { pub vtable : * mut aws_s3_buffer_pool_vtable , pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_pool"] [:: std :: mem :: size_of :: < aws_s3_buffer_pool > () - 40usize] ; ["Alignment of aws_s3_buffer_pool"] [:: std :: mem :: align_of :: < aws_s3_buffer_pool > () - 8usize] ; ["Offset of field: aws_s3_buffer_pool::vtable"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool , vtable) - 0usize] ; ["Offset of field: aws_s3_buffer_pool::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool , ref_count) - 8usize] ; ["Offset of field: aws_s3_buffer_pool::impl_"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool , impl_) - 32usize] ; } ; impl Default for aws_s3_buffer_pool { 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 () } } } unsafe extern "C" { pub fn aws_s3_buffer_pool_reserve (buffer_pool : * mut aws_s3_buffer_pool , meta : aws_s3_buffer_pool_reserve_meta) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { pub fn aws_s3_buffer_pool_trim (buffer_pool : * mut aws_s3_buffer_pool) ; } unsafe extern "C" { pub fn aws_s3_buffer_pool_acquire (buffer_pool : * mut aws_s3_buffer_pool) -> * mut aws_s3_buffer_pool ; } unsafe extern "C" { pub fn aws_s3_buffer_pool_release (buffer_pool : * mut aws_s3_buffer_pool) -> * mut aws_s3_buffer_pool ; } # [doc = " Buffer pool configuration options."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_buffer_pool_config { pub client : * mut aws_s3_client , pub part_size : usize , pub max_part_size : usize , pub memory_limit : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_pool_config"] [:: std :: mem :: size_of :: < aws_s3_buffer_pool_config > () - 32usize] ; ["Alignment of aws_s3_buffer_pool_config"] [:: std :: mem :: align_of :: < aws_s3_buffer_pool_config > () - 8usize] ; ["Offset of field: aws_s3_buffer_pool_config::client"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_config , client) - 0usize] ; ["Offset of field: aws_s3_buffer_pool_config::part_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_config , part_size) - 8usize] ; ["Offset of field: aws_s3_buffer_pool_config::max_part_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_config , max_part_size) - 16usize] ; ["Offset of field: aws_s3_buffer_pool_config::memory_limit"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_config , memory_limit) - 24usize] ; } ; impl Default for aws_s3_buffer_pool_config { 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 = " Factory to construct the pool for the given config. Passes along buffer related info configured on the client, which\n factory may ignore when considering how to construct pool.\n This implementation should fail if pool cannot be constructed for some reason (ex. if config params cannot be met),\n by logging failure reason, returning null and raising aws_error."] pub type aws_s3_buffer_pool_factory_fn = :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , config : aws_s3_buffer_pool_config , user_data : * mut :: libc :: c_void) -> * mut aws_s3_buffer_pool > ; unsafe extern "C" { # [doc = " Optimize the buffer pool for allocations of a specific size.\n Creates a separate list of blocks dedicated to this size for better memory efficiency.\n Allocations of exactly this size will use these special blocks instead of the regular primary/secondary storage.\n\n @param buffer_pool The buffer pool to optimize\n @param buffer_size The size to optimize for (must be > 0)\n @return AWS_OP_SUCCESS on success, AWS_OP_ERR on failure"] pub fn aws_s3_buffer_pool_add_special_size (buffer_pool : * mut aws_s3_buffer_pool , buffer_size : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Release the special-sized blocks from the buffer pool.\n Should be called when done with the special-sized allocations.\n\n @param buffer_pool The buffer pool\n @param buffer_size The special size to release blocks for"] pub fn aws_s3_buffer_pool_release_special_size (buffer_pool : * mut aws_s3_buffer_pool , buffer_size : usize) ; } unsafe extern "C" { # [doc = " Align a range size to the buffer pool's allocation strategy.\n This function determines the optimal aligned size based on the buffer pool's configuration.\n For sizes within the primary allocation range, it aligns to chunk boundaries.\n For larger sizes that go to secondary storage, it returns the size as-is.\n\n @param buffer_pool The buffer pool to use for alignment (can be NULL, in which case size is returned unchanged)\n @param size The size to align\n @return The aligned size that's optimal for the buffer pool's allocation strategy"] pub fn aws_s3_buffer_pool_derive_aligned_buffer_size (buffer_pool : * mut aws_s3_buffer_pool , size : u64) -> u64 ; } pub type aws_should_sign_header_fn = :: std :: option :: Option < unsafe extern "C" fn (name : * const aws_byte_cursor , userdata : * mut :: libc :: c_void) -> bool > ; # [repr (u32)] # [non_exhaustive] # [doc = " A primitive RTTI indicator for signing configuration structs\n\n There must be one entry per config structure type and it's a fatal error\n to put the wrong value in the \"config_type\" member of your config structure."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_signing_config_type { AWS_SIGNING_CONFIG_AWS = 1 , } # [doc = " All signing configuration structs must match this by having\n the config_type member as the first member."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_signing_config_base { pub config_type : aws_signing_config_type , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_signing_config_base"] [:: std :: mem :: size_of :: < aws_signing_config_base > () - 4usize] ; ["Alignment of aws_signing_config_base"] [:: std :: mem :: align_of :: < aws_signing_config_base > () - 4usize] ; ["Offset of field: aws_signing_config_base::config_type"] [:: std :: mem :: offset_of ! (aws_signing_config_base , config_type) - 0usize] ; } ; impl Default for aws_signing_config_base { 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 (u32)] # [non_exhaustive] # [doc = " What version of the AWS signing process should we use."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_signing_algorithm { AWS_SIGNING_ALGORITHM_V4 = 0 , AWS_SIGNING_ALGORITHM_V4_ASYMMETRIC = 1 , AWS_SIGNING_ALGORITHM_V4_S3EXPRESS = 2 , } # [repr (u32)] # [non_exhaustive] # [doc = " What sort of signature should be computed from the signable?"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_signature_type { # [doc = " A signature for a full http request should be computed, with header updates applied to the signing result."] AWS_ST_HTTP_REQUEST_HEADERS = 0 , # [doc = " A signature for a full http request should be computed, with query param updates applied to the signing result."] AWS_ST_HTTP_REQUEST_QUERY_PARAMS = 1 , # [doc = " Compute a signature for a payload chunk. The signable's input stream should be the chunk data and the\n signable should contain the most recent signature value (either the original http request or the most recent\n chunk) in the \"previous-signature\" property."] AWS_ST_HTTP_REQUEST_CHUNK = 2 , # [doc = " Compute a signature for an event stream event. The signable's input stream should be the encoded event-stream\n message (headers + payload), the signable should contain the most recent signature value (either the original\n http request or the most recent event) in the \"previous-signature\" property.\n\n This option is only supported for Sigv4 for now."] AWS_ST_HTTP_REQUEST_EVENT = 3 , # [doc = " Compute a signature for an http request via it's already-computed canonical request.  Only the authorization\n signature header is added to the signing result."] AWS_ST_CANONICAL_REQUEST_HEADERS = 4 , # [doc = " Compute a signature for an http request via it's already-computed canonical request.  Only the authorization\n signature query param is added to the signing result."] AWS_ST_CANONICAL_REQUEST_QUERY_PARAMS = 5 , # [doc = " Compute a signature for the trailing headers.\n the signable should contain the most recent signature value (either the original http request or the most recent\n chunk) in the \"previous-signature\" property."] AWS_ST_HTTP_REQUEST_TRAILING_HEADERS = 6 , } unsafe extern "C" { # [doc = " The SHA-256 of an empty string:\n 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_empty_sha256 : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'UNSIGNED-PAYLOAD'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_unsigned_payload : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-UNSIGNED-PAYLOAD-TRAILER'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_unsigned_payload_trailer : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-HMAC-SHA256-PAYLOAD'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_aws4_hmac_sha256_payload : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-HMAC-SHA256-PAYLOAD-TRAILER'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_aws4_hmac_sha256_payload_trailer : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-ECDSA-P256-SHA256-PAYLOAD'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_aws4_ecdsa_p256_sha256_payload : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-ECDSA-P256-SHA256-PAYLOAD-TRAILER'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_aws4_ecdsa_p256_sha256_payload_trailer : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-HMAC-SHA256-EVENTS'\n For use with `aws_signing_config_aws.signed_body_value`.\n\n Event signing is only supported for Sigv4 for now."] pub static g_aws_signed_body_value_streaming_aws4_hmac_sha256_events : aws_byte_cursor ; } # [repr (u32)] # [non_exhaustive] # [doc = " Controls if signing adds a header containing the canonical request's body value"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_signed_body_header_type { # [doc = " Do not add a header"] AWS_SBHT_NONE = 0 , # [doc = " Add the \"x-amz-content-sha256\" header with the canonical request's body value"] AWS_SBHT_X_AMZ_CONTENT_SHA256 = 1 , } # [doc = " A configuration structure for use in AWS-related signing.  Currently covers sigv4 only, but is not required to."] # [repr (C)] pub struct aws_signing_config_aws { # [doc = " What kind of config structure is this?"] pub config_type : aws_signing_config_type , # [doc = " What signing algorithm to use."] pub algorithm : aws_signing_algorithm , # [doc = " What sort of signature should be computed?"] pub signature_type : aws_signature_type , pub region : aws_byte_cursor , # [doc = " name of service to sign a request for"] pub service : aws_byte_cursor , # [doc = " Raw date to use during the signing process."] pub date : aws_date_time , # [doc = " Optional function to control which headers are a part of the canonical request.\n Skipping auth-required headers will result in an unusable signature.  Headers injected by the signing process\n are not skippable.\n\n This function does not override the internal check function (x-amzn-trace-id, user-agent), but rather\n supplements it.  In particular, a header will get signed if and only if it returns true to both\n the internal check (skips x-amzn-trace-id, user-agent) and this function (if defined)."] pub should_sign_header : aws_should_sign_header_fn , pub should_sign_header_ud : * mut :: libc :: c_void , pub flags : aws_signing_config_aws__bindgen_ty_1 , # [doc = " Optional string to use as the canonical request's body value.\n If string is empty, a value will be calculated from the payload during signing.\n Typically, this is the SHA-256 of the (request/chunk/event) payload, written as lowercase hex.\n If this has been precalculated, it can be set here. Special values used by certain services can also be set\n (e.g. \"UNSIGNED-PAYLOAD\" \"STREAMING-AWS4-HMAC-SHA256-PAYLOAD\" \"STREAMING-AWS4-HMAC-SHA256-EVENTS\")."] pub signed_body_value : aws_byte_cursor , # [doc = " Controls what body \"hash\" header, if any, should be added to the canonical request and the signed request:\n   AWS_SBHT_NONE - no header should be added\n   AWS_SBHT_X_AMZ_CONTENT_SHA256 - the body \"hash\" should be added in the X-Amz-Content-Sha256 header"] pub signed_body_header : aws_signed_body_header_type , pub credentials : * const aws_credentials , pub credentials_provider : * mut aws_credentials_provider , # [doc = " If non-zero and the signing transform is query param, then signing will add X-Amz-Expires to the query\n string, equal to the value specified here.  If this value is zero or if header signing is being used then\n this parameter has no effect."] pub expiration_in_seconds : u64 , } # [repr (C)] # [repr (align (4))] # [derive (Debug , Default , Copy , Clone)] pub struct aws_signing_config_aws__bindgen_ty_1 { pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub __bindgen_padding_0 : [u8 ; 3usize] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_signing_config_aws__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_signing_config_aws__bindgen_ty_1 > () - 4usize] ; ["Alignment of aws_signing_config_aws__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_signing_config_aws__bindgen_ty_1 > () - 4usize] ; } ; impl aws_signing_config_aws__bindgen_ty_1 { # [inline] pub fn use_double_uri_encode (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_use_double_uri_encode (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn use_double_uri_encode_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_use_double_uri_encode_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn should_normalize_uri_path (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_should_normalize_uri_path (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub unsafe fn should_normalize_uri_path_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 1usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_should_normalize_uri_path_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 1usize , 1u8 , val as u64 ,) } } # [inline] pub fn omit_session_token (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_omit_session_token (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub unsafe fn omit_session_token_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 2usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_omit_session_token_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 2usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (use_double_uri_encode : u32 , should_normalize_uri_path : u32 , omit_session_token : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let use_double_uri_encode : u32 = unsafe { :: std :: mem :: transmute (use_double_uri_encode) } ; use_double_uri_encode as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let should_normalize_uri_path : u32 = unsafe { :: std :: mem :: transmute (should_normalize_uri_path) } ; should_normalize_uri_path as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let omit_session_token : u32 = unsafe { :: std :: mem :: transmute (omit_session_token) } ; omit_session_token as u64 }) ; __bindgen_bitfield_unit } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_signing_config_aws"] [:: std :: mem :: size_of :: < aws_signing_config_aws > () - 256usize] ; ["Alignment of aws_signing_config_aws"] [:: std :: mem :: align_of :: < aws_signing_config_aws > () - 8usize] ; ["Offset of field: aws_signing_config_aws::config_type"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , config_type) - 0usize] ; ["Offset of field: aws_signing_config_aws::algorithm"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , algorithm) - 4usize] ; ["Offset of field: aws_signing_config_aws::signature_type"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , signature_type) - 8usize] ; ["Offset of field: aws_signing_config_aws::region"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , region) - 16usize] ; ["Offset of field: aws_signing_config_aws::service"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , service) - 32usize] ; ["Offset of field: aws_signing_config_aws::date"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , date) - 48usize] ; ["Offset of field: aws_signing_config_aws::should_sign_header"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , should_sign_header) - 184usize] ; ["Offset of field: aws_signing_config_aws::should_sign_header_ud"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , should_sign_header_ud) - 192usize] ; ["Offset of field: aws_signing_config_aws::flags"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , flags) - 200usize] ; ["Offset of field: aws_signing_config_aws::signed_body_value"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , signed_body_value) - 208usize] ; ["Offset of field: aws_signing_config_aws::signed_body_header"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , signed_body_header) - 224usize] ; ["Offset of field: aws_signing_config_aws::credentials"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , credentials) - 232usize] ; ["Offset of field: aws_signing_config_aws::credentials_provider"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , credentials_provider) - 240usize] ; ["Offset of field: aws_signing_config_aws::expiration_in_seconds"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , expiration_in_seconds) - 248usize] ; } ; impl Default for aws_signing_config_aws { 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 () } } } unsafe extern "C" { # [doc = " Returns a c-string that describes the supplied signing algorithm\n\n @param algorithm signing algorithm to get a friendly string name for\n\n @return friendly string name of the supplied algorithm, or \"Unknown\" if the algorithm is not recognized"] pub fn aws_signing_algorithm_to_string (algorithm : aws_signing_algorithm) -> * const :: libc :: c_char ; } unsafe extern "C" { # [doc = " Checks a signing configuration for invalid settings combinations.\n\n @param config signing configuration to validate\n\n @return - AWS_OP_SUCCESS if the configuration is valid, AWS_OP_ERR otherwise"] pub fn aws_validate_aws_signing_config_aws (config : * const aws_signing_config_aws) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3express_credentials_provider { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_properties_s3express { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [doc = " A Meta Request represents a group of generated requests that are being done on behalf of the\n original request. For example, one large GetObject request can be transformed into a series\n of ranged GetObject requests that are executed in parallel to improve throughput.\n\n The aws_s3_meta_request_type is a hint of transformation to be applied."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_type { # [doc = " The Default meta request type sends any request to S3 as-is (with no transformation). For example,\n it can be used to pass a CreateBucket request."] AWS_S3_META_REQUEST_TYPE_DEFAULT = 0 , # [doc = " The GetObject request will be split into a series of ranged GetObject requests that are\n executed in parallel to improve throughput, when possible."] AWS_S3_META_REQUEST_TYPE_GET_OBJECT = 1 , # [doc = " The PutObject request will be split into MultiPart uploads that are executed in parallel\n to improve throughput, when possible.\n Note: put object supports both known and unknown body length. The client\n relies on Content-Length header to determine length of the body.\n Request with unknown content length are always sent using multipart\n upload regardless of final number of parts and do have the following limitations:\n - multipart threshold is ignored and all request are made through mpu,\n   even if they only need one part\n - pause/resume is not supported\n - meta request will throw error if checksum header is provider (due to\n   general limitation of checksum not being usable if meta request is\n   getting split)"] AWS_S3_META_REQUEST_TYPE_PUT_OBJECT = 2 , # [doc = " The CopyObject meta request performs a multi-part copy\n using multiple S3 UploadPartCopy requests in parallel, or bypasses\n a CopyObject request to S3 if the object size is not large enough for\n a multipart upload.\n Note: copy support is still in development and has following limitations:\n 1. host header must use virtual host addressing style (path style is not\n   supported) and both source and dest buckets must have dns compliant name\n 2. only {bucket}/{key} format is supported for source and passing arn as\n   source will not work\n 3. source bucket is assumed to be in the same region as dest\n 4. source bucket and dest bucket must both be either directory buckets or regular buckets.\n\n Provide the `meta_request_options.copy_source_uri` to bypass limitation 1 & 2."] AWS_S3_META_REQUEST_TYPE_COPY_OBJECT = 3 , # [doc = " The CopyObject meta request performs a multi-part copy\n using multiple S3 UploadPartCopy requests in parallel, or bypasses\n a CopyObject request to S3 if the object size is not large enough for\n a multipart upload.\n Note: copy support is still in development and has following limitations:\n 1. host header must use virtual host addressing style (path style is not\n   supported) and both source and dest buckets must have dns compliant name\n 2. only {bucket}/{key} format is supported for source and passing arn as\n   source will not work\n 3. source bucket is assumed to be in the same region as dest\n 4. source bucket and dest bucket must both be either directory buckets or regular buckets.\n\n Provide the `meta_request_options.copy_source_uri` to bypass limitation 1 & 2."] AWS_S3_META_REQUEST_TYPE_MAX = 4 , } impl aws_s3_request_type { pub const AWS_S3_REQUEST_TYPE_DEFAULT : aws_s3_request_type = aws_s3_request_type :: AWS_S3_REQUEST_TYPE_UNKNOWN ; } # [repr (u32)] # [non_exhaustive] # [doc = " The type of a single S3 HTTP request. Used by metrics.\n A meta-request can make multiple S3 HTTP requests under the hood.\n\n For example, AWS_S3_META_REQUEST_TYPE_PUT_OBJECT for a large file will\n do multipart upload, resulting in 3+ HTTP requests:\n AWS_S3_REQUEST_TYPE_CREATE_MULTIPART_UPLOAD, one or more AWS_S3_REQUEST_TYPE_UPLOAD_PART,\n and finally AWS_S3_REQUEST_TYPE_COMPLETE_MULTIPART_UPLOAD.\n\n aws_s3_request_type_operation_name() returns the S3 operation name\n for types that map (e.g. AWS_S3_REQUEST_TYPE_HEAD_OBJECT -> \"HeadObject\"),\n or empty string for types that don't map (e.g. AWS_S3_REQUEST_TYPE_UNKNOWN -> \"\")."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_request_type { AWS_S3_REQUEST_TYPE_UNKNOWN = 0 , AWS_S3_REQUEST_TYPE_HEAD_OBJECT = 1 , AWS_S3_REQUEST_TYPE_GET_OBJECT = 2 , AWS_S3_REQUEST_TYPE_LIST_PARTS = 3 , AWS_S3_REQUEST_TYPE_CREATE_MULTIPART_UPLOAD = 4 , AWS_S3_REQUEST_TYPE_UPLOAD_PART = 5 , AWS_S3_REQUEST_TYPE_ABORT_MULTIPART_UPLOAD = 6 , AWS_S3_REQUEST_TYPE_COMPLETE_MULTIPART_UPLOAD = 7 , AWS_S3_REQUEST_TYPE_UPLOAD_PART_COPY = 8 , AWS_S3_REQUEST_TYPE_COPY_OBJECT = 9 , AWS_S3_REQUEST_TYPE_PUT_OBJECT = 10 , AWS_S3_REQUEST_TYPE_CREATE_SESSION = 11 , AWS_S3_REQUEST_TYPE_MAX = 12 , } # [doc = " Invoked to provide response headers received during execution of the meta request, both for\n success and error HTTP status codes.\n\n Return AWS_OP_SUCCESS to continue processing the request.\n\n Return aws_raise_error(E) to cancel the request.\n The error you raise will be reflected in `aws_s3_meta_request_result.error_code`.\n If you're not sure which error to raise, use AWS_ERROR_S3_CANCELED."] pub type aws_s3_meta_request_headers_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , headers : * const aws_http_headers , response_status : :: libc :: c_int , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked to provide the response body as it is received.\n\n Note: If you set `enable_read_backpressure` true on the S3 client,\n you must maintain the flow-control window.\n The flow-control window shrinks as you receive body data via this callback.\n Whenever the flow-control window reaches 0 you will stop downloading data.\n Use aws_s3_meta_request_increment_read_window() to increment the window and keep data flowing.\n Maintain a larger window to keep up a high download throughput,\n parts cannot download in parallel unless the window is large enough to hold multiple parts.\n Maintain a smaller window to limit the amount of data buffered in memory.\n\n If `manual_window_management` is false, you do not need to maintain the flow-control window.\n No back-pressure is applied and data arrives as fast as possible.\n\n Return AWS_OP_SUCCESS to continue processing the request.\n\n Return aws_raise_error(E) to cancel the request.\n The error you raise will be reflected in `aws_s3_meta_request_result.error_code`.\n If you're not sure which error to raise, use AWS_ERROR_S3_CANCELED."] pub type aws_s3_meta_request_receive_body_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , body : * const aws_byte_cursor , range_start : u64 , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked when the entire meta request execution is complete."] pub type aws_s3_meta_request_finish_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , meta_request_result : * const aws_s3_meta_request_result , user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request_receive_body_extra_info { pub range_start : u64 , pub ticket : * mut aws_s3_buffer_ticket , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_receive_body_extra_info"] [:: std :: mem :: size_of :: < aws_s3_meta_request_receive_body_extra_info > () - 16usize] ; ["Alignment of aws_s3_meta_request_receive_body_extra_info"] [:: std :: mem :: align_of :: < aws_s3_meta_request_receive_body_extra_info > () - 8usize] ; ["Offset of field: aws_s3_meta_request_receive_body_extra_info::range_start"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_receive_body_extra_info , range_start) - 0usize] ; ["Offset of field: aws_s3_meta_request_receive_body_extra_info::ticket"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_receive_body_extra_info , ticket) - 8usize] ; } ; impl Default for aws_s3_meta_request_receive_body_extra_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 () } } } pub type aws_s3_meta_request_receive_body_callback_ex_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , body : * const aws_byte_cursor , info : aws_s3_meta_request_receive_body_extra_info , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Information sent in the meta_request progress callback."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_meta_request_progress { pub bytes_transferred : u64 , pub content_length : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_progress"] [:: std :: mem :: size_of :: < aws_s3_meta_request_progress > () - 16usize] ; ["Alignment of aws_s3_meta_request_progress"] [:: std :: mem :: align_of :: < aws_s3_meta_request_progress > () - 8usize] ; ["Offset of field: aws_s3_meta_request_progress::bytes_transferred"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_progress , bytes_transferred) - 0usize] ; ["Offset of field: aws_s3_meta_request_progress::content_length"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_progress , content_length) - 8usize] ; } ; # [doc = " Invoked to report progress of a meta-request.\n For PutObject, progress refers to bytes uploaded.\n For CopyObject, progress refers to bytes copied.\n For GetObject, progress refers to bytes downloaded.\n For anything else, progress refers to response body bytes received."] pub type aws_s3_meta_request_progress_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , progress : * const aws_s3_meta_request_progress , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked to report the telemetry of the meta request once a single request finishes.\n Note: *metrics is only valid for the duration of the callback. If you need to keep it around, use\n `aws_s3_request_metrics_acquire`"] pub type aws_s3_meta_request_telemetry_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , metrics : * mut aws_s3_request_metrics , user_data : * mut :: libc :: c_void) > ; pub type aws_s3_meta_request_shutdown_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; pub type aws_s3_client_shutdown_complete_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " Optional callback, for you to provide the full object checksum after the object was read.\n Client will NOT check the checksum provided before sending it to the server.\n\n @param meta_request  pointer to the aws_s3_meta_request of the upload.\n @param user_data     pointer to the user_data set.\n\n @return A new string with the full object checksum, as it is sent in a PutObject request (base64-encoded):\n         https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#API_PutObject_RequestSyntax\n         If an error occurs, call aws_raise_error(E) with a proper error code and return NULL."] pub type aws_s3_meta_request_full_object_checksum_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , user_data : * mut :: libc :: c_void) -> * mut aws_string > ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_tls_mode { AWS_MR_TLS_ENABLED = 0 , AWS_MR_TLS_DISABLED = 1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_compute_content_md5 { AWS_MR_CONTENT_MD5_DISABLED = 0 , AWS_MR_CONTENT_MD5_ENABLED = 1 , } impl aws_s3_checksum_algorithm { pub const AWS_SCA_CRC32C : aws_s3_checksum_algorithm = aws_s3_checksum_algorithm :: AWS_SCA_INIT ; } impl aws_s3_checksum_algorithm { pub const AWS_SCA_END : aws_s3_checksum_algorithm = aws_s3_checksum_algorithm :: AWS_SCA_CRC64NVME ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_checksum_algorithm { AWS_SCA_NONE = 0 , AWS_SCA_INIT = 1 , AWS_SCA_CRC32 = 2 , AWS_SCA_SHA1 = 3 , AWS_SCA_SHA256 = 4 , AWS_SCA_CRC64NVME = 5 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_checksum_location { AWS_SCL_NONE = 0 , AWS_SCL_HEADER = 1 , AWS_SCL_TRAILER = 2 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_recv_file_options { # [doc = " Create a new file if it doesn't exist, otherwise replace the existing file."] AWS_S3_RECV_FILE_CREATE_OR_REPLACE = 0 , # [doc = " Always create a new file. If the file already exists, AWS_ERROR_S3_RECV_FILE_ALREADY_EXISTS will be raised."] AWS_S3_RECV_FILE_CREATE_NEW = 1 , # [doc = " Create a new file if it doesn't exist, otherwise append to the existing file."] AWS_S3_RECV_FILE_CREATE_OR_APPEND = 2 , # [doc = " Write to an existing file at the specified position, defined by the `recv_file_position`.\n If the file does not exist, AWS_ERROR_S3_RECV_FILE_NOT_FOUND will be raised.\n If `recv_file_position` is not configured, start overwriting data at the beginning of the\n file (byte 0)."] AWS_S3_RECV_FILE_WRITE_TO_POSITION = 3 , } # [doc = " WARNING: experimental/unstable:\n Controls how client performance file I/O operations. Only applies to the file based workload."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_file_io_options { # [doc = " Skip buffering the part in memory before sending the request.\n\n Default to false on small objects, and true when the object size exceed a certain threshold\n`g_streaming_object_size_threshold`."] pub should_stream : bool , # [doc = " The estimated disk throughput. Only be applied when `streaming_upload` is true.\n in gigabits per second (Gbps).\n\n Notes: There are possibilities that cannot reach the all available disk throughput:\n 1. Disk is busy with other applications\n 2. OS Cache may cap the throughput, use `direct_io` to get around this.\n\n Default to throughput_target_gbps."] pub disk_throughput_gbps : f64 , # [doc = " Enable direct IO to bypass the OS cache. Helpful when the disk I/O outperforms the kernel cache.\n Notes:\n - Only supported on linux for now.\n - Only supports upload for now.\n - Check NOTES for O_DIRECT for additional info https://man7.org/linux/man-pages/man2/openat.2.html\n In summary, O_DIRECT is a potentially powerful tool that should be used with caution."] pub direct_io : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_file_io_options"] [:: std :: mem :: size_of :: < aws_s3_file_io_options > () - 24usize] ; ["Alignment of aws_s3_file_io_options"] [:: std :: mem :: align_of :: < aws_s3_file_io_options > () - 8usize] ; ["Offset of field: aws_s3_file_io_options::should_stream"] [:: std :: mem :: offset_of ! (aws_s3_file_io_options , should_stream) - 0usize] ; ["Offset of field: aws_s3_file_io_options::disk_throughput_gbps"] [:: std :: mem :: offset_of ! (aws_s3_file_io_options , disk_throughput_gbps) - 8usize] ; ["Offset of field: aws_s3_file_io_options::direct_io"] [:: std :: mem :: offset_of ! (aws_s3_file_io_options , direct_io) - 16usize] ; } ; # [doc = " Info about a single part, for you to review before the upload completes."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_part_review { pub size : u64 , pub checksum : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_review"] [:: std :: mem :: size_of :: < aws_s3_upload_part_review > () - 24usize] ; ["Alignment of aws_s3_upload_part_review"] [:: std :: mem :: align_of :: < aws_s3_upload_part_review > () - 8usize] ; ["Offset of field: aws_s3_upload_part_review::size"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_review , size) - 0usize] ; ["Offset of field: aws_s3_upload_part_review::checksum"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_review , checksum) - 8usize] ; } ; impl Default for aws_s3_upload_part_review { 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 = " Info for you to review before an upload completes.\n\n WARNING: This feature is experimental/unstable.\n At this time, review is only available for multipart upload\n (when Content-Length is above the `multipart_upload_threshold`,\n or Content-Length not specified)."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_review { pub checksum_algorithm : aws_s3_checksum_algorithm , pub part_count : usize , pub part_array : * mut aws_s3_upload_part_review , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_review"] [:: std :: mem :: size_of :: < aws_s3_upload_review > () - 24usize] ; ["Alignment of aws_s3_upload_review"] [:: std :: mem :: align_of :: < aws_s3_upload_review > () - 8usize] ; ["Offset of field: aws_s3_upload_review::checksum_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_upload_review , checksum_algorithm) - 0usize] ; ["Offset of field: aws_s3_upload_review::part_count"] [:: std :: mem :: offset_of ! (aws_s3_upload_review , part_count) - 8usize] ; ["Offset of field: aws_s3_upload_review::part_array"] [:: std :: mem :: offset_of ! (aws_s3_upload_review , part_array) - 16usize] ; } ; impl Default for aws_s3_upload_review { 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 = " Optional callback, for you to review an upload before it completes.\n For example, you can review each part's checksum and fail the upload if\n you do not agree with them.\n\n @param meta_request pointer to the aws_s3_meta_request of the upload.\n @param info Detailed info about the upload.\n\n Return AWS_OP_SUCCESS to continue processing the request.\n\n Return aws_raise_error(E) to cancel the request.\n The error you raise will be reflected in `aws_s3_meta_request_result.error_code`.\n If you're not sure which error to raise, use AWS_ERROR_S3_CANCELED.\n\n WARNING: This feature is experimental/unstable.\n At this time, the callback is only invoked for multipart upload\n (when Content-Length is above the `multipart_upload_threshold`,\n or Content-Length not specified)."] pub type aws_s3_meta_request_upload_review_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , review : * const aws_s3_upload_review , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " The factory function for S3 client to create a S3 Express credentials provider.\n The S3 client will be the only owner of the S3 Express credentials provider.\n\n During S3 client destruction, S3 client will start the destruction of the provider, and wait the\n on_provider_shutdown_callback to be invoked before the S3 client finish destruction.\n\n Note to implement the factory properly:\n - Make sure `on_provider_shutdown_callback` will be invoked after the provider finish shutdown, otherwise,\n leak will happen.\n - The provider must not acquire a reference to the client; otherwise, a circular reference will cause a deadlock.\n - The `client` provided CANNOT be used within the factory function call or the destructor.\n\n @param allocator    memory allocator to create the provider.\n @param client    The S3 client uses and owns the provider.\n @param on_provider_shutdown_callback    The callback to be invoked when the provider finishes shutdown.\n @param shutdown_user_data    The user data to invoke shutdown callback with\n @param user_data    The user data with the factory\n\n @return The aws_s3express_credentials_provider."] pub type aws_s3express_provider_factory_fn = :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , client : * mut aws_s3_client , on_provider_shutdown_callback : aws_simple_completion_callback , shutdown_user_data : * mut :: libc :: c_void , factory_user_data : * mut :: libc :: c_void) -> * mut aws_s3express_credentials_provider > ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_tcp_keep_alive_options { pub keep_alive_interval_sec : u16 , pub keep_alive_timeout_sec : u16 , pub keep_alive_max_failed_probes : u16 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_tcp_keep_alive_options"] [:: std :: mem :: size_of :: < aws_s3_tcp_keep_alive_options > () - 6usize] ; ["Alignment of aws_s3_tcp_keep_alive_options"] [:: std :: mem :: align_of :: < aws_s3_tcp_keep_alive_options > () - 2usize] ; ["Offset of field: aws_s3_tcp_keep_alive_options::keep_alive_interval_sec"] [:: std :: mem :: offset_of ! (aws_s3_tcp_keep_alive_options , keep_alive_interval_sec) - 0usize] ; ["Offset of field: aws_s3_tcp_keep_alive_options::keep_alive_timeout_sec"] [:: std :: mem :: offset_of ! (aws_s3_tcp_keep_alive_options , keep_alive_timeout_sec) - 2usize] ; ["Offset of field: aws_s3_tcp_keep_alive_options::keep_alive_max_failed_probes"] [:: std :: mem :: offset_of ! (aws_s3_tcp_keep_alive_options , keep_alive_max_failed_probes) - 4usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_client_config { pub max_active_connections_override : u32 , pub region : aws_byte_cursor , pub client_bootstrap : * mut aws_client_bootstrap , pub tls_mode : aws_s3_meta_request_tls_mode , pub tls_connection_options : * const aws_tls_connection_options , # [doc = " Optional.\n If set, this controls how the client interact with file I/O.\n Read `aws_s3_file_io_options` for details.\n  Notes: Only applies to meta requests with `send_filepath` set.\n  TODO: adapt it to `recv_filepath`.\n\n eg:\n - When the file is too large to fit in the buffer, set `should_stream` to avoid buffering the whole parts in\n  memory.\n - When the disk I/O is faster than OS cache, set `direct_io` to bypass the OS cache."] pub fio_opts : * mut aws_s3_file_io_options , # [doc = " Required.\n Configure the signing for the requests made from the client.\n - Credentials or credentials provider is required. Other configs are all optional, and will be default to what\n      needs to sign the request for S3, only overrides when Non-zero/Not-empty is set.\n - To skip signing, you can config it with anonymous credentials.\n - S3 Client will derive the right config for signing process based on this.\n\n Notes:\n - For AWS_SIGNING_ALGORITHM_V4_S3EXPRESS, S3 client will use the credentials in the config to derive the\n S3 Express credentials that are used in the signing process.\n - For other auth algorithm, client may make modifications to signing config before passing it on to signer.\n\n TODO: deprecate this structure from auth, introduce a new S3 specific one."] pub signing_config : * const aws_signing_config_aws , # [doc = " Optional.\n Size of parts the object will be downloaded or uploaded in, in bytes.\n This only affects AWS_S3_META_REQUEST_TYPE_GET_OBJECT and AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n\n If not set, a dynamic default part size will be used based on the throughput target, memory_limit_in_bytes.\n\n The client will adjust the part size for AWS_S3_META_REQUEST_TYPE_PUT_OBJECT if needed for service limits (max\n number of parts per upload is 10,000, minimum upload part size is 5 MiB).\n\n You can also set this per meta-request, via `aws_s3_meta_request_options.part_size`."] pub part_size : u64 , pub max_part_size : u64 , # [doc = " Optional.\n The size threshold in bytes for when to use multipart uploads.\n Uploads larger than this will use the multipart upload strategy.\n Uploads smaller or equal to this will use a single HTTP request.\n This only affects AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n If set, this should be at least `part_size`.\n If not set, maximal of `part_size` and 5 MiB will be used.\n\n You can also set this per meta-request, via `aws_s3_meta_request_options.multipart_upload_threshold`."] pub multipart_upload_threshold : u64 , pub throughput_target_gbps : f64 , pub memory_limit_in_bytes : u64 , pub retry_strategy : * mut aws_retry_strategy , # [doc = " TODO: move MD5 config to checksum config.\n For multi-part upload, content-md5 will be calculated if the AWS_MR_CONTENT_MD5_ENABLED is specified\n     or initial request has content-md5 header.\n For single-part upload, keep the content-md5 in the initial request unchanged."] pub compute_content_md5 : aws_s3_meta_request_compute_content_md5 , pub shutdown_callback : aws_s3_client_shutdown_complete_callback_fn , pub shutdown_callback_user_data : * mut :: libc :: c_void , # [doc = " Optional.\n Proxy configuration for http connection.\n If the connection_type is AWS_HPCT_HTTP_LEGACY, it will be converted to AWS_HPCT_HTTP_TUNNEL if tls_mode is\n ENABLED. Otherwise, it will be converted to AWS_HPCT_HTTP_FORWARD."] pub proxy_options : * const aws_http_proxy_options , # [doc = " Optional.\n Configuration for fetching proxy configuration from environment.\n By Default proxy_ev_settings.aws_http_proxy_env_var_type is set to AWS_HPEV_ENABLE which means read proxy\n configuration from environment.\n Only works when proxy_options is not set. If both are set, configuration from proxy_options is used."] pub proxy_ev_settings : * const proxy_env_var_settings , # [doc = " Optional.\n If set to 0, default value is used."] pub connect_timeout_ms : u32 , # [doc = " Optional.\n Set keepalive to periodically transmit messages for detecting a disconnected peer."] pub tcp_keep_alive_options : * const aws_s3_tcp_keep_alive_options , # [doc = " Optional.\n Configuration options for connection monitoring.\n If the transfer speed falls below the specified minimum_throughput_bytes_per_second, the operation is aborted.\n If set to NULL, default values are used."] pub monitoring_options : * const aws_http_connection_monitoring_options , # [doc = " Enable backpressure and prevent response data from downloading faster than you can handle it.\n\n If false (default), no backpressure is applied and data will download as fast as possible.\n\n If true, each meta request has a flow-control window that shrinks as\n response body data is downloaded (headers do not affect the window).\n `initial_read_window` determines the starting size of each meta request's window.\n\n - You will stop receiving response body data whenever the flow-control window reaches 0\n - If the window size remaining is smaller than the part download, client will buffer the part until\n   the window opens up to delivery the full part.\n - You must call aws_s3_meta_request_increment_read_window() to keep data flowing.\n\n WARNING: This feature is experimental.\n Currently, backpressure is only applied to GetObject requests which are split into multiple parts,\n - If you set body_callback, no more data will be delivered once the window reaches 0.\n - If you set body_callback_ex, you may still receive some data after the window reaches 0. TODO: fix it."] pub enable_read_backpressure : bool , # [doc = " The starting size of each meta request's flow-control window, in bytes.\n Ignored unless `enable_read_backpressure` is true."] pub initial_read_window : usize , # [doc = " To enable S3 Express support or not."] pub enable_s3express : bool , # [doc = " Optional.\n Only used when `enable_s3express` is set.\n\n If set, client will invoke the factory to get the provider to use, when needed.\n\n If not set, client will create a default S3 Express provider under the hood.\n\n NOTE: THE FOLLOWING BEHAVIOR IS EXPERIMENTAL AND UNSTABLE\n Default S3 Express provider will pass the headers allowed in `g_s3_create_session_allowed_headers` to the\n CreateSession call."] pub s3express_provider_override_factory : aws_s3express_provider_factory_fn , pub factory_user_data : * mut :: libc :: c_void , # [doc = " THIS IS AN EXPERIMENTAL AND UNSTABLE API\n (Optional)\n An array of network interface names. The client will distribute the\n connections across network interface names provided in this array. If any interface name is invalid, goes down,\n or has any issues like network access, you will see connection failures.\n\n This option is only supported on Linux, MacOS, and platforms that have either SO_BINDTODEVICE or IP_BOUND_IF. It\n is not supported on Windows. `AWS_ERROR_PLATFORM_NOT_SUPPORTED` will be raised on unsupported platforms. On\n Linux, SO_BINDTODEVICE is used and requires kernel version >= 5.7 or root privileges."] pub network_interface_names_array : * const aws_byte_cursor , pub num_network_interface_names : usize , # [doc = " Experimental (touch at your own risk).\n (Optional)\n Factory function to create buffer pool.\n if not set creates default implementation of the buffer pool."] pub buffer_pool_factory_fn : aws_s3_buffer_pool_factory_fn , pub buffer_pool_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client_config"] [:: std :: mem :: size_of :: < aws_s3_client_config > () - 248usize] ; ["Alignment of aws_s3_client_config"] [:: std :: mem :: align_of :: < aws_s3_client_config > () - 8usize] ; ["Offset of field: aws_s3_client_config::max_active_connections_override"] [:: std :: mem :: offset_of ! (aws_s3_client_config , max_active_connections_override) - 0usize] ; ["Offset of field: aws_s3_client_config::region"] [:: std :: mem :: offset_of ! (aws_s3_client_config , region) - 8usize] ; ["Offset of field: aws_s3_client_config::client_bootstrap"] [:: std :: mem :: offset_of ! (aws_s3_client_config , client_bootstrap) - 24usize] ; ["Offset of field: aws_s3_client_config::tls_mode"] [:: std :: mem :: offset_of ! (aws_s3_client_config , tls_mode) - 32usize] ; ["Offset of field: aws_s3_client_config::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_s3_client_config , tls_connection_options) - 40usize] ; ["Offset of field: aws_s3_client_config::fio_opts"] [:: std :: mem :: offset_of ! (aws_s3_client_config , fio_opts) - 48usize] ; ["Offset of field: aws_s3_client_config::signing_config"] [:: std :: mem :: offset_of ! (aws_s3_client_config , signing_config) - 56usize] ; ["Offset of field: aws_s3_client_config::part_size"] [:: std :: mem :: offset_of ! (aws_s3_client_config , part_size) - 64usize] ; ["Offset of field: aws_s3_client_config::max_part_size"] [:: std :: mem :: offset_of ! (aws_s3_client_config , max_part_size) - 72usize] ; ["Offset of field: aws_s3_client_config::multipart_upload_threshold"] [:: std :: mem :: offset_of ! (aws_s3_client_config , multipart_upload_threshold) - 80usize] ; ["Offset of field: aws_s3_client_config::throughput_target_gbps"] [:: std :: mem :: offset_of ! (aws_s3_client_config , throughput_target_gbps) - 88usize] ; ["Offset of field: aws_s3_client_config::memory_limit_in_bytes"] [:: std :: mem :: offset_of ! (aws_s3_client_config , memory_limit_in_bytes) - 96usize] ; ["Offset of field: aws_s3_client_config::retry_strategy"] [:: std :: mem :: offset_of ! (aws_s3_client_config , retry_strategy) - 104usize] ; ["Offset of field: aws_s3_client_config::compute_content_md5"] [:: std :: mem :: offset_of ! (aws_s3_client_config , compute_content_md5) - 112usize] ; ["Offset of field: aws_s3_client_config::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_client_config , shutdown_callback) - 120usize] ; ["Offset of field: aws_s3_client_config::shutdown_callback_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client_config , shutdown_callback_user_data) - 128usize] ; ["Offset of field: aws_s3_client_config::proxy_options"] [:: std :: mem :: offset_of ! (aws_s3_client_config , proxy_options) - 136usize] ; ["Offset of field: aws_s3_client_config::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_s3_client_config , proxy_ev_settings) - 144usize] ; ["Offset of field: aws_s3_client_config::connect_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_client_config , connect_timeout_ms) - 152usize] ; ["Offset of field: aws_s3_client_config::tcp_keep_alive_options"] [:: std :: mem :: offset_of ! (aws_s3_client_config , tcp_keep_alive_options) - 160usize] ; ["Offset of field: aws_s3_client_config::monitoring_options"] [:: std :: mem :: offset_of ! (aws_s3_client_config , monitoring_options) - 168usize] ; ["Offset of field: aws_s3_client_config::enable_read_backpressure"] [:: std :: mem :: offset_of ! (aws_s3_client_config , enable_read_backpressure) - 176usize] ; ["Offset of field: aws_s3_client_config::initial_read_window"] [:: std :: mem :: offset_of ! (aws_s3_client_config , initial_read_window) - 184usize] ; ["Offset of field: aws_s3_client_config::enable_s3express"] [:: std :: mem :: offset_of ! (aws_s3_client_config , enable_s3express) - 192usize] ; ["Offset of field: aws_s3_client_config::s3express_provider_override_factory"] [:: std :: mem :: offset_of ! (aws_s3_client_config , s3express_provider_override_factory) - 200usize] ; ["Offset of field: aws_s3_client_config::factory_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client_config , factory_user_data) - 208usize] ; ["Offset of field: aws_s3_client_config::network_interface_names_array"] [:: std :: mem :: offset_of ! (aws_s3_client_config , network_interface_names_array) - 216usize] ; ["Offset of field: aws_s3_client_config::num_network_interface_names"] [:: std :: mem :: offset_of ! (aws_s3_client_config , num_network_interface_names) - 224usize] ; ["Offset of field: aws_s3_client_config::buffer_pool_factory_fn"] [:: std :: mem :: offset_of ! (aws_s3_client_config , buffer_pool_factory_fn) - 232usize] ; ["Offset of field: aws_s3_client_config::buffer_pool_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client_config , buffer_pool_user_data) - 240usize] ; } ; impl Default for aws_s3_client_config { 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)] pub struct aws_s3_checksum_config { # [doc = " PUT Object specific *******************************/\n/**\n The location of client added checksum header.\n\n If AWS_SCL_NONE. No request payload checksum will be added.\n\n If AWS_SCL_HEADER, the client will calculate the checksum and add it to the headers.\n\n If AWS_SCL_TRAILER, the payload will be aws_chunked encoded, The client will calculate the checksum and add it to\n the trailer. Note the payload of the original request cannot be aws-chunked encoded already, this will cause an\n error."] pub location : aws_s3_checksum_location , # [doc = " The checksum algorithm used.\n Must be set if location is not AWS_SCL_NONE."] pub checksum_algorithm : aws_s3_checksum_algorithm , # [doc = " Optional.\n Provide the full object checksum. This callback is invoked once, after the entire body has been read.\n sent.\n\n NOTE:\n  - Do not set this callback if the HTTP message already has a checksum header (e.g. x-amz-checksum-crc32). Doing\n      so will raise AWS_ERROR_INVALID_ARGUMENT.\n  - checksum_algorithm must be set to the algorithm you will use.\n\n WARNING: This feature is experimental/unstable.\n At this time, full object checksum callback is only available for multipart upload\n (when Content-Length is above the `multipart_upload_threshold`,\n or Content-Length not specified). Otherwise, it will be ignored."] pub full_object_checksum_callback : aws_s3_meta_request_full_object_checksum_fn , pub user_data : * mut :: libc :: c_void , # [doc = " GET Object specific *******************************/\n/**\n Enable checksum mode header will be attached to GET requests, this will tell s3 to send back checksums headers if\n they exist. Calculate the corresponding checksum on the response bodies. The meta request will finish with a did\n validate field and set the error code to AWS_ERROR_S3_RESPONSE_CHECKSUM_MISMATCH if the calculated\n checksum, and checksum found in the response header do not match."] pub validate_response_checksum : bool , # [doc = " Optional array of `enum aws_s3_checksum_algorithm`.\n\n Ignored when validate_response_checksum is not set.\n If not set all the algorithms will be selected as default behavior.\n Owned by the caller.\n\n The list of algorithms for user to pick up when validate the checksum. Client will pick up the algorithm from the\n list with the priority based on performance, and the algorithm sent by server. The priority based on performance\n is [CRC64NVME, CRC32C, CRC32, SHA1, SHA256].\n\n If the response checksum was validated by client, the result will indicate which algorithm was picked."] pub validate_checksum_algorithms : * const aws_array_list , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_checksum_config"] [:: std :: mem :: size_of :: < aws_s3_checksum_config > () - 40usize] ; ["Alignment of aws_s3_checksum_config"] [:: std :: mem :: align_of :: < aws_s3_checksum_config > () - 8usize] ; ["Offset of field: aws_s3_checksum_config::location"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , location) - 0usize] ; ["Offset of field: aws_s3_checksum_config::checksum_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , checksum_algorithm) - 4usize] ; ["Offset of field: aws_s3_checksum_config::full_object_checksum_callback"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , full_object_checksum_callback) - 8usize] ; ["Offset of field: aws_s3_checksum_config::user_data"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , user_data) - 16usize] ; ["Offset of field: aws_s3_checksum_config::validate_response_checksum"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , validate_response_checksum) - 24usize] ; ["Offset of field: aws_s3_checksum_config::validate_checksum_algorithms"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , validate_checksum_algorithms) - 32usize] ; } ; impl Default for aws_s3_checksum_config { 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 a new meta request, ie, file transfer that will be handled by the high performance client.\n\n There are several ways to pass the request's body data:\n 1) If the data is already in memory, set the body-stream on `message`.\n 2) If the data is on disk, set `send_filepath` for best performance.\n 3) If the data is available, but copying each chunk is asynchronous, set `send_async_stream`.\n 4) If you're not sure when each chunk of data will be available, use `send_using_async_writes`."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request_options { pub type_ : aws_s3_meta_request_type , # [doc = " The S3 operation name (e.g. \"CreateBucket\").\n This MUST be set if type is AWS_S3_META_REQUEST_TYPE_DEFAULT;\n it is automatically populated for other meta-request types.\n The canonical operation names are listed here:\n https://docs.aws.amazon.com/AmazonS3/latest/API/API_Operations_Amazon_Simple_Storage_Service.html\n\n This name is used to fill out details in metrics and error reports.\n It also drives some operation-specific behavior.\n If you pass the wrong name, you risk getting the wrong behavior.\n\n For example, every operation except \"GetObject\" has its response checked\n for error, even if the HTTP status-code was 200 OK\n (see https://repost.aws/knowledge-center/s3-resolve-200-internalerror).\n If you used AWS_S3_META_REQUEST_TYPE_DEFAULT to do GetObject, but mis-named\n it \"Download\", and the object looked like XML with an error code,\n then the meta-request would fail. You may log the full response body,\n and leak sensitive data."] pub operation_name : aws_byte_cursor , # [doc = " Configure the signing for each request created for this meta request. If NULL, options in the client will be\n  used.\n - The credentials will be obtained based on the precedence of:\n      1. `credentials` from `signing_config` in `aws_s3_meta_request_options`\n      2. `credentials_provider` from `signing_config` in `aws_s3_meta_request_options`\n      3. `credentials` from `signing_config` cached in the client\n      4. `credentials_provider` cached in the client\n - To skip signing, you can config it with anonymous credentials.\n - S3 Client will derive the right config for signing process based on this.\n\n Notes:\n - For AWS_SIGNING_ALGORITHM_V4_S3EXPRESS, S3 client will use the credentials in the config to derive the\n S3 Express credentials that are used in the signing process.\n - For other auth algorithm, client may make modifications to signing config before passing it on to signer."] pub signing_config : * const aws_signing_config_aws , pub message : * mut aws_http_message , # [doc = " Optional.\n If set, the received data will be written into this file.\n the `body_callback` will NOT be invoked.\n This gives a better performance when receiving data to write to a file.\n See `aws_s3_recv_file_options` for the configuration on the receive file."] pub recv_filepath : aws_byte_cursor , # [doc = " Optional.\n Default to AWS_S3_RECV_FILE_CREATE_OR_REPLACE.\n This only works with recv_filepath set.\n See `aws_s3_recv_file_options`."] pub recv_file_option : aws_s3_recv_file_options , # [doc = " Optional.\n The specified position to start writing at for the recv file when `recv_file_option` is set to\n AWS_S3_RECV_FILE_WRITE_TO_POSITION, ignored otherwise."] pub recv_file_position : u64 , # [doc = " Set it to be true to delete the receive file on failure, otherwise, the file will be left as-is.\n This only works with recv_filepath set."] pub recv_file_delete_on_failure : bool , # [doc = " Optional.\n If set, this file is sent as the request body.\n This gives the best performance when sending data from a file.\n Do not set if the body is being passed by other means (see note above)."] pub send_filepath : aws_byte_cursor , # [doc = " Optional.\n Overrides the client config if set.\n If set, this controls how the meta request interact with file I/O.\n Read `aws_s3_file_io_options` for details.\n  Notes: Only applies when `send_filepath` is set.\n  TODO: adapt it to `recv_filepath`.\n\n Note: if both client and meta request don't set this, for objects larger than 2TiB, this will be set to a default\n options with `should_stream` to be True and others follow the default to avoid memory issues.\n\n eg:\n - When the file is too large to fit in the buffer, set `should_stream` to avoid buffering the whole parts in\n  memory.\n - When the disk I/O is faster than OS cache, set `direct_io` to bypass the OS cache."] pub fio_opts : * mut aws_s3_file_io_options , # [doc = " Optional - EXPERIMENTAL/UNSTABLE\n If set, the request body comes from this async stream.\n Use this when outgoing data will be produced in asynchronous chunks.\n The S3 client will read from the stream whenever it's ready to upload another chunk.\n\n WARNING: The S3 client can deadlock if many async streams are \"stalled\",\n never completing their async read. If you're not sure when (if ever)\n data will be ready, use `send_using_async_writes` instead.\n\n Do not set if the body is being passed by other means (see note above)."] pub send_async_stream : * mut aws_async_input_stream , # [doc = " Optional - EXPERIMENTAL/UNSTABLE\n Set this to send request body data using the async aws_s3_meta_request_poll_write()\n or aws_s3_meta_request_write() functions.\n Use this when outgoing data will be produced in asynchronous chunks,\n and you're not sure when (if ever) each chunk will be ready.\n\n This only works with AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n\n Do not set if the body is being passed by other means (see note above)."] pub send_using_async_writes : bool , # [doc = " Optional.\n if set, the flexible checksum will be performed by client based on the config.\n\n Notes: checksum can also be added through the http message provided.\n      The checksum in http header will override corresponding the checksum config."] pub checksum_config : * const aws_s3_checksum_config , # [doc = " Optional.\n Size of parts the object will be downloaded or uploaded in, in bytes.\n This only affects AWS_S3_META_REQUEST_TYPE_GET_OBJECT and AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n\n If not set, the value from `aws_s3_client_config.part_size` is used, which defaults to a dynamic value based on\n the throughput target, memory_limit_in_bytes and the requested object size.\n\n The client will adjust the part size for AWS_S3_META_REQUEST_TYPE_PUT_OBJECT if needed for service limits (max\n number of parts per upload is 10,000, minimum upload part size is 5 MiB)."] pub part_size : u64 , # [doc = " Optional - EXPERIMENTAL/UNSTABLE\n Set this to prefer for the dynamic default part_size over the part size set for both client and meta request for\n the best performance under the memory constrain, especially for getting large objects."] pub force_dynamic_part_size : bool , # [doc = " Optional.\n The size threshold in bytes for when to use multipart uploads.\n Uploads larger than this will use the multipart upload strategy.\n Uploads smaller or equal to this will use a single HTTP request.\n This only affects AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n If set, this should be at least `part_size`.\n If not set, `part_size` adjusted by client will be used as the threshold.\n If both `part_size` and `multipart_upload_threshold` are not set,\n the values from `aws_s3_client_config` are used."] pub multipart_upload_threshold : u64 , pub user_data : * mut :: libc :: c_void , # [doc = " Optional.\n Invoked to provide response headers received during execution of the meta request.\n Note: this callback will not be fired for cases when resuming an\n operation that was already completed (ex. pausing put object after it\n uploaded all data and then resuming it)\n See `aws_s3_meta_request_headers_callback_fn`."] pub headers_callback : aws_s3_meta_request_headers_callback_fn , # [doc = " Invoked to provide the response body as it is received.\n See `aws_s3_meta_request_receive_body_callback_fn`."] pub body_callback : aws_s3_meta_request_receive_body_callback_fn , # [doc = " Invoked to provide the response body as it is received.\n Provides extra information as compared to regular callback.\n Note: setting both body_callback and body_callback_ex is not\n considered valid and meta request creation will fail.\n See `aws_s3_meta_request_receive_body_callback_ex_fn`."] pub body_callback_ex : aws_s3_meta_request_receive_body_callback_ex_fn , # [doc = " Invoked when the entire meta request execution is complete.\n See `aws_s3_meta_request_finish_fn`."] pub finish_callback : aws_s3_meta_request_finish_fn , pub shutdown_callback : aws_s3_meta_request_shutdown_fn , # [doc = " Invoked to report progress of the meta request execution.\n See `aws_s3_meta_request_progress_fn`."] pub progress_callback : aws_s3_meta_request_progress_fn , # [doc = " Optional.\n To get telemetry metrics when a single request finishes.\n If set the request will keep track of the metrics from `aws_s3_request_metrics`, and fire the callback when the\n request finishes receiving response.\n See `aws_s3_meta_request_telemetry_fn`"] pub telemetry_callback : aws_s3_meta_request_telemetry_fn , # [doc = " Optional.\n Callback for reviewing an upload before it completes.\n WARNING: experimental/unstable\n See `aws_s3_meta_request_upload_review_fn`"] pub upload_review_callback : aws_s3_meta_request_upload_review_fn , # [doc = " Optional.\n Endpoint override for request. Can be used to override scheme and port of\n the endpoint.\n There is some overlap between Host header and Endpoint and corner cases\n are handled as follows:\n - Only Host header is set - Host is used to construct endpoint. https is\n   default with corresponding port\n - Only endpoint is set - Host header is created from endpoint. Port and\n   Scheme from endpoint is used.\n - Both Host and Endpoint is set - Host header must match Authority of\n   Endpoint uri. Port and Scheme from endpoint is used."] pub endpoint : * const aws_uri , # [doc = " Optional.\n For meta requests that support pause/resume (e.g. PutObject), serialized resume token returned by\n aws_s3_meta_request_pause() can be provided here.\n Note: If PutObject request specifies a checksum algorithm, client will calculate checksums while skipping parts\n from the buffer and compare them them to previously uploaded part checksums."] pub resume_token : * mut aws_s3_meta_request_resume_token , pub object_size_hint : * const u64 , pub copy_source_uri : aws_byte_cursor , pub max_active_connections_override : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_options"] [:: std :: mem :: size_of :: < aws_s3_meta_request_options > () - 272usize] ; ["Alignment of aws_s3_meta_request_options"] [:: std :: mem :: align_of :: < aws_s3_meta_request_options > () - 8usize] ; ["Offset of field: aws_s3_meta_request_options::type_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , type_) - 0usize] ; ["Offset of field: aws_s3_meta_request_options::operation_name"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , operation_name) - 8usize] ; ["Offset of field: aws_s3_meta_request_options::signing_config"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , signing_config) - 24usize] ; ["Offset of field: aws_s3_meta_request_options::message"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , message) - 32usize] ; ["Offset of field: aws_s3_meta_request_options::recv_filepath"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , recv_filepath) - 40usize] ; ["Offset of field: aws_s3_meta_request_options::recv_file_option"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , recv_file_option) - 56usize] ; ["Offset of field: aws_s3_meta_request_options::recv_file_position"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , recv_file_position) - 64usize] ; ["Offset of field: aws_s3_meta_request_options::recv_file_delete_on_failure"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , recv_file_delete_on_failure) - 72usize] ; ["Offset of field: aws_s3_meta_request_options::send_filepath"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , send_filepath) - 80usize] ; ["Offset of field: aws_s3_meta_request_options::fio_opts"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , fio_opts) - 96usize] ; ["Offset of field: aws_s3_meta_request_options::send_async_stream"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , send_async_stream) - 104usize] ; ["Offset of field: aws_s3_meta_request_options::send_using_async_writes"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , send_using_async_writes) - 112usize] ; ["Offset of field: aws_s3_meta_request_options::checksum_config"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , checksum_config) - 120usize] ; ["Offset of field: aws_s3_meta_request_options::part_size"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , part_size) - 128usize] ; ["Offset of field: aws_s3_meta_request_options::force_dynamic_part_size"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , force_dynamic_part_size) - 136usize] ; ["Offset of field: aws_s3_meta_request_options::multipart_upload_threshold"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , multipart_upload_threshold) - 144usize] ; ["Offset of field: aws_s3_meta_request_options::user_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , user_data) - 152usize] ; ["Offset of field: aws_s3_meta_request_options::headers_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , headers_callback) - 160usize] ; ["Offset of field: aws_s3_meta_request_options::body_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , body_callback) - 168usize] ; ["Offset of field: aws_s3_meta_request_options::body_callback_ex"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , body_callback_ex) - 176usize] ; ["Offset of field: aws_s3_meta_request_options::finish_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , finish_callback) - 184usize] ; ["Offset of field: aws_s3_meta_request_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , shutdown_callback) - 192usize] ; ["Offset of field: aws_s3_meta_request_options::progress_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , progress_callback) - 200usize] ; ["Offset of field: aws_s3_meta_request_options::telemetry_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , telemetry_callback) - 208usize] ; ["Offset of field: aws_s3_meta_request_options::upload_review_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , upload_review_callback) - 216usize] ; ["Offset of field: aws_s3_meta_request_options::endpoint"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , endpoint) - 224usize] ; ["Offset of field: aws_s3_meta_request_options::resume_token"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , resume_token) - 232usize] ; ["Offset of field: aws_s3_meta_request_options::object_size_hint"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , object_size_hint) - 240usize] ; ["Offset of field: aws_s3_meta_request_options::copy_source_uri"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , copy_source_uri) - 248usize] ; ["Offset of field: aws_s3_meta_request_options::max_active_connections_override"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , max_active_connections_override) - 264usize] ; } ; impl Default for aws_s3_meta_request_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)] pub struct aws_s3_meta_request_result { pub error_response_headers : * mut aws_http_headers , pub error_response_body : * mut aws_byte_buf , pub error_response_operation_name : * mut aws_string , pub response_status : :: libc :: c_int , pub did_validate : bool , pub validation_algorithm : aws_s3_checksum_algorithm , pub error_code : :: libc :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_result"] [:: std :: mem :: size_of :: < aws_s3_meta_request_result > () - 40usize] ; ["Alignment of aws_s3_meta_request_result"] [:: std :: mem :: align_of :: < aws_s3_meta_request_result > () - 8usize] ; ["Offset of field: aws_s3_meta_request_result::error_response_headers"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , error_response_headers) - 0usize] ; ["Offset of field: aws_s3_meta_request_result::error_response_body"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , error_response_body) - 8usize] ; ["Offset of field: aws_s3_meta_request_result::error_response_operation_name"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , error_response_operation_name) - 16usize] ; ["Offset of field: aws_s3_meta_request_result::response_status"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , response_status) - 24usize] ; ["Offset of field: aws_s3_meta_request_result::did_validate"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , did_validate) - 28usize] ; ["Offset of field: aws_s3_meta_request_result::validation_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , validation_algorithm) - 32usize] ; ["Offset of field: aws_s3_meta_request_result::error_code"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , error_code) - 36usize] ; } ; impl Default for aws_s3_meta_request_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 () } } } unsafe extern "C" { pub fn aws_s3_client_new (allocator : * mut aws_allocator , client_config : * const aws_s3_client_config) -> * mut aws_s3_client ; } unsafe extern "C" { # [doc = " Add a reference, keeping this object alive.\n The reference must be released when you are done with it, or it's memory will never be cleaned up.\n You must not pass in NULL.\n Always returns the same pointer that was passed in."] pub fn aws_s3_client_acquire (client : * mut aws_s3_client) -> * mut aws_s3_client ; } unsafe extern "C" { # [doc = " Release a reference.\n When the reference count drops to 0, this object will be cleaned up.\n It's OK to pass in NULL (nothing happens).\n Always returns NULL."] pub fn aws_s3_client_release (client : * mut aws_s3_client) -> * mut aws_s3_client ; } unsafe extern "C" { pub fn aws_s3_client_make_meta_request (client : * mut aws_s3_client , options : * const aws_s3_meta_request_options) -> * mut aws_s3_meta_request ; } # [doc = " The result of an `aws_s3_meta_request_poll_write()` call.\n Think of this like Rust's `Poll<Result<size_t, int>>`, or C++'s `optional<expected<size_t, int>>`."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_meta_request_poll_write_result { pub is_pending : bool , pub error_code : :: libc :: c_int , pub bytes_processed : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_poll_write_result"] [:: std :: mem :: size_of :: < aws_s3_meta_request_poll_write_result > () - 16usize] ; ["Alignment of aws_s3_meta_request_poll_write_result"] [:: std :: mem :: align_of :: < aws_s3_meta_request_poll_write_result > () - 8usize] ; ["Offset of field: aws_s3_meta_request_poll_write_result::is_pending"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_poll_write_result , is_pending) - 0usize] ; ["Offset of field: aws_s3_meta_request_poll_write_result::error_code"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_poll_write_result , error_code) - 4usize] ; ["Offset of field: aws_s3_meta_request_poll_write_result::bytes_processed"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_poll_write_result , bytes_processed) - 8usize] ; } ; unsafe extern "C" { # [doc = " Attempt to write data.\n\n You must set `aws_s3_meta_request_options.send_using_async_writes` to use this function.\n\n This is a non-blocking poll-style async function, similar to Rust's:\n https://docs.rs/futures/latest/futures/io/trait.AsyncWrite.html#tymethod.poll_write\n If you prefer completion-style async functions, and your data can outlive\n the callstack, use aws_s3_meta_request_write() instead.\n\n Check the returned `result` struct to see what happened:\n 1)   If `result.is_pending == true` then no work was done.\n      The waker callback will be invoked when you can call poll_write() again.\n      Do not call poll_write() again before the waker is invoked.\n\n 2)   Else if `result.error_code != 0` then poll_write() did not succeed\n      and you should not call it again. The meta request is guaranteed to finish soon\n      (you don't need to worry about canceling the meta request yourself after a failed write).\n      A common error code is AWS_ERROR_S3_REQUEST_HAS_COMPLETED, indicating\n      the meta request completed for reasons unrelated to the poll_write() call\n      (e.g. CreateMultipartUpload received a 403 Forbidden response).\n      AWS_ERROR_INVALID_STATE usually indicates that you're calling poll_write()\n      incorrectly (e.g. not waiting for waker callback from previous poll_write() call).\n\n 3)   Else `result.bytes_processed` tells you how much data was processed.\n      `bytes_processed` may be less than the `data.len` you passed in.\n      Continue calling poll_write() with the remaining data until everything is processed.\n      `result.bytes_processed` won't be 0 unless you passed in `data.len` of 0.\n\n @param meta_request  Meta request\n\n @param data          The data to send. The data can be any size.\n                      `result.bytes_processed` indicates how many bytes were\n                      processed by this call.\n\n @param eof           Pass true to signal EOF (end of file).\n                      If poll_write() doesn't process all your data\n                      (`result.is_pending` or `result.byte_processed < data.len`)\n                      then EOF was ignored, and you need to pass it again\n                      to subsequent poll_write() calls.\n\n @param waker         Waker callback.\n                      If `result.is_pending == true`, then the waker will be called\n                      exactly once when it's a good time to call poll_write() again.\n                      If `result.is_pending == false`, the waker will never be called.\n\n @param user_data     Pointer to be passed to the waker callback.\n\n WARNING: This feature is experimental."] pub fn aws_s3_meta_request_poll_write (meta_request : * mut aws_s3_meta_request , data : aws_byte_cursor , eof : bool , waker : aws_simple_completion_callback , user_data : * mut :: libc :: c_void) -> aws_s3_meta_request_poll_write_result ; } unsafe extern "C" { # [doc = " Write the next chunk of data.\n\n You must set `aws_s3_meta_request_options.send_using_async_writes` to use this function.\n\n This function is asynchronous, and returns a future (see <aws/io/future.h>).\n You may not call write() again until the future completes.\n\n If the future completes with an error code, then write() did not succeed\n and you should not call it again. If the future contains any error code,\n the meta request is guaranteed to finish soon (you don't need to worry about\n canceling the meta request yourself after a failed write).\n A common error code is AWS_ERROR_S3_REQUEST_HAS_COMPLETED, indicating\n the meta request completed for reasons unrelated to the write() call\n (e.g. CreateMultipartUpload received a 403 Forbidden response).\n AWS_ERROR_INVALID_STATE usually indicates that you're calling write()\n incorrectly (e.g. not waiting for previous write to complete).\n\n You MUST keep the data in memory until the future completes.\n If you cannot do this, use aws_s3_meta_request_poll_write() instead.\n\n You can wait any length of time between calls to write().\n If there's not enough data to upload a part, the data will be copied\n to a buffer and the future will immediately complete.\n\n @param meta_request  Meta request\n\n @param data          The data to send. The data can be any size.\n\n @param eof           Pass true to signal EOF (end of file).\n                      Do not call write() again after passing true.\n\n This function never returns NULL.\n\n WARNING: This feature is experimental."] pub fn aws_s3_meta_request_write (meta_request : * mut aws_s3_meta_request , data : aws_byte_cursor , eof : bool) -> * mut aws_future_void ; } unsafe extern "C" { # [doc = " Increment the flow-control window, so that response data continues downloading.\n\n If the client was created with `enable_read_backpressure` set true,\n each meta request has a flow-control window that shrinks as response\n body data is downloaded (headers do not affect the size of the window).\n The client's `initial_read_window` determines the starting size of each meta request's window.\n If a meta request's flow-control window reaches 0, no further data will be downloaded.\n If the `initial_read_window` is 0, the request will not start until the window is incremented.\n Maintain a larger window to keep up a high download throughput,\n parts cannot download in parallel unless the window is large enough to hold multiple parts.\n Maintain a smaller window to limit the amount of data buffered in memory.\n\n If `enable_read_backpressure` is false this call will have no effect,\n no backpressure is being applied and data is being downloaded as fast as possible.\n\n WARNING: This feature is experimental.\n Currently, backpressure is applied to GetObject requests,\n - If you set body_callback, no more data will be delivered once the window reaches 0.\n - If you set body_callback_ex, you may still receive some data after the window reaches 0. TODO: fix it."] pub fn aws_s3_meta_request_increment_read_window (meta_request : * mut aws_s3_meta_request , bytes : u64) ; } unsafe extern "C" { pub fn aws_s3_meta_request_cancel (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { # [doc = " Note: pause is currently only supported on upload requests.\n In order to pause an ongoing upload, call aws_s3_meta_request_pause() that\n will return resume token. Token can be used to query the state of operation\n at the pausing time.\n To resume an upload that was paused, supply resume token in the meta\n request options structure member aws_s3_meta_request_options.resume_token.\n The upload can be resumed either from the same client or a different one.\n Corner cases for resume upload are as follows:\n - upload is not MPU - fail with AWS_ERROR_UNSUPPORTED_OPERATION\n - pausing before MPU is created - NULL resume token returned. NULL resume\n   token is equivalent to restarting upload\n - pausing in the middle of part transfer - return resume token. scheduling of\n   new part uploads stops.\n - pausing after completeMPU started - return resume token. if s3 cannot find\n   find associated MPU id when resuming with that token and num of parts\n   uploaded equals to total num parts, then operation is a no op. Otherwise\n   operation fails.\n Note: for no op case the call will succeed and finish/shutdown request callbacks will\n   fire, but on headers callback will not fire.\n Note: similar to cancel pause does not cancel requests already in flight and\n and parts might complete after pause is requested.\n @param meta_request pointer to the aws_s3_meta_request of the upload to be paused\n @param resume_token resume token\n @return either AWS_OP_ERR or AWS_OP_SUCCESS"] pub fn aws_s3_meta_request_pause (meta_request : * mut aws_s3_meta_request , out_resume_token : * mut * mut aws_s3_meta_request_resume_token) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_resume_token_options { pub upload_id : aws_byte_cursor , pub part_size : u64 , pub total_num_parts : usize , # [doc = " Optional.\n\n Note: during resume num_parts_uploaded is used for sanity checking against\n uploads on s3 side.\n In cases where upload id does not exist (already resumed using this token\n or pause called after upload completes, etc...) and num_parts_uploaded\n equals to total num parts, resume will become a noop."] pub num_parts_completed : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_resume_token_options"] [:: std :: mem :: size_of :: < aws_s3_upload_resume_token_options > () - 40usize] ; ["Alignment of aws_s3_upload_resume_token_options"] [:: std :: mem :: align_of :: < aws_s3_upload_resume_token_options > () - 8usize] ; ["Offset of field: aws_s3_upload_resume_token_options::upload_id"] [:: std :: mem :: offset_of ! (aws_s3_upload_resume_token_options , upload_id) - 0usize] ; ["Offset of field: aws_s3_upload_resume_token_options::part_size"] [:: std :: mem :: offset_of ! (aws_s3_upload_resume_token_options , part_size) - 16usize] ; ["Offset of field: aws_s3_upload_resume_token_options::total_num_parts"] [:: std :: mem :: offset_of ! (aws_s3_upload_resume_token_options , total_num_parts) - 24usize] ; ["Offset of field: aws_s3_upload_resume_token_options::num_parts_completed"] [:: std :: mem :: offset_of ! (aws_s3_upload_resume_token_options , num_parts_completed) - 32usize] ; } ; impl Default for aws_s3_upload_resume_token_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 () } } } unsafe extern "C" { # [doc = " Create upload resume token from persisted data.\n Note: Data required for resume token varies per operation."] pub fn aws_s3_meta_request_resume_token_new_upload (allocator : * mut aws_allocator , options : * const aws_s3_upload_resume_token_options) -> * mut aws_s3_meta_request_resume_token ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_acquire (resume_token : * mut aws_s3_meta_request_resume_token) -> * mut aws_s3_meta_request_resume_token ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_release (resume_token : * mut aws_s3_meta_request_resume_token) -> * mut aws_s3_meta_request_resume_token ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_type (resume_token : * mut aws_s3_meta_request_resume_token) -> aws_s3_meta_request_type ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_part_size (resume_token : * mut aws_s3_meta_request_resume_token) -> u64 ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_total_num_parts (resume_token : * mut aws_s3_meta_request_resume_token) -> usize ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_num_parts_completed (resume_token : * mut aws_s3_meta_request_resume_token) -> usize ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_upload_id (resume_token : * mut aws_s3_meta_request_resume_token) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Add a reference, keeping this object alive.\n The reference must be released when you are done with it, or it's memory will never be cleaned up.\n You must not pass in NULL.\n Always returns the same pointer that was passed in."] pub fn aws_s3_meta_request_acquire (meta_request : * mut aws_s3_meta_request) -> * mut aws_s3_meta_request ; } unsafe extern "C" { # [doc = " Release a reference.\n When the reference count drops to 0, this object will be cleaned up.\n It's OK to pass in NULL (nothing happens).\n Always returns NULL."] pub fn aws_s3_meta_request_release (meta_request : * mut aws_s3_meta_request) -> * mut aws_s3_meta_request ; } unsafe extern "C" { # [doc = " Initialize the configuration for a default S3 signing."] pub fn aws_s3_init_default_signing_config (signing_config : * mut aws_signing_config_aws , region : aws_byte_cursor , credentials_provider : * mut aws_credentials_provider) ; } unsafe extern "C" { # [doc = " Return operation name for aws_s3_request_type,\n or empty string if the type doesn't map to an actual operation.\n For example:\n AWS_S3_REQUEST_TYPE_HEAD_OBJECT -> \"HeadObject\"\n AWS_S3_REQUEST_TYPE_UNKNOWN -> \"\"\n AWS_S3_REQUEST_TYPE_MAX -> \"\""] pub fn aws_s3_request_type_operation_name (type_ : aws_s3_request_type) -> * const :: libc :: c_char ; } unsafe extern "C" { # [doc = " Add a reference, keeping this object alive.\n The reference must be released when you are done with it, or it's memory will never be cleaned up.\n Always returns the same pointer that was passed in."] pub fn aws_s3_request_metrics_acquire (metrics : * mut aws_s3_request_metrics) -> * mut aws_s3_request_metrics ; } unsafe extern "C" { # [doc = " Release a reference.\n When the reference count drops to 0, this object will be cleaned up.\n It's OK to pass in NULL (nothing happens).\n Always returns NULL."] pub fn aws_s3_request_metrics_release (metrics : * mut aws_s3_request_metrics) -> * mut aws_s3_request_metrics ; } unsafe extern "C" { # [doc = "  Getters for s3 request metrics ************************************************/\n/**\n Get the request ID from aws_s3_request_metrics.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_request_id will be set to a string. Be warned this string's lifetime is tied to the metrics\n object."] pub fn aws_s3_request_metrics_get_request_id (metrics : * const aws_s3_request_metrics , out_request_id : * mut * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the extended request ID from aws_s3_request_metrics.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_extended_request_id will be set to a string. Be warned this string's lifetime is tied to the\n metrics object."] pub fn aws_s3_request_metrics_get_extended_request_id (metrics : * const aws_s3_request_metrics , out_extended_request_id : * mut * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_start_time : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_end_time : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_total_duration_ns (metrics : * const aws_s3_request_metrics , out_total_duration : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_send_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_send_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_send_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_send_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_sending_duration_ns (metrics : * const aws_s3_request_metrics , out_sending_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_receive_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_receive_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_receive_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_receive_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_sign_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_signing_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_sign_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_signing_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_signing_duration_ns (metrics : * const aws_s3_request_metrics , out_signing_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_mem_acquire_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_mem_acquire_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_mem_acquire_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_mem_acquire_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_mem_acquire_duration_ns (metrics : * const aws_s3_request_metrics , out_mem_acquire_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_delivery_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_delivery_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_delivery_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_delivery_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_delivery_duration_ns (metrics : * const aws_s3_request_metrics , out_delivery_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_receiving_duration_ns (metrics : * const aws_s3_request_metrics , out_receiving_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_response_status_code (metrics : * const aws_s3_request_metrics , out_response_status : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_response_headers (metrics : * const aws_s3_request_metrics , out_response_headers : * mut * mut aws_http_headers) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the path and query of the request.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_request_path_query will be set to a string. Be warned this string's lifetime is tied to the metrics\n object."] pub fn aws_s3_request_metrics_get_request_path_query (metrics : * const aws_s3_request_metrics , out_request_path_query : * mut * const aws_string) ; } unsafe extern "C" { # [doc = " Get the host_address of the request.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_host_address will be set to a string. Be warned this string's lifetime is tied to the metrics\n object."] pub fn aws_s3_request_metrics_get_host_address (metrics : * const aws_s3_request_metrics , out_host_address : * mut * const aws_string) ; } unsafe extern "C" { # [doc = " Get the IP address of the request connected to.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_ip_address will be set to a string. Be warned this string's lifetime is tied to the metrics object."] pub fn aws_s3_request_metrics_get_ip_address (metrics : * const aws_s3_request_metrics , out_ip_address : * mut * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_connection_id (metrics : * const aws_s3_request_metrics , out_connection_ptr : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_request_ptr (metrics : * const aws_s3_request_metrics , out_request_ptr : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_thread_id (metrics : * const aws_s3_request_metrics , out_thread_id : * mut aws_thread_id_t) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_request_stream_id (metrics : * const aws_s3_request_metrics , out_stream_id : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the S3 operation name of the request (e.g. \"HeadObject\").\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_operation_name will be set to a string.\n Be warned this string's lifetime is tied to the metrics object."] pub fn aws_s3_request_metrics_get_operation_name (metrics : * const aws_s3_request_metrics , out_operation_name : * mut * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_request_type (metrics : * const aws_s3_request_metrics , out_request_type : * mut aws_s3_request_type) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_error_code (metrics : * const aws_s3_request_metrics) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_retry_attempt (metrics : * const aws_s3_request_metrics) -> u32 ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_memory_allocated_from_pool (metrics : * const aws_s3_request_metrics) -> bool ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_part_range_start (metrics : * const aws_s3_request_metrics , out_part_range_start : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_part_range_end (metrics : * const aws_s3_request_metrics , out_part_range_end : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_part_number (metrics : * const aws_s3_request_metrics , out_part_number : * mut u32) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_s3_request_first_attempt_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_s3_request_first_attempt_start_time : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_s3_request_last_attempt_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_s3_request_last_attempt_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_s3_request_total_duration_ns (metrics : * const aws_s3_request_metrics , out_request_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_conn_acquire_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_conn_acquire_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_conn_acquire_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_conn_acquire_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_conn_acquire_duration_ns (metrics : * const aws_s3_request_metrics , out_conn_acquire_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_retry_delay_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_retry_delay_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_retry_delay_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_retry_delay_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_retry_delay_duration_ns (metrics : * const aws_s3_request_metrics , out_retry_delay_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_service_call_duration_ns (metrics : * const aws_s3_request_metrics , out_service_call_duration : * mut u64) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_request_context { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_rule_engine { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " Creates a new S3 endpoint resolver.\n Warning: Before using this header, you have to enable it by\n setting cmake config AWS_ENABLE_S3_ENDPOINT_RESOLVER=ON"] pub fn aws_s3_endpoint_resolver_new (allocator : * mut aws_allocator) -> * mut aws_endpoints_rule_engine ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_ruleset { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_partitions_config { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_parameter { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_resolved_endpoint { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_endpoints_parameter_type { AWS_ENDPOINTS_PARAMETER_STRING = 0 , AWS_ENDPOINTS_PARAMETER_BOOLEAN = 1 , AWS_ENDPOINTS_PARAMETER_STRING_ARRAY = 2 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_endpoints_resolved_endpoint_type { AWS_ENDPOINTS_RESOLVED_ENDPOINT = 0 , AWS_ENDPOINTS_RESOLVED_ERROR = 1 , } unsafe extern "C" { pub fn aws_endpoints_get_supported_ruleset_version () -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Warning: The following helpers are intended for use by SDKs that validate correctness of the ruleset at compile time.\n The engine sanity checks the provided ruleset, but does not do extensive checking.\n Some malformed rulesets might fail in unexpected ways."] pub fn aws_endpoints_parameter_get_type (parameter : * const aws_endpoints_parameter) -> aws_endpoints_parameter_type ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_built_in (parameter : * const aws_endpoints_parameter) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_default_string (parameter : * const aws_endpoints_parameter , out_cursor : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_default_boolean (parameter : * const aws_endpoints_parameter , out_bool : * mut * const bool) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_is_required (parameter : * const aws_endpoints_parameter) -> bool ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_documentation (parameter : * const aws_endpoints_parameter) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_parameters_get_is_deprecated (parameter : * const aws_endpoints_parameter) -> bool ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_deprecated_message (parameter : * const aws_endpoints_parameter) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_deprecated_since (parameter : * const aws_endpoints_parameter) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_new_from_string (allocator : * mut aws_allocator , ruleset_json : aws_byte_cursor) -> * mut aws_endpoints_ruleset ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_acquire (ruleset : * mut aws_endpoints_ruleset) -> * mut aws_endpoints_ruleset ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_release (ruleset : * mut aws_endpoints_ruleset) -> * mut aws_endpoints_ruleset ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_get_parameters (ruleset : * mut aws_endpoints_ruleset) -> * const aws_hash_table ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_get_version (ruleset : * const aws_endpoints_ruleset) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_get_service_id (ruleset : * const aws_endpoints_ruleset) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Create new rule engine for a given ruleset.\n In cases of failure NULL is returned and last error is set."] pub fn aws_endpoints_rule_engine_new (allocator : * mut aws_allocator , ruleset : * mut aws_endpoints_ruleset , partitions_config : * mut aws_partitions_config) -> * mut aws_endpoints_rule_engine ; } unsafe extern "C" { pub fn aws_endpoints_rule_engine_acquire (rule_engine : * mut aws_endpoints_rule_engine) -> * mut aws_endpoints_rule_engine ; } unsafe extern "C" { pub fn aws_endpoints_rule_engine_release (rule_engine : * mut aws_endpoints_rule_engine) -> * mut aws_endpoints_rule_engine ; } unsafe extern "C" { pub fn aws_endpoints_request_context_new (allocator : * mut aws_allocator) -> * mut aws_endpoints_request_context ; } unsafe extern "C" { pub fn aws_endpoints_request_context_acquire (request_context : * mut aws_endpoints_request_context) -> * mut aws_endpoints_request_context ; } unsafe extern "C" { pub fn aws_endpoints_request_context_release (request_context : * mut aws_endpoints_request_context) -> * mut aws_endpoints_request_context ; } unsafe extern "C" { pub fn aws_endpoints_request_context_add_string (allocator : * mut aws_allocator , context : * mut aws_endpoints_request_context , name : aws_byte_cursor , value : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_request_context_add_boolean (allocator : * mut aws_allocator , context : * mut aws_endpoints_request_context , name : aws_byte_cursor , value : bool) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_request_context_add_string_array (allocator : * mut aws_allocator , context : * mut aws_endpoints_request_context , name : aws_byte_cursor , value_array : * const aws_byte_cursor , len : usize) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_rule_engine_resolve (engine : * mut aws_endpoints_rule_engine , context : * const aws_endpoints_request_context , out_resolved_endpoint : * mut * mut aws_endpoints_resolved_endpoint) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_acquire (resolved_endpoint : * mut aws_endpoints_resolved_endpoint) -> * mut aws_endpoints_resolved_endpoint ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_release (resolved_endpoint : * mut aws_endpoints_resolved_endpoint) -> * mut aws_endpoints_resolved_endpoint ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_type (resolved_endpoint : * const aws_endpoints_resolved_endpoint) -> aws_endpoints_resolved_endpoint_type ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_url (resolved_endpoint : * const aws_endpoints_resolved_endpoint , out_url : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_properties (resolved_endpoint : * const aws_endpoints_resolved_endpoint , out_properties : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_headers (resolved_endpoint : * const aws_endpoints_resolved_endpoint , out_headers : * mut * const aws_hash_table) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_error (resolved_endpoint : * const aws_endpoints_resolved_endpoint , out_error : * mut aws_byte_cursor) -> :: libc :: c_int ; } pub const AWS_COMMON_HASH_TABLE_ITER_CONTINUE : _bindgen_ty_23 = _bindgen_ty_23 :: AWS_COMMON_HASH_TABLE_ITER_CONTINUE ; pub const AWS_COMMON_HASH_TABLE_ITER_DELETE : _bindgen_ty_23 = _bindgen_ty_23 :: AWS_COMMON_HASH_TABLE_ITER_DELETE ; pub const AWS_COMMON_HASH_TABLE_ITER_ERROR : _bindgen_ty_23 = _bindgen_ty_23 :: AWS_COMMON_HASH_TABLE_ITER_ERROR ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_23 { AWS_COMMON_HASH_TABLE_ITER_CONTINUE = 1 , AWS_COMMON_HASH_TABLE_ITER_DELETE = 2 , AWS_COMMON_HASH_TABLE_ITER_ERROR = 4 , } # [doc = " Hash table data structure. This module provides an automatically resizing\n hash table implementation for general purpose use. The hash table stores a\n mapping between void * keys and values; it is expected that in most cases,\n these will point to a structure elsewhere in the heap, instead of inlining a\n key or value into the hash table element itself.\n\n Currently, this hash table implements a variant of robin hood hashing, but\n we do not guarantee that this won't change in the future.\n\n Associated with each hash function are four callbacks:\n\n   hash_fn - A hash function from the keys to a uint64_t. It is critical that\n      the hash function for a key does not change while the key is in the hash\n      table; violating this results in undefined behavior. Collisions are\n      tolerated, though naturally with reduced performance.\n\n   equals_fn - An equality comparison function. This function must be\n      reflexive and consistent with hash_fn.\n\n   destroy_key_fn, destroy_value_fn - Optional callbacks invoked when the\n      table is cleared or cleaned up and at the caller's option when an element\n      is removed from the table. Either or both may be set to NULL, which\n      has the same effect as a no-op destroy function.\n\n This datastructure can be safely moved between threads, subject to the\n requirements of the underlying allocator. It is also safe to invoke\n non-mutating operations on the hash table from multiple threads. A suitable\n memory barrier must be used when transitioning from single-threaded mutating\n usage to multithreaded usage."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct hash_table_state { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_hash_table { pub p_impl : * mut hash_table_state , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash_table"] [:: std :: mem :: size_of :: < aws_hash_table > () - 8usize] ; ["Alignment of aws_hash_table"] [:: std :: mem :: align_of :: < aws_hash_table > () - 8usize] ; ["Offset of field: aws_hash_table::p_impl"] [:: std :: mem :: offset_of ! (aws_hash_table , p_impl) - 0usize] ; } ; 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\n table may provide pointers to elements stored within the hash table;\n generally, calling code may alter value, but must not alter key (or any\n information used to compute key's hash code).\n\n Pointers to elements within the hash are invalidated whenever an operation\n which may change the number of elements in the hash is invoked (i.e. put,\n delete, clear, and clean_up), regardless of whether the number of elements\n actually changes."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_hash_element { pub key : * const :: libc :: c_void , pub value : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash_element"] [:: std :: mem :: size_of :: < aws_hash_element > () - 16usize] ; ["Alignment of aws_hash_element"] [:: std :: mem :: align_of :: < aws_hash_element > () - 8usize] ; ["Offset of field: aws_hash_element::key"] [:: std :: mem :: offset_of ! (aws_hash_element , key) - 0usize] ; ["Offset of field: aws_hash_element::value"] [:: std :: mem :: offset_of ! (aws_hash_element , value) - 8usize] ; } ; 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 () } } } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_hash_iter_status { AWS_HASH_ITER_STATUS_DONE = 0 , AWS_HASH_ITER_STATUS_DELETE_CALLED = 1 , AWS_HASH_ITER_STATUS_READY_FOR_USE = 2 , } # [repr (C)] # [derive (Debug , Copy , Clone)] 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 : :: libc :: c_int , pub unused_1 : * mut :: libc :: c_void , pub unused_2 : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash_iter"] [:: std :: mem :: size_of :: < aws_hash_iter > () - 64usize] ; ["Alignment of aws_hash_iter"] [:: std :: mem :: align_of :: < aws_hash_iter > () - 8usize] ; ["Offset of field: aws_hash_iter::map"] [:: std :: mem :: offset_of ! (aws_hash_iter , map) - 0usize] ; ["Offset of field: aws_hash_iter::element"] [:: std :: mem :: offset_of ! (aws_hash_iter , element) - 8usize] ; ["Offset of field: aws_hash_iter::slot"] [:: std :: mem :: offset_of ! (aws_hash_iter , slot) - 24usize] ; ["Offset of field: aws_hash_iter::limit"] [:: std :: mem :: offset_of ! (aws_hash_iter , limit) - 32usize] ; ["Offset of field: aws_hash_iter::status"] [:: std :: mem :: offset_of ! (aws_hash_iter , status) - 40usize] ; ["Offset of field: aws_hash_iter::unused_0"] [:: std :: mem :: offset_of ! (aws_hash_iter , unused_0) - 44usize] ; ["Offset of field: aws_hash_iter::unused_1"] [:: std :: mem :: offset_of ! (aws_hash_iter , unused_1) - 48usize] ; ["Offset of field: aws_hash_iter::unused_2"] [:: std :: mem :: offset_of ! (aws_hash_iter , unused_2) - 56usize] ; } ; 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 :: libc :: c_void) -> u64 > ; # [doc = " Prototype for a hash table equality check function pointer.\n\n This type is usually used for a function that compares two hash table\n keys, but note that the same type is used for a function that compares\n two hash table values in aws_hash_table_eq.\n\n Equality functions used in a hash table must be be reflexive (a == a),\n symmetric (a == b => b == a), transitive (a == b, b == c => a == c)\n and consistent (result does not change with time)."] pub type aws_hash_callback_eq_fn = :: std :: option :: Option < unsafe extern "C" fn (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool > ; # [doc = " Prototype for a hash table key or value destructor function pointer.\n\n This function is used to destroy elements in the hash table when the\n table is cleared or cleaned up.\n\n Note that functions which remove individual elements from the hash\n table provide options of whether or not to invoke the destructors\n 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 :: libc :: c_void) > ; unsafe extern "C" { # [doc = " Initializes a hash map with initial capacity for 'size' elements\n without resizing. Uses hash_fn to compute the hash of each element.\n equals_fn to compute equality of two keys.  Whenever an element is\n removed without being returned, destroy_key_fn is run on the pointer\n to the key and destroy_value_fn is run on the pointer to the value.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Deletes every element from map and frees all associated memory.\n destroy_fn will be called for each element.  aws_hash_table_init\n must be called before reusing the hash table.\n\n This method is idempotent."] pub fn aws_hash_table_clean_up (map : * mut aws_hash_table) ; } unsafe extern "C" { # [doc = " Safely swaps two hash tables. Note that we swap the entirety of the hash\n table, including which allocator is associated.\n\n Neither hash table is required to be initialized; if one or both is\n uninitialized, then the uninitialized state is also swapped."] pub fn aws_hash_table_swap (a : * mut aws_hash_table , b : * mut aws_hash_table) ; } unsafe extern "C" { # [doc = " Moves the hash table in 'from' to 'to'. After this move, 'from' will\n be identical to the state of the original 'to' hash table, and 'to'\n will be in the same state as if it had been passed to aws_hash_table_clean_up\n (that is, it will have no memory allocated, and it will be safe to\n either discard it or call aws_hash_table_clean_up again).\n\n Note that 'to' will not be cleaned up. You should make sure that 'to'\n is either uninitialized or cleaned up before moving a hashtable into\n it."] pub fn aws_hash_table_move (to : * mut aws_hash_table , from : * mut aws_hash_table) ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Returns an iterator to be used for iterating through a hash table.\n Iterator will already point to the first element of the table it finds,\n which can be accessed as iter.element.\n\n This function cannot fail, but if there are no elements in the table,\n 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 ; } unsafe extern "C" { # [doc = " Returns true if iterator is done iterating through table, false otherwise.\n 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 ; } unsafe extern "C" { # [doc = " Updates iterator so that it points to next element of hash table.\n\n This and the two previous functions are designed to be used together with\n the following idiom:\n\n for (struct aws_hash_iter iter = aws_hash_iter_begin(&map);\n      !aws_hash_iter_done(&iter); aws_hash_iter_next(&iter)) {\n     const key_type key = *(const key_type *)iter.element.key;\n     value_type value = *(value_type *)iter.element.value;\n     // etc.\n }\n\n Note that calling this on an iter which is \"done\" is idempotent:\n i.e. it will return another iter which is \"done\"."] pub fn aws_hash_iter_next (iter : * mut aws_hash_iter) ; } unsafe extern "C" { # [doc = " Deletes the element currently pointed-to by the hash iterator.\n After calling this method, the element member of the iterator\n should not be accessed until the next call to aws_hash_iter_next.\n\n @param destroy_contents If true, the destructors for the key and value\n  will be called."] pub fn aws_hash_iter_delete (iter : * mut aws_hash_iter , destroy_contents : bool) ; } unsafe extern "C" { # [doc = " Attempts to locate an element at key.  If the element is found, a\n pointer to the value is placed in *p_elem; if it is not found,\n *pElem is set to NULL. Either way, AWS_OP_SUCCESS is returned.\n\n This method does not change the state of the hash table. Therefore, it\n is safe to call _find from multiple threads on the same hash table,\n provided no mutating operations happen in parallel.\n\n Calling code may update the value in the hash table by modifying **pElem\n after a successful find. However, this pointer is not guaranteed to\n remain usable after a subsequent call to _put, _delete, _clear, or\n _clean_up."] pub fn aws_hash_table_find (map : * const aws_hash_table , key : * const :: libc :: c_void , p_elem : * mut * mut aws_hash_element) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Attempts to locate an element at key. If no such element was found,\n creates a new element, with value initialized to NULL. In either case, a\n pointer to the element is placed in *p_elem.\n\n If was_created is non-NULL, *was_created is set to 0 if an existing\n element was found, or 1 is a new element was created.\n\n Returns AWS_OP_SUCCESS if an item was found or created.\n Raises AWS_ERROR_OOM if hash table expansion was required and memory\n allocation failed."] pub fn aws_hash_table_create (map : * mut aws_hash_table , key : * const :: libc :: c_void , p_elem : * mut * mut aws_hash_element , was_created : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Inserts a new element at key, with the given value. If another element\n exists at that key, the old element will be overwritten; both old key and\n value objects will be destroyed.\n\n If was_created is non-NULL, *was_created is set to 0 if an existing\n element was found, or 1 is a new element was created.\n\n Returns AWS_OP_SUCCESS if an item was found or created.\n Raises AWS_ERROR_OOM if hash table expansion was required and memory\n allocation failed."] pub fn aws_hash_table_put (map : * mut aws_hash_table , key : * const :: libc :: c_void , value : * mut :: libc :: c_void , was_created : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes element at key. Always returns AWS_OP_SUCCESS.\n\n If pValue is non-NULL, the existing value (if any) is moved into\n (*value) before removing from the table, and destroy_fn is _not_\n invoked. If pValue is NULL, then (if the element existed) destroy_fn\n will be invoked on the element being removed.\n\n If was_present is non-NULL, it is set to 0 if the element was\n 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 :: libc :: c_void , p_value : * mut aws_hash_element , was_present : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes element already known (typically by find()).\n\n p_value should point to a valid element returned by create() or find().\n\n NOTE: DO NOT call this method from inside of a aws_hash_table_foreach callback, return\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Iterates through every element in the map and invokes the callback on\n that item. Iteration is performed in an arbitrary, implementation-defined\n order, and is not guaranteed to be consistent across invocations.\n\n The callback may change the value associated with the key by overwriting\n the value pointed-to by value. In this case, the on_element_removed\n callback will not be invoked, unless the callback invokes\n AWS_COMMON_HASH_TABLE_ITER_DELETE (in which case the on_element_removed\n is given the updated value).\n\n The callback must return a bitmask of zero or more of the following values\n ORed together:\n\n # AWS_COMMON_HASH_TABLE_ITER_CONTINUE - Continues iteration to the next\n     element (if not set, iteration stops)\n # AWS_COMMON_HASH_TABLE_ITER_DELETE   - Deletes the current value and\n     continues iteration.  destroy_fn will NOT be invoked.\n # AWS_COMMON_HASH_TABLE_ITER_ERROR   - Stop iteration with error.\n     No action will be taken for the current value and the value before this.\n     No rolling back. The deleted value before will NOT be back.\n     aws_hash_table_foreach returns AWS_OP_ERR after stropping the iteration.\n\n Invoking any method which may change the contents of the hashtable\n during iteration results in undefined behavior. However, you may safely\n invoke non-mutating operations during an iteration.\n\n This operation is mutating only if AWS_COMMON_HASH_TABLE_ITER_DELETE\n is returned at some point during iteration. Otherwise, it is non-mutating\n 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 :: libc :: c_void , p_element : * mut aws_hash_element) -> :: libc :: c_int > , context : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Compares two hash tables for equality. Both hash tables must have equivalent\n key comparators; values will be compared using the comparator passed into this\n function. The key hash function does not need to be equivalent between the\n 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 ; } unsafe extern "C" { # [doc = " Removes every element from the hash map. destroy_fn will be called for\n each element."] pub fn aws_hash_table_clear (map : * mut aws_hash_table) ; } unsafe extern "C" { # [doc = " Convenience hash function for NULL-terminated C-strings"] pub fn aws_hash_c_string (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Convenience hash function for struct aws_strings.\n Hash is same as used on the string bytes by aws_hash_c_string."] pub fn aws_hash_string (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Convenience hash function for struct aws_byte_cursor.\n Hash is same as used on the string bytes by aws_hash_c_string."] pub fn aws_hash_byte_cursor_ptr (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Convenience hash function which hashes the pointer value directly,\n without dereferencing.  This can be used in cases where pointer identity\n is desired, or where a uintptr_t is encoded into a const void *."] pub fn aws_hash_ptr (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { pub fn aws_hash_combine (item1 : u64 , item2 : u64) -> u64 ; } unsafe extern "C" { # [doc = " Convenience eq callback for NULL-terminated C-strings"] pub fn aws_hash_callback_c_str_eq (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " Convenience eq callback for AWS strings"] pub fn aws_hash_callback_string_eq (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " Convenience destroy callback for AWS strings"] pub fn aws_hash_callback_string_destroy (a : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Equality function which compares pointer equality."] pub fn aws_ptr_eq (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Helper function to hash keys that are uint64_t values.\n\n The function is not a strong hash function in any sense; it merely reflects\n the uint64 value back.  Do not use this function as a hash if you need\n the properties of a strong hash function."] pub fn aws_hash_uint64_t_by_identity (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Helper function to compare hash keys that are uint64_t values."] pub fn aws_hash_compare_uint64_t_eq (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool ; } # [repr (C)] pub struct aws_mutex { pub mutex_handle : pthread_mutex_t , pub initialized : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_mutex"] [:: std :: mem :: size_of :: < aws_mutex > () - 48usize] ; ["Alignment of aws_mutex"] [:: std :: mem :: align_of :: < aws_mutex > () - 8usize] ; ["Offset of field: aws_mutex::mutex_handle"] [:: std :: mem :: offset_of ! (aws_mutex , mutex_handle) - 0usize] ; ["Offset of field: aws_mutex::initialized"] [:: std :: mem :: offset_of ! (aws_mutex , initialized) - 40usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Initializes a new platform instance of mutex."] pub fn aws_mutex_init (mutex : * mut aws_mutex) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Cleans up internal resources."] pub fn aws_mutex_clean_up (mutex : * mut aws_mutex) ; } unsafe extern "C" { # [doc = " Blocks until it acquires the lock. While on some platforms such as Windows,\n this may behave as a reentrant mutex, you should not treat it like one. On\n platforms it is possible for it to be non-reentrant, it will be."] pub fn aws_mutex_lock (mutex : * mut aws_mutex) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Attempts to acquire the lock but returns immediately if it can not.\n While on some platforms such as Windows, this may behave as a reentrant mutex,\n you should not treat it like one. On platforms it is possible for it to be non-reentrant, it will be.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Releases the lock."] pub fn aws_mutex_unlock (mutex : * mut aws_mutex) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_connection_finish_code { AWS_S3_CONNECTION_FINISH_CODE_SUCCESS = 0 , AWS_S3_CONNECTION_FINISH_CODE_FAILED = 1 , AWS_S3_CONNECTION_FINISH_CODE_RETRY = 2 , } pub type aws_s3_endpoint_shutdown_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_endpoint_options { pub host_name : * mut aws_string , pub shutdown_callback : aws_s3_endpoint_shutdown_fn , pub client_bootstrap : * mut aws_client_bootstrap , pub tls_connection_options : * const aws_tls_connection_options , pub dns_host_address_ttl_seconds : usize , pub client : * mut aws_s3_client , pub max_connections : u32 , pub port : u32 , # [doc = " Optional.\n Proxy configuration for http connection."] pub proxy_config : * mut aws_http_proxy_config , # [doc = " Optional.\n Configuration for fetching proxy configuration from environment.\n By Default proxy_ev_settings.aws_http_proxy_env_var_type is set to AWS_HPEV_ENABLE which means read proxy\n configuration from environment.\n Only works when proxy_config is not set. If both are set, configuration from proxy_config is used."] pub proxy_ev_settings : * mut proxy_env_var_settings , # [doc = " Optional.\n If set to 0, default value is used."] pub connect_timeout_ms : u32 , # [doc = " Optional.\n Set keepalive to periodically transmit messages for detecting a disconnected peer."] pub tcp_keep_alive_options : * mut aws_s3_tcp_keep_alive_options , # [doc = " Optional.\n Configuration options for connection monitoring.\n If the transfer speed falls below the specified minimum_throughput_bytes_per_second, the operation is aborted."] pub monitoring_options : * mut aws_http_connection_monitoring_options , pub network_interface_names_array : * const aws_byte_cursor , pub num_network_interface_names : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_endpoint_options"] [:: std :: mem :: size_of :: < aws_s3_endpoint_options > () - 112usize] ; ["Alignment of aws_s3_endpoint_options"] [:: std :: mem :: align_of :: < aws_s3_endpoint_options > () - 8usize] ; ["Offset of field: aws_s3_endpoint_options::host_name"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , host_name) - 0usize] ; ["Offset of field: aws_s3_endpoint_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , shutdown_callback) - 8usize] ; ["Offset of field: aws_s3_endpoint_options::client_bootstrap"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , client_bootstrap) - 16usize] ; ["Offset of field: aws_s3_endpoint_options::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , tls_connection_options) - 24usize] ; ["Offset of field: aws_s3_endpoint_options::dns_host_address_ttl_seconds"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , dns_host_address_ttl_seconds) - 32usize] ; ["Offset of field: aws_s3_endpoint_options::client"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , client) - 40usize] ; ["Offset of field: aws_s3_endpoint_options::max_connections"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , max_connections) - 48usize] ; ["Offset of field: aws_s3_endpoint_options::port"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , port) - 52usize] ; ["Offset of field: aws_s3_endpoint_options::proxy_config"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , proxy_config) - 56usize] ; ["Offset of field: aws_s3_endpoint_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , proxy_ev_settings) - 64usize] ; ["Offset of field: aws_s3_endpoint_options::connect_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , connect_timeout_ms) - 72usize] ; ["Offset of field: aws_s3_endpoint_options::tcp_keep_alive_options"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , tcp_keep_alive_options) - 80usize] ; ["Offset of field: aws_s3_endpoint_options::monitoring_options"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , monitoring_options) - 88usize] ; ["Offset of field: aws_s3_endpoint_options::network_interface_names_array"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , network_interface_names_array) - 96usize] ; ["Offset of field: aws_s3_endpoint_options::num_network_interface_names"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , num_network_interface_names) - 104usize] ; } ; impl Default for aws_s3_endpoint_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 , Default , Copy , Clone)] pub struct aws_s3_endpoint_system_vtable { pub acquire : :: std :: option :: Option < unsafe extern "C" fn (endpoint : * mut aws_s3_endpoint , already_holding_lock : bool) > , pub release : :: std :: option :: Option < unsafe extern "C" fn (endpoint : * mut aws_s3_endpoint) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_endpoint_system_vtable"] [:: std :: mem :: size_of :: < aws_s3_endpoint_system_vtable > () - 16usize] ; ["Alignment of aws_s3_endpoint_system_vtable"] [:: std :: mem :: align_of :: < aws_s3_endpoint_system_vtable > () - 8usize] ; ["Offset of field: aws_s3_endpoint_system_vtable::acquire"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_system_vtable , acquire) - 0usize] ; ["Offset of field: aws_s3_endpoint_system_vtable::release"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_system_vtable , release) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_endpoint { pub client_synced_data : aws_s3_endpoint__bindgen_ty_1 , pub allocator : * mut aws_allocator , pub host_name : * mut aws_string , pub http_connection_manager : * mut aws_http_connection_manager , pub client : * mut aws_s3_client , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_endpoint__bindgen_ty_1 { pub ref_count : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_endpoint__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_endpoint__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_s3_endpoint__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_endpoint__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_endpoint__bindgen_ty_1::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_endpoint__bindgen_ty_1 , ref_count) - 0usize] ; } ; # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_endpoint"] [:: std :: mem :: size_of :: < aws_s3_endpoint > () - 40usize] ; ["Alignment of aws_s3_endpoint"] [:: std :: mem :: align_of :: < aws_s3_endpoint > () - 8usize] ; ["Offset of field: aws_s3_endpoint::client_synced_data"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , client_synced_data) - 0usize] ; ["Offset of field: aws_s3_endpoint::allocator"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , allocator) - 8usize] ; ["Offset of field: aws_s3_endpoint::host_name"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , host_name) - 16usize] ; ["Offset of field: aws_s3_endpoint::http_connection_manager"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , http_connection_manager) - 24usize] ; ["Offset of field: aws_s3_endpoint::client"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , client) - 32usize] ; } ; impl Default for aws_s3_endpoint { 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)] pub struct aws_s3_connection { pub endpoint : * mut aws_s3_endpoint , pub http_connection : * mut aws_http_connection , pub request : * mut aws_s3_request , pub retry_token : * mut aws_retry_token , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_connection"] [:: std :: mem :: size_of :: < aws_s3_connection > () - 32usize] ; ["Alignment of aws_s3_connection"] [:: std :: mem :: align_of :: < aws_s3_connection > () - 8usize] ; ["Offset of field: aws_s3_connection::endpoint"] [:: std :: mem :: offset_of ! (aws_s3_connection , endpoint) - 0usize] ; ["Offset of field: aws_s3_connection::http_connection"] [:: std :: mem :: offset_of ! (aws_s3_connection , http_connection) - 8usize] ; ["Offset of field: aws_s3_connection::request"] [:: std :: mem :: offset_of ! (aws_s3_connection , request) - 16usize] ; ["Offset of field: aws_s3_connection::retry_token"] [:: std :: mem :: offset_of ! (aws_s3_connection , retry_token) - 24usize] ; } ; impl Default for aws_s3_connection { 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)] pub struct aws_s3_client_vtable { pub meta_request_factory : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client , options : * const aws_s3_meta_request_options) -> * mut aws_s3_meta_request > , pub create_connection_for_request : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client , request : * mut aws_s3_request) > , pub acquire_http_connection : :: std :: option :: Option < unsafe extern "C" fn (conn_manager : * mut aws_http_connection_manager , on_connection_acquired_callback : aws_http_connection_manager_on_connection_setup_fn , user_data : * mut :: libc :: c_void) > , pub get_host_address_count : :: std :: option :: Option < unsafe extern "C" fn (host_resolver : * mut aws_host_resolver , host_name : * const aws_string , flags : u32) -> usize > , pub schedule_process_work_synced : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client) > , pub process_work : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client) > , pub endpoint_shutdown_callback : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client) > , pub finish_destroy : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client) > , pub parallel_input_stream_new_from_file : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , file_name : aws_byte_cursor , reading_elg : * mut aws_event_loop_group , direct_io_read : bool) -> * mut aws_parallel_input_stream > , pub http_connection_make_request : :: std :: option :: Option < unsafe extern "C" fn (client_connection : * mut aws_http_connection , options : * const aws_http_make_request_options) -> * mut aws_http_stream > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client_vtable"] [:: std :: mem :: size_of :: < aws_s3_client_vtable > () - 80usize] ; ["Alignment of aws_s3_client_vtable"] [:: std :: mem :: align_of :: < aws_s3_client_vtable > () - 8usize] ; ["Offset of field: aws_s3_client_vtable::meta_request_factory"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , meta_request_factory) - 0usize] ; ["Offset of field: aws_s3_client_vtable::create_connection_for_request"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , create_connection_for_request) - 8usize] ; ["Offset of field: aws_s3_client_vtable::acquire_http_connection"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , acquire_http_connection) - 16usize] ; ["Offset of field: aws_s3_client_vtable::get_host_address_count"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , get_host_address_count) - 24usize] ; ["Offset of field: aws_s3_client_vtable::schedule_process_work_synced"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , schedule_process_work_synced) - 32usize] ; ["Offset of field: aws_s3_client_vtable::process_work"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , process_work) - 40usize] ; ["Offset of field: aws_s3_client_vtable::endpoint_shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , endpoint_shutdown_callback) - 48usize] ; ["Offset of field: aws_s3_client_vtable::finish_destroy"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , finish_destroy) - 56usize] ; ["Offset of field: aws_s3_client_vtable::parallel_input_stream_new_from_file"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , parallel_input_stream_new_from_file) - 64usize] ; ["Offset of field: aws_s3_client_vtable::http_connection_make_request"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , http_connection_make_request) - 72usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_part_timeout_stats { pub stop_timeout : bool , pub num_successful_upload_requests : u64 , pub initial_request_time : aws_s3_upload_part_timeout_stats__bindgen_ty_1 , pub timeout_rate_tracking : aws_s3_upload_part_timeout_stats__bindgen_ty_2 , pub response_to_first_byte_time : aws_s3_upload_part_timeout_stats__bindgen_ty_3 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_part_timeout_stats__bindgen_ty_1 { pub sum_ns : u64 , pub num_samples : u64 , pub collecting_p90 : bool , pub p90_samples : aws_priority_queue , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_timeout_stats__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_1 > () - 112usize] ; ["Alignment of aws_s3_upload_part_timeout_stats__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_1::sum_ns"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_1 , sum_ns) - 0usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_1::num_samples"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_1 , num_samples) - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_1::collecting_p90"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_1 , collecting_p90) - 16usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_1::p90_samples"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_1 , p90_samples) - 24usize] ; } ; impl Default for aws_s3_upload_part_timeout_stats__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 () } } } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_upload_part_timeout_stats__bindgen_ty_2 { pub num_completed : u64 , pub num_failed : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_timeout_stats__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_2 > () - 16usize] ; ["Alignment of aws_s3_upload_part_timeout_stats__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_2::num_completed"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_2 , num_completed) - 0usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_2::num_failed"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_2 , num_failed) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_upload_part_timeout_stats__bindgen_ty_3 { pub sum_ns : u64 , pub num_samples : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_timeout_stats__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_3 > () - 16usize] ; ["Alignment of aws_s3_upload_part_timeout_stats__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_3::sum_ns"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_3 , sum_ns) - 0usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_3::num_samples"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_3 , num_samples) - 8usize] ; } ; # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_timeout_stats"] [:: std :: mem :: size_of :: < aws_s3_upload_part_timeout_stats > () - 160usize] ; ["Alignment of aws_s3_upload_part_timeout_stats"] [:: std :: mem :: align_of :: < aws_s3_upload_part_timeout_stats > () - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::stop_timeout"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , stop_timeout) - 0usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::num_successful_upload_requests"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , num_successful_upload_requests) - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::initial_request_time"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , initial_request_time) - 16usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::timeout_rate_tracking"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , timeout_rate_tracking) - 128usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::response_to_first_byte_time"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , response_to_first_byte_time) - 144usize] ; } ; impl Default for aws_s3_upload_part_timeout_stats { 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)] pub struct aws_s3_client { pub allocator : * mut aws_allocator , pub buffer_pool : * mut aws_s3_buffer_pool , pub vtable : * mut aws_s3_client_vtable , pub ref_count : aws_ref_count , pub client_bootstrap : * mut aws_client_bootstrap , pub process_work_event_loop : * mut aws_event_loop , pub body_streaming_elg : * mut aws_event_loop_group , pub region : * mut aws_string , pub part_size : usize , pub part_size_set : bool , pub max_part_size : u64 , pub optimal_range_size : u64 , pub fio_options_set : bool , pub fio_opts : aws_s3_file_io_options , pub multipart_upload_threshold : u64 , pub tls_connection_options : * mut aws_tls_connection_options , pub cached_signing_config : * mut aws_cached_signing_config_aws , pub s3express_provider_factory : aws_s3express_provider_factory_fn , pub factory_user_data : * mut :: libc :: c_void , pub s3express_provider : * mut aws_s3express_credentials_provider , pub throughput_target_gbps : f64 , pub ideal_connection_count : u32 , # [doc = " For multi-part upload, content-md5 will be calculated if the AWS_MR_CONTENT_MD5_ENABLED is specified\n     or initial request has content-md5 header.\n For single-part upload, if the content-md5 header is specified, it will remain unchanged. If the header is not\n     specified, and this is set to AWS_MR_CONTENT_MD5_ENABLED, it will be calculated."] pub compute_content_md5 : aws_s3_meta_request_compute_content_md5 , pub max_active_connections_override : u32 , pub max_allowed_connections : aws_atomic_var , pub retry_strategy : * mut aws_retry_strategy , # [doc = " Optional.\n Proxy configuration for http connection."] pub proxy_config : * mut aws_http_proxy_config , # [doc = " Optional.\n Configuration for fetching proxy configuration from environment.\n By Default proxy_ev_settings.aws_http_proxy_env_var_type is set to AWS_HPEV_ENABLE which means read proxy\n configuration from environment.\n Only works when proxy_config is not set. If both are set, configuration from proxy_config is used."] pub proxy_ev_settings : * mut proxy_env_var_settings , # [doc = " Optional.\n If set to 0, default value is used."] pub connect_timeout_ms : u32 , # [doc = " Optional.\n Set keepalive to periodically transmit messages for detecting a disconnected peer."] pub tcp_keep_alive_options : * mut aws_s3_tcp_keep_alive_options , # [doc = " Configuration options for connection monitoring.\n If the transfer speed falls below the specified minimum_throughput_bytes_per_second, the operation is aborted.\n If user passes in NULL, default values are used."] pub monitoring_options : aws_http_connection_monitoring_options , pub proxy_ev_tls_options : * mut aws_tls_connection_options , pub shutdown_callback : aws_s3_client_shutdown_complete_callback_fn , pub shutdown_callback_user_data : * mut :: libc :: c_void , pub enable_read_backpressure : bool , pub initial_read_window : usize , # [doc = " Timeout in ms for upload request for request after sending to the response first byte received."] pub upload_timeout_ms : aws_atomic_var , pub network_interface_names : aws_array_list , pub network_interface_names_cursor_array : * mut aws_byte_cursor , pub num_network_interface_names : usize , pub stats : aws_s3_client__bindgen_ty_1 , pub synced_data : aws_s3_client__bindgen_ty_2 , pub threaded_data : aws_s3_client__bindgen_ty_3 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_client__bindgen_ty_1 { pub num_requests_in_flight : aws_atomic_var , pub num_requests_network_io : [aws_atomic_var ; 4usize] , pub num_requests_stream_queued_waiting : aws_atomic_var , pub num_requests_streaming_response : aws_atomic_var , pub num_requests_streaming_request_body : aws_atomic_var , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_client__bindgen_ty_1 > () - 64usize] ; ["Alignment of aws_s3_client__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_client__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_in_flight"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_in_flight) - 0usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_network_io"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_network_io) - 8usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_stream_queued_waiting"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_stream_queued_waiting) - 40usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_streaming_response"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_streaming_response) - 48usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_streaming_request_body"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_streaming_request_body) - 56usize] ; } ; impl Default for aws_s3_client__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 () } } } # [repr (C)] pub struct aws_s3_client__bindgen_ty_2 { pub lock : aws_mutex , pub endpoints : aws_hash_table , pub num_failed_prepare_requests : u32 , pub pending_meta_request_work : aws_linked_list , pub prepared_requests : aws_linked_list , pub process_work_task : aws_task , pub trim_buffer_pool_task : aws_task , pub endpoints_cleanup_task : aws_task , pub num_endpoints_allocated : u32 , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub upload_part_stats : aws_s3_upload_part_timeout_stats , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_client__bindgen_ty_2 > () - 488usize] ; ["Alignment of aws_s3_client__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_client__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::lock"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , lock) - 0usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::endpoints"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , endpoints) - 48usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::num_failed_prepare_requests"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , num_failed_prepare_requests) - 56usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::pending_meta_request_work"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , pending_meta_request_work) - 64usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::prepared_requests"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , prepared_requests) - 96usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::process_work_task"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , process_work_task) - 128usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::trim_buffer_pool_task"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , trim_buffer_pool_task) - 192usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::endpoints_cleanup_task"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , endpoints_cleanup_task) - 256usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::num_endpoints_allocated"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , num_endpoints_allocated) - 320usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::upload_part_stats"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , upload_part_stats) - 328usize] ; } ; impl Default for aws_s3_client__bindgen_ty_2 { 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 () } } } impl aws_s3_client__bindgen_ty_2 { # [inline] pub fn active (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_active (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn active_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_active_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn start_destroy_executing (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_start_destroy_executing (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub unsafe fn start_destroy_executing_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 1usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_start_destroy_executing_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 1usize , 1u8 , val as u64 ,) } } # [inline] pub fn process_work_task_scheduled (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_process_work_task_scheduled (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub unsafe fn process_work_task_scheduled_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 2usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_process_work_task_scheduled_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 2usize , 1u8 , val as u64 ,) } } # [inline] pub fn process_work_task_in_progress (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_process_work_task_in_progress (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (3usize , 1u8 , val as u64) } } # [inline] pub unsafe fn process_work_task_in_progress_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 3usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_process_work_task_in_progress_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 3usize , 1u8 , val as u64 ,) } } # [inline] pub fn body_streaming_elg_allocated (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (4usize , 1u8) as u32) } } # [inline] pub fn set_body_streaming_elg_allocated (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (4usize , 1u8 , val as u64) } } # [inline] pub unsafe fn body_streaming_elg_allocated_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 4usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_body_streaming_elg_allocated_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 4usize , 1u8 , val as u64 ,) } } # [inline] pub fn s3express_provider_active (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (5usize , 1u8) as u32) } } # [inline] pub fn set_s3express_provider_active (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (5usize , 1u8 , val as u64) } } # [inline] pub unsafe fn s3express_provider_active_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 5usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_s3express_provider_active_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 5usize , 1u8 , val as u64 ,) } } # [inline] pub fn finish_destroy (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 1u8) as u32) } } # [inline] pub fn set_finish_destroy (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (6usize , 1u8 , val as u64) } } # [inline] pub unsafe fn finish_destroy_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 6usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_finish_destroy_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 6usize , 1u8 , val as u64 ,) } } # [inline] pub fn endpoints_cleanup_task_scheduled (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (7usize , 1u8) as u32) } } # [inline] pub fn set_endpoints_cleanup_task_scheduled (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (7usize , 1u8 , val as u64) } } # [inline] pub unsafe fn endpoints_cleanup_task_scheduled_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 7usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_endpoints_cleanup_task_scheduled_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 7usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (active : u32 , start_destroy_executing : u32 , process_work_task_scheduled : u32 , process_work_task_in_progress : u32 , body_streaming_elg_allocated : u32 , s3express_provider_active : u32 , finish_destroy : u32 , endpoints_cleanup_task_scheduled : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let active : u32 = unsafe { :: std :: mem :: transmute (active) } ; active as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let start_destroy_executing : u32 = unsafe { :: std :: mem :: transmute (start_destroy_executing) } ; start_destroy_executing as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let process_work_task_scheduled : u32 = unsafe { :: std :: mem :: transmute (process_work_task_scheduled) } ; process_work_task_scheduled as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let process_work_task_in_progress : u32 = unsafe { :: std :: mem :: transmute (process_work_task_in_progress) } ; process_work_task_in_progress as u64 }) ; __bindgen_bitfield_unit . set (4usize , 1u8 , { let body_streaming_elg_allocated : u32 = unsafe { :: std :: mem :: transmute (body_streaming_elg_allocated) } ; body_streaming_elg_allocated as u64 }) ; __bindgen_bitfield_unit . set (5usize , 1u8 , { let s3express_provider_active : u32 = unsafe { :: std :: mem :: transmute (s3express_provider_active) } ; s3express_provider_active as u64 }) ; __bindgen_bitfield_unit . set (6usize , 1u8 , { let finish_destroy : u32 = unsafe { :: std :: mem :: transmute (finish_destroy) } ; finish_destroy as u64 }) ; __bindgen_bitfield_unit . set (7usize , 1u8 , { let endpoints_cleanup_task_scheduled : u32 = unsafe { :: std :: mem :: transmute (endpoints_cleanup_task_scheduled) } ; endpoints_cleanup_task_scheduled as u64 }) ; __bindgen_bitfield_unit } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_client__bindgen_ty_3 { pub request_queue : aws_linked_list , pub meta_requests : aws_linked_list , pub request_queue_size : u32 , pub num_requests_being_prepared : u32 , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub __bindgen_padding_0 : [u8 ; 7usize] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_client__bindgen_ty_3 > () - 80usize] ; ["Alignment of aws_s3_client__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_client__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_client__bindgen_ty_3::request_queue"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_3 , request_queue) - 0usize] ; ["Offset of field: aws_s3_client__bindgen_ty_3::meta_requests"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_3 , meta_requests) - 32usize] ; ["Offset of field: aws_s3_client__bindgen_ty_3::request_queue_size"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_3 , request_queue_size) - 64usize] ; ["Offset of field: aws_s3_client__bindgen_ty_3::num_requests_being_prepared"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_3 , num_requests_being_prepared) - 68usize] ; } ; impl Default for aws_s3_client__bindgen_ty_3 { 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 () } } } impl aws_s3_client__bindgen_ty_3 { # [inline] pub fn trim_buffer_pool_task_scheduled (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_trim_buffer_pool_task_scheduled (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn trim_buffer_pool_task_scheduled_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_trim_buffer_pool_task_scheduled_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (trim_buffer_pool_task_scheduled : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let trim_buffer_pool_task_scheduled : u32 = unsafe { :: std :: mem :: transmute (trim_buffer_pool_task_scheduled) } ; trim_buffer_pool_task_scheduled as u64 }) ; __bindgen_bitfield_unit } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client"] [:: std :: mem :: size_of :: < aws_s3_client > () - 1032usize] ; ["Alignment of aws_s3_client"] [:: std :: mem :: align_of :: < aws_s3_client > () - 8usize] ; ["Offset of field: aws_s3_client::allocator"] [:: std :: mem :: offset_of ! (aws_s3_client , allocator) - 0usize] ; ["Offset of field: aws_s3_client::buffer_pool"] [:: std :: mem :: offset_of ! (aws_s3_client , buffer_pool) - 8usize] ; ["Offset of field: aws_s3_client::vtable"] [:: std :: mem :: offset_of ! (aws_s3_client , vtable) - 16usize] ; ["Offset of field: aws_s3_client::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_client , ref_count) - 24usize] ; ["Offset of field: aws_s3_client::client_bootstrap"] [:: std :: mem :: offset_of ! (aws_s3_client , client_bootstrap) - 48usize] ; ["Offset of field: aws_s3_client::process_work_event_loop"] [:: std :: mem :: offset_of ! (aws_s3_client , process_work_event_loop) - 56usize] ; ["Offset of field: aws_s3_client::body_streaming_elg"] [:: std :: mem :: offset_of ! (aws_s3_client , body_streaming_elg) - 64usize] ; ["Offset of field: aws_s3_client::region"] [:: std :: mem :: offset_of ! (aws_s3_client , region) - 72usize] ; ["Offset of field: aws_s3_client::part_size"] [:: std :: mem :: offset_of ! (aws_s3_client , part_size) - 80usize] ; ["Offset of field: aws_s3_client::part_size_set"] [:: std :: mem :: offset_of ! (aws_s3_client , part_size_set) - 88usize] ; ["Offset of field: aws_s3_client::max_part_size"] [:: std :: mem :: offset_of ! (aws_s3_client , max_part_size) - 96usize] ; ["Offset of field: aws_s3_client::optimal_range_size"] [:: std :: mem :: offset_of ! (aws_s3_client , optimal_range_size) - 104usize] ; ["Offset of field: aws_s3_client::fio_options_set"] [:: std :: mem :: offset_of ! (aws_s3_client , fio_options_set) - 112usize] ; ["Offset of field: aws_s3_client::fio_opts"] [:: std :: mem :: offset_of ! (aws_s3_client , fio_opts) - 120usize] ; ["Offset of field: aws_s3_client::multipart_upload_threshold"] [:: std :: mem :: offset_of ! (aws_s3_client , multipart_upload_threshold) - 144usize] ; ["Offset of field: aws_s3_client::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_s3_client , tls_connection_options) - 152usize] ; ["Offset of field: aws_s3_client::cached_signing_config"] [:: std :: mem :: offset_of ! (aws_s3_client , cached_signing_config) - 160usize] ; ["Offset of field: aws_s3_client::s3express_provider_factory"] [:: std :: mem :: offset_of ! (aws_s3_client , s3express_provider_factory) - 168usize] ; ["Offset of field: aws_s3_client::factory_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client , factory_user_data) - 176usize] ; ["Offset of field: aws_s3_client::s3express_provider"] [:: std :: mem :: offset_of ! (aws_s3_client , s3express_provider) - 184usize] ; ["Offset of field: aws_s3_client::throughput_target_gbps"] [:: std :: mem :: offset_of ! (aws_s3_client , throughput_target_gbps) - 192usize] ; ["Offset of field: aws_s3_client::ideal_connection_count"] [:: std :: mem :: offset_of ! (aws_s3_client , ideal_connection_count) - 200usize] ; ["Offset of field: aws_s3_client::compute_content_md5"] [:: std :: mem :: offset_of ! (aws_s3_client , compute_content_md5) - 204usize] ; ["Offset of field: aws_s3_client::max_active_connections_override"] [:: std :: mem :: offset_of ! (aws_s3_client , max_active_connections_override) - 208usize] ; ["Offset of field: aws_s3_client::max_allowed_connections"] [:: std :: mem :: offset_of ! (aws_s3_client , max_allowed_connections) - 216usize] ; ["Offset of field: aws_s3_client::retry_strategy"] [:: std :: mem :: offset_of ! (aws_s3_client , retry_strategy) - 224usize] ; ["Offset of field: aws_s3_client::proxy_config"] [:: std :: mem :: offset_of ! (aws_s3_client , proxy_config) - 232usize] ; ["Offset of field: aws_s3_client::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_s3_client , proxy_ev_settings) - 240usize] ; ["Offset of field: aws_s3_client::connect_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_client , connect_timeout_ms) - 248usize] ; ["Offset of field: aws_s3_client::tcp_keep_alive_options"] [:: std :: mem :: offset_of ! (aws_s3_client , tcp_keep_alive_options) - 256usize] ; ["Offset of field: aws_s3_client::monitoring_options"] [:: std :: mem :: offset_of ! (aws_s3_client , monitoring_options) - 264usize] ; ["Offset of field: aws_s3_client::proxy_ev_tls_options"] [:: std :: mem :: offset_of ! (aws_s3_client , proxy_ev_tls_options) - 296usize] ; ["Offset of field: aws_s3_client::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_client , shutdown_callback) - 304usize] ; ["Offset of field: aws_s3_client::shutdown_callback_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client , shutdown_callback_user_data) - 312usize] ; ["Offset of field: aws_s3_client::enable_read_backpressure"] [:: std :: mem :: offset_of ! (aws_s3_client , enable_read_backpressure) - 320usize] ; ["Offset of field: aws_s3_client::initial_read_window"] [:: std :: mem :: offset_of ! (aws_s3_client , initial_read_window) - 328usize] ; ["Offset of field: aws_s3_client::upload_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_client , upload_timeout_ms) - 336usize] ; ["Offset of field: aws_s3_client::network_interface_names"] [:: std :: mem :: offset_of ! (aws_s3_client , network_interface_names) - 344usize] ; ["Offset of field: aws_s3_client::network_interface_names_cursor_array"] [:: std :: mem :: offset_of ! (aws_s3_client , network_interface_names_cursor_array) - 384usize] ; ["Offset of field: aws_s3_client::num_network_interface_names"] [:: std :: mem :: offset_of ! (aws_s3_client , num_network_interface_names) - 392usize] ; ["Offset of field: aws_s3_client::stats"] [:: std :: mem :: offset_of ! (aws_s3_client , stats) - 400usize] ; ["Offset of field: aws_s3_client::synced_data"] [:: std :: mem :: offset_of ! (aws_s3_client , synced_data) - 464usize] ; ["Offset of field: aws_s3_client::threaded_data"] [:: std :: mem :: offset_of ! (aws_s3_client , threaded_data) - 952usize] ; } ; impl Default for aws_s3_client { 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)] pub struct aws_s3_meta_request_resume_token { pub allocator : * mut aws_allocator , pub ref_count : aws_ref_count , pub type_ : aws_s3_meta_request_type , pub multipart_upload_id : * mut aws_string , pub part_size : usize , pub total_num_parts : usize , pub num_parts_completed : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_resume_token"] [:: std :: mem :: size_of :: < aws_s3_meta_request_resume_token > () - 72usize] ; ["Alignment of aws_s3_meta_request_resume_token"] [:: std :: mem :: align_of :: < aws_s3_meta_request_resume_token > () - 8usize] ; ["Offset of field: aws_s3_meta_request_resume_token::allocator"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , allocator) - 0usize] ; ["Offset of field: aws_s3_meta_request_resume_token::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , ref_count) - 8usize] ; ["Offset of field: aws_s3_meta_request_resume_token::type_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , type_) - 32usize] ; ["Offset of field: aws_s3_meta_request_resume_token::multipart_upload_id"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , multipart_upload_id) - 40usize] ; ["Offset of field: aws_s3_meta_request_resume_token::part_size"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , part_size) - 48usize] ; ["Offset of field: aws_s3_meta_request_resume_token::total_num_parts"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , total_num_parts) - 56usize] ; ["Offset of field: aws_s3_meta_request_resume_token::num_parts_completed"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , num_parts_completed) - 64usize] ; } ; impl Default for aws_s3_meta_request_resume_token { 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 () } } } unsafe extern "C" { pub fn aws_s3_client_notify_connection_finished (client : * mut aws_s3_client , connection : * mut aws_s3_connection , error_code : :: libc :: c_int , finish_code : aws_s3_connection_finish_code) ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_new (allocator : * mut aws_allocator) -> * mut aws_s3_meta_request_resume_token ; } unsafe extern "C" { pub fn aws_s3_set_dns_ttl (ttl : usize) ; } unsafe extern "C" { pub fn aws_s3_client_get_max_requests_prepare (client : * mut aws_s3_client) -> u32 ; } unsafe extern "C" { pub fn aws_s3_client_get_max_active_connections (client : * mut aws_s3_client , meta_request : * mut aws_s3_meta_request) -> u32 ; } unsafe extern "C" { pub fn aws_s3_client_get_max_requests_in_flight (client : * mut aws_s3_client) -> u32 ; } unsafe extern "C" { pub fn aws_s3_client_queue_requests_threaded (client : * mut aws_s3_client , request_list : * mut aws_linked_list , queue_front : bool) -> u32 ; } unsafe extern "C" { pub fn aws_s3_client_dequeue_request_threaded (client : * mut aws_s3_client) -> * mut aws_s3_request ; } unsafe extern "C" { pub fn aws_s3_client_schedule_process_work (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_client_update_meta_requests_threaded (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_client_update_connections_threaded (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_endpoint_new (allocator : * mut aws_allocator , options : * const aws_s3_endpoint_options) -> * mut aws_s3_endpoint ; } unsafe extern "C" { pub fn aws_s3_client_lock_synced_data (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_client_unlock_synced_data (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_endpoint_set_system_vtable (vtable : * const aws_s3_endpoint_system_vtable) ; } unsafe extern "C" { pub fn aws_s3_endpoint_acquire (endpoint : * mut aws_s3_endpoint , already_holding_lock : bool) -> * mut aws_s3_endpoint ; } unsafe extern "C" { pub fn aws_s3_endpoint_release (endpoint : * mut aws_s3_endpoint) ; } unsafe extern "C" { pub fn aws_s3_endpoint_destroy (endpoint : * mut aws_s3_endpoint) ; } unsafe extern "C" { pub static g_min_num_connections : u32 ; } unsafe extern "C" { pub static g_expect_timeout_offset_ms : usize ; } unsafe extern "C" { pub fn aws_s3_client_update_upload_part_timeout (client : * mut aws_s3_client , finished_upload_part_request : * mut aws_s3_request , finished_error_code : :: libc :: c_int) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_default_buffer_ticket { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_default_buffer_pool_usage_stats { pub mem_limit : usize , pub primary_cutoff : usize , pub primary_allocated : usize , pub primary_num_blocks : usize , pub primary_used : usize , pub primary_reserved : usize , pub secondary_used : usize , pub secondary_reserved : usize , pub special_blocks_allocated : usize , pub special_blocks_num : usize , pub special_blocks_reserved : usize , pub special_blocks_used : usize , pub forced_used : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_default_buffer_pool_usage_stats"] [:: std :: mem :: size_of :: < aws_s3_default_buffer_pool_usage_stats > () - 104usize] ; ["Alignment of aws_s3_default_buffer_pool_usage_stats"] [:: std :: mem :: align_of :: < aws_s3_default_buffer_pool_usage_stats > () - 8usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::mem_limit"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , mem_limit) - 0usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_cutoff"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_cutoff) - 8usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_allocated"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_allocated) - 16usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_num_blocks"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_num_blocks) - 24usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_used) - 32usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_reserved) - 40usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::secondary_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , secondary_used) - 48usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::secondary_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , secondary_reserved) - 56usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::special_blocks_allocated"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , special_blocks_allocated) - 64usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::special_blocks_num"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , special_blocks_num) - 72usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::special_blocks_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , special_blocks_reserved) - 80usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::special_blocks_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , special_blocks_used) - 88usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::forced_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , forced_used) - 96usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct s3_special_block_list { pub allocator : * mut aws_allocator , pub buffer_size : usize , pub blocks : aws_array_list , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of s3_special_block_list"] [:: std :: mem :: size_of :: < s3_special_block_list > () - 56usize] ; ["Alignment of s3_special_block_list"] [:: std :: mem :: align_of :: < s3_special_block_list > () - 8usize] ; ["Offset of field: s3_special_block_list::allocator"] [:: std :: mem :: offset_of ! (s3_special_block_list , allocator) - 0usize] ; ["Offset of field: s3_special_block_list::buffer_size"] [:: std :: mem :: offset_of ! (s3_special_block_list , buffer_size) - 8usize] ; ["Offset of field: s3_special_block_list::blocks"] [:: std :: mem :: offset_of ! (s3_special_block_list , blocks) - 16usize] ; } ; impl Default for s3_special_block_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 () } } } # [repr (C)] pub struct aws_s3_default_buffer_pool { pub base_allocator : * mut aws_allocator , pub mutex : aws_mutex , pub block_size : usize , pub chunk_size : usize , pub primary_size_cutoff : usize , pub mem_limit : usize , pub primary_allocated : usize , pub primary_reserved : usize , pub primary_used : usize , pub special_blocks_allocated : usize , pub special_blocks_reserved : usize , pub special_blocks_used : usize , pub secondary_reserved : usize , pub secondary_used : usize , pub forced_used : usize , pub blocks : aws_array_list , pub pending_reserves : aws_linked_list , pub special_blocks : aws_hash_table , pub force_keeping_special_blocks : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_default_buffer_pool"] [:: std :: mem :: size_of :: < aws_s3_default_buffer_pool > () - 248usize] ; ["Alignment of aws_s3_default_buffer_pool"] [:: std :: mem :: align_of :: < aws_s3_default_buffer_pool > () - 8usize] ; ["Offset of field: aws_s3_default_buffer_pool::base_allocator"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , base_allocator) - 0usize] ; ["Offset of field: aws_s3_default_buffer_pool::mutex"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , mutex) - 8usize] ; ["Offset of field: aws_s3_default_buffer_pool::block_size"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , block_size) - 56usize] ; ["Offset of field: aws_s3_default_buffer_pool::chunk_size"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , chunk_size) - 64usize] ; ["Offset of field: aws_s3_default_buffer_pool::primary_size_cutoff"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , primary_size_cutoff) - 72usize] ; ["Offset of field: aws_s3_default_buffer_pool::mem_limit"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , mem_limit) - 80usize] ; ["Offset of field: aws_s3_default_buffer_pool::primary_allocated"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , primary_allocated) - 88usize] ; ["Offset of field: aws_s3_default_buffer_pool::primary_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , primary_reserved) - 96usize] ; ["Offset of field: aws_s3_default_buffer_pool::primary_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , primary_used) - 104usize] ; ["Offset of field: aws_s3_default_buffer_pool::special_blocks_allocated"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , special_blocks_allocated) - 112usize] ; ["Offset of field: aws_s3_default_buffer_pool::special_blocks_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , special_blocks_reserved) - 120usize] ; ["Offset of field: aws_s3_default_buffer_pool::special_blocks_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , special_blocks_used) - 128usize] ; ["Offset of field: aws_s3_default_buffer_pool::secondary_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , secondary_reserved) - 136usize] ; ["Offset of field: aws_s3_default_buffer_pool::secondary_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , secondary_used) - 144usize] ; ["Offset of field: aws_s3_default_buffer_pool::forced_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , forced_used) - 152usize] ; ["Offset of field: aws_s3_default_buffer_pool::blocks"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , blocks) - 160usize] ; ["Offset of field: aws_s3_default_buffer_pool::pending_reserves"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , pending_reserves) - 200usize] ; ["Offset of field: aws_s3_default_buffer_pool::special_blocks"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , special_blocks) - 232usize] ; ["Offset of field: aws_s3_default_buffer_pool::force_keeping_special_blocks"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , force_keeping_special_blocks) - 240usize] ; } ; impl Default for aws_s3_default_buffer_pool { 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)] pub struct s3_pending_reserve { pub node : aws_linked_list_node , pub ticket_future : * mut aws_future_s3_buffer_ticket , pub ticket : * mut aws_s3_default_buffer_ticket , pub meta : aws_s3_buffer_pool_reserve_meta , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of s3_pending_reserve"] [:: std :: mem :: size_of :: < s3_pending_reserve > () - 64usize] ; ["Alignment of s3_pending_reserve"] [:: std :: mem :: align_of :: < s3_pending_reserve > () - 8usize] ; ["Offset of field: s3_pending_reserve::node"] [:: std :: mem :: offset_of ! (s3_pending_reserve , node) - 0usize] ; ["Offset of field: s3_pending_reserve::ticket_future"] [:: std :: mem :: offset_of ! (s3_pending_reserve , ticket_future) - 16usize] ; ["Offset of field: s3_pending_reserve::ticket"] [:: std :: mem :: offset_of ! (s3_pending_reserve , ticket) - 24usize] ; ["Offset of field: s3_pending_reserve::meta"] [:: std :: mem :: offset_of ! (s3_pending_reserve , meta) - 32usize] ; } ; impl Default for s3_pending_reserve { 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)] pub struct s3_buffer_pool_block { pub block_size : usize , pub block_ptr : * mut u8 , pub alloc_bit_mask : u16 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of s3_buffer_pool_block"] [:: std :: mem :: size_of :: < s3_buffer_pool_block > () - 24usize] ; ["Alignment of s3_buffer_pool_block"] [:: std :: mem :: align_of :: < s3_buffer_pool_block > () - 8usize] ; ["Offset of field: s3_buffer_pool_block::block_size"] [:: std :: mem :: offset_of ! (s3_buffer_pool_block , block_size) - 0usize] ; ["Offset of field: s3_buffer_pool_block::block_ptr"] [:: std :: mem :: offset_of ! (s3_buffer_pool_block , block_ptr) - 8usize] ; ["Offset of field: s3_buffer_pool_block::alloc_bit_mask"] [:: std :: mem :: offset_of ! (s3_buffer_pool_block , alloc_bit_mask) - 16usize] ; } ; impl Default for s3_buffer_pool_block { 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 () } } } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_new (allocator : * mut aws_allocator , config : aws_s3_buffer_pool_config) -> * mut aws_s3_buffer_pool ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_destroy (buffer_pool : * mut aws_s3_buffer_pool) ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_reserve (buffer_pool : * mut aws_s3_buffer_pool , meta : aws_s3_buffer_pool_reserve_meta) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_acquire_buffer (buffer_pool : * mut aws_s3_buffer_pool , ticket : * mut aws_s3_default_buffer_ticket) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_get_usage (buffer_pool : * mut aws_s3_buffer_pool) -> aws_s3_default_buffer_pool_usage_stats ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_trim (buffer_pool : * mut aws_s3_buffer_pool) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_signable { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_signing_result { _unused : [u8 ; 0] , } # [doc = " Gets called by the signing function when the signing is complete.\n\n Note that result will be destroyed after this function returns, so either copy it,\n or do all necessary adjustments inside the callback.\n\n When performing event or chunk signing, you will need to copy out the signature value in order\n to correctly configure the signable that wraps the event or chunk you want signed next.  The signature is\n found in the \"signature\" property on the signing result.  This value must be added as the\n \"previous-signature\" property on the next signable."] pub type aws_signing_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (result : * mut aws_signing_result , error_code : :: libc :: c_int , userdata : * mut :: libc :: c_void) > ; unsafe extern "C" { # [doc = " (Asynchronous) entry point to sign something (a request, a chunk, an event) with an AWS signing process.\n Depending on the configuration, the signing process may or may not complete synchronously.\n\n @param allocator memory allocator to use throughout the signing process\n @param signable the thing to be signed.  See signable.h for common constructors for signables that\n wrap different types.\n @param base_config pointer to a signing configuration, currently this must be of type aws_signing_config_aws\n @param on_complete completion callback to be invoked when signing has finished\n @param user_data opaque user data that will be passed to the completion callback\n\n @return AWS_OP_SUCCESS if the signing attempt was *initiated* successfully, AWS_OP_ERR otherwise"] pub fn aws_sign_request_aws (allocator : * mut aws_allocator , signable : * const aws_signable , base_config : * const aws_signing_config_base , on_complete : aws_signing_complete_fn , userdata : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Test-only API used for cross-library signing verification tests\n\n Verifies:\n  (1) The canonical request generated during sigv4a signing of the request matches what is passed in\n  (2) The signature passed in is a valid ECDSA signature of the hashed string-to-sign derived from the\n  canonical request\n\n  @param allocator memory allocator to use throughout the signing verification process\n  @param signable the thing to be signed.  See signable.h for common constructors for signables that\n wrap different types.\n  @param base_config pointer to a signing configuration, currently this must be of type aws_signing_config_aws\n  @param expected_canonical_request_cursor expected result when building the canonical request\n  @param signature_cursor the actual signature computed from a previous signing of the signable\n  @param ecc_key_pub_x the x coordinate of the public part of the ecc key to verify the signature\n  @param ecc_key_pub_y the y coordinate of the public part of the ecc key to verify the signature\n\n  @return AWS_OP_SUCCESS if the signing attempt was *initiated* successfully, AWS_OP_ERR otherwise"] pub fn aws_verify_sigv4a_signing (allocator : * mut aws_allocator , signable : * const aws_signable , base_config : * const aws_signing_config_base , expected_canonical_request_cursor : aws_byte_cursor , signature_cursor : aws_byte_cursor , ecc_key_pub_x : aws_byte_cursor , ecc_key_pub_y : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Another helper function to check a computed sigv4a signature."] pub fn aws_validate_v4a_authorization_value (allocator : * mut aws_allocator , ecc_key : * mut aws_ecc_key_pair , string_to_sign_cursor : aws_byte_cursor , signature_value_cursor : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes any padding added to the end of a sigv4a signature.  Signature must be hex-encoded.\n @param signature signature to remove padding from\n @return cursor that ranges over only the valid hex encoding of the sigv4a signature"] pub fn aws_trim_padded_sigv4a_signature (signature : aws_byte_cursor) -> aws_byte_cursor ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_request_checksum_context { _unused : [u8 ; 0] , } unsafe extern "C" { pub static s_checksum_algo_priority_list : [aws_s3_checksum_algorithm ; 5usize] ; } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_checksum_vtable { pub destroy : :: std :: option :: Option < unsafe extern "C" fn (checksum : * mut aws_s3_checksum) > , pub update : :: std :: option :: Option < unsafe extern "C" fn (checksum : * mut aws_s3_checksum , buf : * const aws_byte_cursor) -> :: libc :: c_int > , pub finalize : :: std :: option :: Option < unsafe extern "C" fn (checksum : * mut aws_s3_checksum , out : * mut aws_byte_buf) -> :: libc :: c_int > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_checksum_vtable"] [:: std :: mem :: size_of :: < aws_checksum_vtable > () - 24usize] ; ["Alignment of aws_checksum_vtable"] [:: std :: mem :: align_of :: < aws_checksum_vtable > () - 8usize] ; ["Offset of field: aws_checksum_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_checksum_vtable , destroy) - 0usize] ; ["Offset of field: aws_checksum_vtable::update"] [:: std :: mem :: offset_of ! (aws_checksum_vtable , update) - 8usize] ; ["Offset of field: aws_checksum_vtable::finalize"] [:: std :: mem :: offset_of ! (aws_checksum_vtable , finalize) - 16usize] ; } ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_s3_checksum { pub allocator : * mut aws_allocator , pub vtable : * mut aws_checksum_vtable , pub digest_size : usize , pub algorithm : aws_s3_checksum_algorithm , pub good : bool , pub impl_ : aws_s3_checksum__bindgen_ty_1 , } # [repr (C)] # [derive (Copy , Clone)] pub union aws_s3_checksum__bindgen_ty_1 { pub hash : * mut aws_hash , pub crc_val_32bit : u32 , pub crc_val_64bit : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_checksum__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_checksum__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_s3_checksum__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_checksum__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_checksum__bindgen_ty_1::hash"] [:: std :: mem :: offset_of ! (aws_s3_checksum__bindgen_ty_1 , hash) - 0usize] ; ["Offset of field: aws_s3_checksum__bindgen_ty_1::crc_val_32bit"] [:: std :: mem :: offset_of ! (aws_s3_checksum__bindgen_ty_1 , crc_val_32bit) - 0usize] ; ["Offset of field: aws_s3_checksum__bindgen_ty_1::crc_val_64bit"] [:: std :: mem :: offset_of ! (aws_s3_checksum__bindgen_ty_1 , crc_val_64bit) - 0usize] ; } ; impl Default for aws_s3_checksum__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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_checksum"] [:: std :: mem :: size_of :: < aws_s3_checksum > () - 40usize] ; ["Alignment of aws_s3_checksum"] [:: std :: mem :: align_of :: < aws_s3_checksum > () - 8usize] ; ["Offset of field: aws_s3_checksum::allocator"] [:: std :: mem :: offset_of ! (aws_s3_checksum , allocator) - 0usize] ; ["Offset of field: aws_s3_checksum::vtable"] [:: std :: mem :: offset_of ! (aws_s3_checksum , vtable) - 8usize] ; ["Offset of field: aws_s3_checksum::digest_size"] [:: std :: mem :: offset_of ! (aws_s3_checksum , digest_size) - 16usize] ; ["Offset of field: aws_s3_checksum::algorithm"] [:: std :: mem :: offset_of ! (aws_s3_checksum , algorithm) - 24usize] ; ["Offset of field: aws_s3_checksum::good"] [:: std :: mem :: offset_of ! (aws_s3_checksum , good) - 28usize] ; ["Offset of field: aws_s3_checksum::impl_"] [:: std :: mem :: offset_of ! (aws_s3_checksum , impl_) - 32usize] ; } ; impl Default for aws_s3_checksum { 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)] pub struct aws_s3_meta_request_checksum_config_storage { pub allocator : * mut aws_allocator , pub full_object_checksum : aws_byte_buf , pub has_full_object_checksum : bool , pub full_object_checksum_callback : aws_s3_meta_request_full_object_checksum_fn , pub user_data : * mut :: libc :: c_void , pub location : aws_s3_checksum_location , pub checksum_algorithm : aws_s3_checksum_algorithm , pub validate_response_checksum : bool , pub response_checksum_algorithms : aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 { pub crc64nvme : bool , pub crc32c : bool , pub crc32 : bool , pub sha1 : bool , pub sha256 : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_checksum_config_storage__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 > () - 5usize] ; ["Alignment of aws_s3_meta_request_checksum_config_storage__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 > () - 1usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::crc64nvme"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , crc64nvme) - 0usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::crc32c"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , crc32c) - 1usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::crc32"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , crc32) - 2usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::sha1"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , sha1) - 3usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::sha256"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , sha256) - 4usize] ; } ; # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_checksum_config_storage"] [:: std :: mem :: size_of :: < aws_s3_meta_request_checksum_config_storage > () - 80usize] ; ["Alignment of aws_s3_meta_request_checksum_config_storage"] [:: std :: mem :: align_of :: < aws_s3_meta_request_checksum_config_storage > () - 8usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::allocator"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , allocator) - 0usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::full_object_checksum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , full_object_checksum) - 8usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::has_full_object_checksum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , has_full_object_checksum) - 40usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::full_object_checksum_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , full_object_checksum_callback) - 48usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::user_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , user_data) - 56usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::location"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , location) - 64usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::checksum_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , checksum_algorithm) - 68usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::validate_response_checksum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , validate_response_checksum) - 72usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::response_checksum_algorithms"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , response_checksum_algorithms) - 73usize] ; } ; impl Default for aws_s3_meta_request_checksum_config_storage { 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 () } } } unsafe extern "C" { # [doc = " Helper stream that takes in a stream and the checksum context to help finalize the checksum from the underlying\n stream.\n The context will be only finalized when the checksum stream has read to the end of stream.\n\n Note: seek this stream will immediately fail, as it would prevent an accurate calculation of the\n checksum.\n\n @param allocator\n @param existing_stream The real content to read from. Destroying the checksum stream destroys the existing stream.\n                        outputs the checksum of existing stream to checksum_output upon destruction. Will be kept\n                        alive by the checksum stream\n @param context         Checksum context to keep and get checksum requirements from."] pub fn aws_checksum_stream_new_with_context (allocator : * mut aws_allocator , existing_stream : * mut aws_input_stream , context : * mut aws_s3_upload_request_checksum_context) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Helper stream that takes in a stream to keep track of the checksum of the underlying stream during read.\n Invoke `aws_checksum_stream_finalize_checksum` to get the checksum of the data has been read so far.\n\n Note: seek this stream will immediately fail, as it would prevent an accurate calculation of the\n checksum.\n\n @param allocator\n @param existing_stream The real content to read from. Destroying the checksum stream destroys the existing stream.\n                        outputs the checksum of existing stream to checksum_output upon destruction. Will be kept\n                        alive by the checksum stream\n @param algorithm       Checksum algorithm to use."] pub fn aws_checksum_stream_new (allocator : * mut aws_allocator , existing_stream : * mut aws_input_stream , algorithm : aws_s3_checksum_algorithm) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Finalize the checksum has read so far to the output checksum buf with base64 encoding.\n Not thread safe."] pub fn aws_checksum_stream_finalize_checksum (checksum_stream : * mut aws_input_stream , checksum_buf : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " TODO: properly support chunked encoding.\n Creates a chunked encoding stream that wraps an existing stream and adds checksum trailers.\n\n This function creates a stream that:\n 1. Encodes the input stream wraps the existing_stream with aws-chunked encoded.\n 2. Calculates a checksum of the stream content (if not already calculated)\n 3. Appends the checksum as a trailer at the end of the aws-chunked stream\n\n Note: This stream does not support seeking operations, as seeking would prevent\n accurate checksum calculation and corrupt the chunked encoding format.\n\n @param allocator         Memory allocator to use for stream creation and internal buffers\n @param existing_stream   The input stream to be chunked and checksummed. This stream\n                          will be acquired by the chunk stream and released when the\n                          chunk stream is destroyed. Must not be NULL.\n @param checksum_context  Context containing checksum configuration and state. Must not be NULL.\n                          The context contains:\n                          - algorithm: The checksum algorithm to use (CRC32, CRC32C, etc.)\n                          - base64_checksum: Buffer for the calculated checksum result\n                          - checksum_calculated: Whether checksum is pre-calculated or needs calculation\n                          - encoded_checksum_size: Expected size of the base64-encoded checksum\n\n                          If checksum_calculated is false, the stream will wrap existing_stream\n                          with a checksum stream to calculate the checksum during reading.\n                          If checksum_calculated is true, the existing checksum value will be used.\n\n @return A new input stream that provides chunked encoding with checksum trailers,\n         or NULL if creation fails. The returned stream must be released with\n         aws_input_stream_release() when no longer needed.\n\n @note The total length of the returned stream includes:\n       - Chunk size header (hex representation + \\r\\n)\n       - Original stream content\n       - Final chunk marker (0\\r\\n or \\r\\n0\\r\\n)\n       - Checksum trailer (header name + : + base64 checksum + \\r\\n\\r\\n)"] pub fn aws_chunk_stream_new (allocator : * mut aws_allocator , existing_stream : * mut aws_input_stream , context : * mut aws_s3_upload_request_checksum_context) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Get the size of the checksum output corresponding to the aws_s3_checksum_algorithm enum value."] pub fn aws_get_digest_size_from_checksum_algorithm (algorithm : aws_s3_checksum_algorithm) -> usize ; } unsafe extern "C" { # [doc = " Get header name to use for algorithm (e.g. \"x-amz-checksum-crc32\")"] pub fn aws_get_http_header_name_from_checksum_algorithm (algorithm : aws_s3_checksum_algorithm) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get algorithm's name (e.g. \"CRC32\"), to be used as the value of headers like `x-amz-checksum-algorithm`"] pub fn aws_get_checksum_algorithm_name (algorithm : aws_s3_checksum_algorithm) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the name of checksum algorithm to be used as the details of the parts were uploaded. Referring to\n https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompletedPart.html#AmazonS3-Type-CompletedPart"] pub fn aws_get_completed_part_name_from_checksum_algorithm (algorithm : aws_s3_checksum_algorithm) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " create a new aws_checksum corresponding to the aws_s3_checksum_algorithm enum value."] pub fn aws_checksum_new (allocator : * mut aws_allocator , algorithm : aws_s3_checksum_algorithm) -> * mut aws_s3_checksum ; } unsafe extern "C" { # [doc = " Compute an aws_checksum corresponding to the provided enum, passing a function pointer around instead of using a\n conditional would be faster, but would be a negligible improvement compared to the cost of processing data twice\n which would be the only time this function would be used, and would be harder to follow."] pub fn aws_checksum_compute (allocator : * mut aws_allocator , algorithm : aws_s3_checksum_algorithm , input : * const aws_byte_cursor , output : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Cleans up and deallocates checksum."] pub fn aws_checksum_destroy (checksum : * mut aws_s3_checksum) ; } unsafe extern "C" { # [doc = " Updates the running checksum with to_checksum. this can be called multiple times."] pub fn aws_checksum_update (checksum : * mut aws_s3_checksum , to_checksum : * const aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Completes the checksum computation and writes the final digest to output.\n Allocation of output is the caller's responsibility."] pub fn aws_checksum_finalize (checksum : * mut aws_s3_checksum , output : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_meta_request_checksum_config_storage_init (allocator : * mut aws_allocator , internal_config : * mut aws_s3_meta_request_checksum_config_storage , config : * const aws_s3_checksum_config , message : * const aws_http_message , log_id : * const :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_meta_request_checksum_config_storage_cleanup (internal_config : * mut aws_s3_meta_request_checksum_config_storage) ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_request_flags { AWS_S3_REQUEST_FLAG_RECORD_RESPONSE_HEADERS = 1 , AWS_S3_REQUEST_FLAG_ALWAYS_SEND = 2 , AWS_S3_REQUEST_FLAG_ALLOCATE_BUFFER_FROM_POOL = 4 , } # [doc = " Information sent in the telemetry_callback after each aws_s3_request finished/retried from meta request."] # [repr (C)] pub struct aws_s3_request_metrics { pub allocator : * mut aws_allocator , pub time_metrics : aws_s3_request_metrics__bindgen_ty_1 , pub req_resp_info_metrics : aws_s3_request_metrics__bindgen_ty_2 , pub crt_info_metrics : aws_s3_request_metrics__bindgen_ty_3 , pub part_info_metrics : aws_s3_request_metrics__bindgen_ty_4 , pub ref_count : aws_ref_count , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_request_metrics__bindgen_ty_1 { pub s3_request_first_attempt_start_timestamp_ns : i64 , pub s3_request_last_attempt_end_timestamp_ns : i64 , pub s3_request_total_duration_ns : i64 , pub start_timestamp_ns : i64 , pub end_timestamp_ns : i64 , pub total_duration_ns : i64 , pub send_start_timestamp_ns : i64 , pub send_end_timestamp_ns : i64 , pub sending_duration_ns : i64 , pub receive_start_timestamp_ns : i64 , pub receive_end_timestamp_ns : i64 , pub receiving_duration_ns : i64 , pub sign_start_timestamp_ns : i64 , pub sign_end_timestamp_ns : i64 , pub signing_duration_ns : i64 , pub mem_acquire_start_timestamp_ns : i64 , pub mem_acquire_end_timestamp_ns : i64 , pub mem_acquire_duration_ns : i64 , pub deliver_start_timestamp_ns : i64 , pub deliver_end_timestamp_ns : i64 , pub deliver_duration_ns : i64 , pub conn_acquire_start_timestamp_ns : i64 , pub conn_acquire_end_timestamp_ns : i64 , pub conn_acquire_duration_ns : i64 , pub retry_delay_start_timestamp_ns : i64 , pub retry_delay_end_timestamp_ns : i64 , pub retry_delay_duration_ns : i64 , pub service_call_duration_ns : i64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_request_metrics__bindgen_ty_1 > () - 224usize] ; ["Alignment of aws_s3_request_metrics__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_request_metrics__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::s3_request_first_attempt_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , s3_request_first_attempt_start_timestamp_ns) - 0usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::s3_request_last_attempt_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , s3_request_last_attempt_end_timestamp_ns) - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::s3_request_total_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , s3_request_total_duration_ns) - 16usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , start_timestamp_ns) - 24usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , end_timestamp_ns) - 32usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::total_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , total_duration_ns) - 40usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::send_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , send_start_timestamp_ns) - 48usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::send_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , send_end_timestamp_ns) - 56usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::sending_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , sending_duration_ns) - 64usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::receive_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , receive_start_timestamp_ns) - 72usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::receive_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , receive_end_timestamp_ns) - 80usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::receiving_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , receiving_duration_ns) - 88usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::sign_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , sign_start_timestamp_ns) - 96usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::sign_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , sign_end_timestamp_ns) - 104usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::signing_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , signing_duration_ns) - 112usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::mem_acquire_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , mem_acquire_start_timestamp_ns) - 120usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::mem_acquire_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , mem_acquire_end_timestamp_ns) - 128usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::mem_acquire_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , mem_acquire_duration_ns) - 136usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::deliver_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , deliver_start_timestamp_ns) - 144usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::deliver_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , deliver_end_timestamp_ns) - 152usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::deliver_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , deliver_duration_ns) - 160usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::conn_acquire_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , conn_acquire_start_timestamp_ns) - 168usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::conn_acquire_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , conn_acquire_end_timestamp_ns) - 176usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::conn_acquire_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , conn_acquire_duration_ns) - 184usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::retry_delay_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , retry_delay_start_timestamp_ns) - 192usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::retry_delay_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , retry_delay_end_timestamp_ns) - 200usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::retry_delay_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , retry_delay_duration_ns) - 208usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::service_call_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , service_call_duration_ns) - 216usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_request_metrics__bindgen_ty_2 { pub response_status : :: libc :: c_int , pub response_headers : * mut aws_http_headers , pub request_path_query : * mut aws_string , pub host_address : * mut aws_string , pub request_id : * mut aws_string , pub extended_request_id : * mut aws_string , pub operation_name : * mut aws_string , pub request_type : aws_s3_request_type , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_request_metrics__bindgen_ty_2 > () - 64usize] ; ["Alignment of aws_s3_request_metrics__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_request_metrics__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::response_status"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , response_status) - 0usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::response_headers"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , response_headers) - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::request_path_query"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , request_path_query) - 16usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::host_address"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , host_address) - 24usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::request_id"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , request_id) - 32usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::extended_request_id"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , extended_request_id) - 40usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::operation_name"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , operation_name) - 48usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::request_type"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , request_type) - 56usize] ; } ; impl Default for aws_s3_request_metrics__bindgen_ty_2 { 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)] pub struct aws_s3_request_metrics__bindgen_ty_3 { pub ip_address : * mut aws_string , pub connection_ptr : * mut :: libc :: c_void , pub request_ptr : * mut :: libc :: c_void , pub thread_id : aws_thread_id_t , pub stream_id : u32 , pub error_code : :: libc :: c_int , pub retry_attempt : u32 , pub memory_allocated_from_pool : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_request_metrics__bindgen_ty_3 > () - 48usize] ; ["Alignment of aws_s3_request_metrics__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_request_metrics__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::ip_address"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , ip_address) - 0usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::connection_ptr"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , connection_ptr) - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::request_ptr"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , request_ptr) - 16usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::thread_id"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , thread_id) - 24usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::stream_id"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , stream_id) - 32usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::error_code"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , error_code) - 36usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::retry_attempt"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , retry_attempt) - 40usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::memory_allocated_from_pool"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , memory_allocated_from_pool) - 44usize] ; } ; impl Default for aws_s3_request_metrics__bindgen_ty_3 { 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)] pub struct aws_s3_request_metrics__bindgen_ty_4 { pub part_range_start : u64 , pub part_range_end : u64 , pub part_number : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics__bindgen_ty_4"] [:: std :: mem :: size_of :: < aws_s3_request_metrics__bindgen_ty_4 > () - 24usize] ; ["Alignment of aws_s3_request_metrics__bindgen_ty_4"] [:: std :: mem :: align_of :: < aws_s3_request_metrics__bindgen_ty_4 > () - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_4::part_range_start"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_4 , part_range_start) - 0usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_4::part_range_end"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_4 , part_range_end) - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_4::part_number"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_4 , part_number) - 16usize] ; } ; # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics"] [:: std :: mem :: size_of :: < aws_s3_request_metrics > () - 392usize] ; ["Alignment of aws_s3_request_metrics"] [:: std :: mem :: align_of :: < aws_s3_request_metrics > () - 8usize] ; ["Offset of field: aws_s3_request_metrics::allocator"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , allocator) - 0usize] ; ["Offset of field: aws_s3_request_metrics::time_metrics"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , time_metrics) - 8usize] ; ["Offset of field: aws_s3_request_metrics::req_resp_info_metrics"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , req_resp_info_metrics) - 232usize] ; ["Offset of field: aws_s3_request_metrics::crt_info_metrics"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , crt_info_metrics) - 296usize] ; ["Offset of field: aws_s3_request_metrics::part_info_metrics"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , part_info_metrics) - 344usize] ; ["Offset of field: aws_s3_request_metrics::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , ref_count) - 368usize] ; } ; impl Default for aws_s3_request_metrics { 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)] pub struct aws_s3_request { pub node : aws_linked_list_node , pub retry_start_timestamp_ns : i64 , pub retry_end_timestamp_ns : i64 , pub cancellable_http_streams_list_node : aws_linked_list_node , pub pending_buffer_future_list_node : aws_linked_list_node , pub synced_data : aws_s3_request__bindgen_ty_1 , pub ref_count : aws_ref_count , pub allocator : * mut aws_allocator , pub meta_request : * mut aws_s3_meta_request , pub buffer_size : usize , pub request_body : aws_byte_buf , pub fio_streaming : bool , pub request_body_stream : * mut aws_input_stream , pub content_length : u64 , # [doc = " Ticket to acquire the buffer."] pub ticket : * mut aws_s3_buffer_ticket , pub part_range_start : u64 , pub part_range_end : u64 , pub part_number : u32 , pub upload_timeout_ms : usize , pub num_times_prepared : u32 , pub request_level_response_header_checksum : aws_byte_buf , pub request_level_running_response_sum : * mut aws_s3_checksum , pub validation_algorithm : aws_s3_checksum_algorithm , pub did_validate : bool , pub checksum_match : bool , pub request_tag : :: libc :: c_int , pub request_type : aws_s3_request_type , pub operation_name : * mut aws_string , pub send_data : aws_s3_request__bindgen_ty_2 , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub __bindgen_padding_0 : [u8 ; 7usize] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_request__bindgen_ty_1 { pub cancellable_http_stream : * mut aws_http_stream , pub buffer_future : * mut aws_future_s3_buffer_ticket , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_request__bindgen_ty_1 > () - 16usize] ; ["Alignment of aws_s3_request__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_request__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_request__bindgen_ty_1::cancellable_http_stream"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_1 , cancellable_http_stream) - 0usize] ; ["Offset of field: aws_s3_request__bindgen_ty_1::buffer_future"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_1 , buffer_future) - 8usize] ; } ; impl Default for aws_s3_request__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 () } } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_request__bindgen_ty_2 { pub message : * mut aws_http_message , pub signable : * mut aws_signable , pub response_headers : * mut aws_http_headers , pub response_body : aws_byte_buf , pub response_status : :: libc :: c_int , pub request_id : * mut aws_string , pub amz_id_2 : * mut aws_string , pub metrics : * mut aws_s3_request_metrics , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub __bindgen_padding_0 : [u8 ; 7usize] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_request__bindgen_ty_2 > () - 96usize] ; ["Alignment of aws_s3_request__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_request__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::message"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , message) - 0usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::signable"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , signable) - 8usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::response_headers"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , response_headers) - 16usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::response_body"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , response_body) - 24usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::response_status"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , response_status) - 56usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::request_id"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , request_id) - 64usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::amz_id_2"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , amz_id_2) - 72usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::metrics"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , metrics) - 80usize] ; } ; impl Default for aws_s3_request__bindgen_ty_2 { 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 () } } } impl aws_s3_request__bindgen_ty_2 { # [inline] pub fn require_streaming_unsigned_payload_header (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_require_streaming_unsigned_payload_header (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn require_streaming_unsigned_payload_header_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_require_streaming_unsigned_payload_header_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (require_streaming_unsigned_payload_header : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let require_streaming_unsigned_payload_header : u32 = unsafe { :: std :: mem :: transmute (require_streaming_unsigned_payload_header) } ; require_streaming_unsigned_payload_header as u64 }) ; __bindgen_bitfield_unit } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request"] [:: std :: mem :: size_of :: < aws_s3_request > () - 400usize] ; ["Alignment of aws_s3_request"] [:: std :: mem :: align_of :: < aws_s3_request > () - 8usize] ; ["Offset of field: aws_s3_request::node"] [:: std :: mem :: offset_of ! (aws_s3_request , node) - 0usize] ; ["Offset of field: aws_s3_request::retry_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request , retry_start_timestamp_ns) - 16usize] ; ["Offset of field: aws_s3_request::retry_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request , retry_end_timestamp_ns) - 24usize] ; ["Offset of field: aws_s3_request::cancellable_http_streams_list_node"] [:: std :: mem :: offset_of ! (aws_s3_request , cancellable_http_streams_list_node) - 32usize] ; ["Offset of field: aws_s3_request::pending_buffer_future_list_node"] [:: std :: mem :: offset_of ! (aws_s3_request , pending_buffer_future_list_node) - 48usize] ; ["Offset of field: aws_s3_request::synced_data"] [:: std :: mem :: offset_of ! (aws_s3_request , synced_data) - 64usize] ; ["Offset of field: aws_s3_request::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_request , ref_count) - 80usize] ; ["Offset of field: aws_s3_request::allocator"] [:: std :: mem :: offset_of ! (aws_s3_request , allocator) - 104usize] ; ["Offset of field: aws_s3_request::meta_request"] [:: std :: mem :: offset_of ! (aws_s3_request , meta_request) - 112usize] ; ["Offset of field: aws_s3_request::buffer_size"] [:: std :: mem :: offset_of ! (aws_s3_request , buffer_size) - 120usize] ; ["Offset of field: aws_s3_request::request_body"] [:: std :: mem :: offset_of ! (aws_s3_request , request_body) - 128usize] ; ["Offset of field: aws_s3_request::fio_streaming"] [:: std :: mem :: offset_of ! (aws_s3_request , fio_streaming) - 160usize] ; ["Offset of field: aws_s3_request::request_body_stream"] [:: std :: mem :: offset_of ! (aws_s3_request , request_body_stream) - 168usize] ; ["Offset of field: aws_s3_request::content_length"] [:: std :: mem :: offset_of ! (aws_s3_request , content_length) - 176usize] ; ["Offset of field: aws_s3_request::ticket"] [:: std :: mem :: offset_of ! (aws_s3_request , ticket) - 184usize] ; ["Offset of field: aws_s3_request::part_range_start"] [:: std :: mem :: offset_of ! (aws_s3_request , part_range_start) - 192usize] ; ["Offset of field: aws_s3_request::part_range_end"] [:: std :: mem :: offset_of ! (aws_s3_request , part_range_end) - 200usize] ; ["Offset of field: aws_s3_request::part_number"] [:: std :: mem :: offset_of ! (aws_s3_request , part_number) - 208usize] ; ["Offset of field: aws_s3_request::upload_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_request , upload_timeout_ms) - 216usize] ; ["Offset of field: aws_s3_request::num_times_prepared"] [:: std :: mem :: offset_of ! (aws_s3_request , num_times_prepared) - 224usize] ; ["Offset of field: aws_s3_request::request_level_response_header_checksum"] [:: std :: mem :: offset_of ! (aws_s3_request , request_level_response_header_checksum) - 232usize] ; ["Offset of field: aws_s3_request::request_level_running_response_sum"] [:: std :: mem :: offset_of ! (aws_s3_request , request_level_running_response_sum) - 264usize] ; ["Offset of field: aws_s3_request::validation_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_request , validation_algorithm) - 272usize] ; ["Offset of field: aws_s3_request::did_validate"] [:: std :: mem :: offset_of ! (aws_s3_request , did_validate) - 276usize] ; ["Offset of field: aws_s3_request::checksum_match"] [:: std :: mem :: offset_of ! (aws_s3_request , checksum_match) - 277usize] ; ["Offset of field: aws_s3_request::request_tag"] [:: std :: mem :: offset_of ! (aws_s3_request , request_tag) - 280usize] ; ["Offset of field: aws_s3_request::request_type"] [:: std :: mem :: offset_of ! (aws_s3_request , request_type) - 284usize] ; ["Offset of field: aws_s3_request::operation_name"] [:: std :: mem :: offset_of ! (aws_s3_request , operation_name) - 288usize] ; ["Offset of field: aws_s3_request::send_data"] [:: std :: mem :: offset_of ! (aws_s3_request , send_data) - 296usize] ; } ; impl Default for aws_s3_request { 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 () } } } impl aws_s3_request { # [inline] pub fn record_response_headers (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_record_response_headers (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn record_response_headers_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_record_response_headers_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn should_allocate_buffer_from_pool (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_should_allocate_buffer_from_pool (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub unsafe fn should_allocate_buffer_from_pool_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 1usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_should_allocate_buffer_from_pool_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 1usize , 1u8 , val as u64 ,) } } # [inline] pub fn tracked_by_client (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_tracked_by_client (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub unsafe fn tracked_by_client_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 2usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_tracked_by_client_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 2usize , 1u8 , val as u64 ,) } } # [inline] pub fn always_send (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_always_send (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (3usize , 1u8 , val as u64) } } # [inline] pub unsafe fn always_send_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 3usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_always_send_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 3usize , 1u8 , val as u64 ,) } } # [inline] pub fn discovers_object_size (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (4usize , 1u8) as u32) } } # [inline] pub fn set_discovers_object_size (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (4usize , 1u8 , val as u64) } } # [inline] pub unsafe fn discovers_object_size_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 4usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_discovers_object_size_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 4usize , 1u8 , val as u64 ,) } } # [inline] pub fn is_noop (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (5usize , 1u8) as u32) } } # [inline] pub fn set_is_noop (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (5usize , 1u8 , val as u64) } } # [inline] pub unsafe fn is_noop_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 5usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_is_noop_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 5usize , 1u8 , val as u64 ,) } } # [inline] pub fn was_previously_uploaded (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 1u8) as u32) } } # [inline] pub fn set_was_previously_uploaded (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (6usize , 1u8 , val as u64) } } # [inline] pub unsafe fn was_previously_uploaded_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 6usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_was_previously_uploaded_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 6usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (record_response_headers : u32 , should_allocate_buffer_from_pool : u32 , tracked_by_client : u32 , always_send : u32 , discovers_object_size : u32 , is_noop : u32 , was_previously_uploaded : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let record_response_headers : u32 = unsafe { :: std :: mem :: transmute (record_response_headers) } ; record_response_headers as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let should_allocate_buffer_from_pool : u32 = unsafe { :: std :: mem :: transmute (should_allocate_buffer_from_pool) } ; should_allocate_buffer_from_pool as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let tracked_by_client : u32 = unsafe { :: std :: mem :: transmute (tracked_by_client) } ; tracked_by_client as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let always_send : u32 = unsafe { :: std :: mem :: transmute (always_send) } ; always_send as u64 }) ; __bindgen_bitfield_unit . set (4usize , 1u8 , { let discovers_object_size : u32 = unsafe { :: std :: mem :: transmute (discovers_object_size) } ; discovers_object_size as u64 }) ; __bindgen_bitfield_unit . set (5usize , 1u8 , { let is_noop : u32 = unsafe { :: std :: mem :: transmute (is_noop) } ; is_noop as u64 }) ; __bindgen_bitfield_unit . set (6usize , 1u8 , { let was_previously_uploaded : u32 = unsafe { :: std :: mem :: transmute (was_previously_uploaded) } ; was_previously_uploaded as u64 }) ; __bindgen_bitfield_unit } } unsafe extern "C" { pub fn aws_s3_request_new (meta_request : * mut aws_s3_meta_request , request_tag : :: libc :: c_int , request_type : aws_s3_request_type , part_number : u32 , flags : u32) -> * mut aws_s3_request ; } unsafe extern "C" { pub fn aws_s3_request_setup_send_data (request : * mut aws_s3_request , message : * mut aws_http_message) ; } unsafe extern "C" { pub fn aws_s3_request_clean_up_send_data (request : * mut aws_s3_request) ; } unsafe extern "C" { pub fn aws_s3_request_acquire (request : * mut aws_s3_request) -> * mut aws_s3_request ; } unsafe extern "C" { pub fn aws_s3_request_release (request : * mut aws_s3_request) -> * mut aws_s3_request ; } unsafe extern "C" { pub fn aws_s3_request_metrics_new (allocator : * mut aws_allocator) -> * mut aws_s3_request_metrics ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_state { AWS_S3_META_REQUEST_STATE_ACTIVE = 0 , AWS_S3_META_REQUEST_STATE_FINISHED = 1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_update_flags { AWS_S3_META_REQUEST_UPDATE_FLAG_CONSERVATIVE = 2 , } pub type aws_s3_meta_request_prepare_request_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_s3_prepare_request_payload { pub allocator : * mut aws_allocator , pub request : * mut aws_s3_request , pub task : aws_task , pub asyncstep_prepare_request : * mut aws_future_void , pub callback : aws_s3_meta_request_prepare_request_callback_fn , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_prepare_request_payload"] [:: std :: mem :: size_of :: < aws_s3_prepare_request_payload > () - 104usize] ; ["Alignment of aws_s3_prepare_request_payload"] [:: std :: mem :: align_of :: < aws_s3_prepare_request_payload > () - 8usize] ; ["Offset of field: aws_s3_prepare_request_payload::allocator"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , allocator) - 0usize] ; ["Offset of field: aws_s3_prepare_request_payload::request"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , request) - 8usize] ; ["Offset of field: aws_s3_prepare_request_payload::task"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , task) - 16usize] ; ["Offset of field: aws_s3_prepare_request_payload::asyncstep_prepare_request"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , asyncstep_prepare_request) - 80usize] ; ["Offset of field: aws_s3_prepare_request_payload::callback"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , callback) - 88usize] ; ["Offset of field: aws_s3_prepare_request_payload::user_data"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , user_data) - 96usize] ; } ; impl Default for aws_s3_prepare_request_payload { 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 (Copy , Clone)] pub struct aws_s3_meta_request_event { pub type_ : aws_s3_meta_request_event_aws_s3_meta_request_event_type , pub u : aws_s3_meta_request_event__bindgen_ty_1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_event_aws_s3_meta_request_event_type { AWS_S3_META_REQUEST_EVENT_RESPONSE_BODY = 0 , AWS_S3_META_REQUEST_EVENT_PROGRESS = 1 , AWS_S3_META_REQUEST_EVENT_TELEMETRY = 2 , } # [repr (C)] # [derive (Copy , Clone)] pub union aws_s3_meta_request_event__bindgen_ty_1 { pub response_body : aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 , pub progress : aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 , pub telemetry : aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 { pub completed_request : * mut aws_s3_request , pub bytes_delivered : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 > () - 16usize] ; ["Alignment of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1::completed_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 , completed_request) - 0usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1::bytes_delivered"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 , bytes_delivered) - 8usize] ; } ; impl Default for aws_s3_meta_request_event__bindgen_ty_1__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 () } } } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 { pub info : aws_s3_meta_request_progress , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 > () - 16usize] ; ["Alignment of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2::info"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 , info) - 0usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 { pub metrics : * mut aws_s3_request_metrics , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 > () - 8usize] ; ["Alignment of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3::metrics"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 , metrics) - 0usize] ; } ; impl Default for aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 { 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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event__bindgen_ty_1 > () - 16usize] ; ["Alignment of aws_s3_meta_request_event__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1::response_body"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1 , response_body) - 0usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1::progress"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1 , progress) - 0usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1::telemetry"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1 , telemetry) - 0usize] ; } ; impl Default for aws_s3_meta_request_event__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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event > () - 24usize] ; ["Alignment of aws_s3_meta_request_event"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event::type_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event , type_) - 0usize] ; ["Offset of field: aws_s3_meta_request_event::u"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event , u) - 8usize] ; } ; impl Default for aws_s3_meta_request_event { 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)] pub struct aws_s3_meta_request_vtable { pub update : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , flags : u32 , out_request : * mut * mut aws_s3_request) -> bool > , pub schedule_prepare_request : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , callback : aws_s3_meta_request_prepare_request_callback_fn , user_data : * mut :: libc :: c_void) > , pub prepare_request : :: std :: option :: Option < unsafe extern "C" fn (request : * mut aws_s3_request) -> * mut aws_future_void > , pub init_signing_date_time : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , date_time : * mut aws_date_time) > , pub sign_request : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , on_signing_complete : aws_signing_complete_fn , user_data : * mut :: libc :: c_void) > , pub send_request_finish : :: std :: option :: Option < unsafe extern "C" fn (connection : * mut aws_s3_connection , stream : * mut aws_http_stream , error_code : :: libc :: c_int) > , pub finished_request : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , error_code : :: libc :: c_int) > , pub finish : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request) > , pub destroy : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut aws_s3_meta_request) > , pub pause : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , resume_token : * mut * mut aws_s3_meta_request_resume_token) -> :: libc :: c_int > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_vtable"] [:: std :: mem :: size_of :: < aws_s3_meta_request_vtable > () - 80usize] ; ["Alignment of aws_s3_meta_request_vtable"] [:: std :: mem :: align_of :: < aws_s3_meta_request_vtable > () - 8usize] ; ["Offset of field: aws_s3_meta_request_vtable::update"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , update) - 0usize] ; ["Offset of field: aws_s3_meta_request_vtable::schedule_prepare_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , schedule_prepare_request) - 8usize] ; ["Offset of field: aws_s3_meta_request_vtable::prepare_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , prepare_request) - 16usize] ; ["Offset of field: aws_s3_meta_request_vtable::init_signing_date_time"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , init_signing_date_time) - 24usize] ; ["Offset of field: aws_s3_meta_request_vtable::sign_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , sign_request) - 32usize] ; ["Offset of field: aws_s3_meta_request_vtable::send_request_finish"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , send_request_finish) - 40usize] ; ["Offset of field: aws_s3_meta_request_vtable::finished_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , finished_request) - 48usize] ; ["Offset of field: aws_s3_meta_request_vtable::finish"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , finish) - 56usize] ; ["Offset of field: aws_s3_meta_request_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , destroy) - 64usize] ; ["Offset of field: aws_s3_meta_request_vtable::pause"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , pause) - 72usize] ; } ; # [doc = " This represents one meta request, ie, one accelerated file transfer.  One S3 meta request can represent multiple S3\n requests."] # [repr (C)] pub struct aws_s3_meta_request { pub allocator : * mut aws_allocator , pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , pub vtable : * mut aws_s3_meta_request_vtable , pub initial_request_message : * mut aws_http_message , pub request_body_async_stream : * mut aws_async_input_stream , pub request_body_parallel_stream : * mut aws_parallel_input_stream , pub request_body_using_async_writes : bool , pub part_size : usize , pub max_active_connections_override : u32 , pub cached_signing_config : * mut aws_cached_signing_config_aws , pub client : * mut aws_s3_client , pub endpoint : * mut aws_s3_endpoint , pub num_requests_network : aws_atomic_var , pub io_event_loop : * mut aws_event_loop , pub user_data : * mut :: libc :: c_void , pub headers_callback : aws_s3_meta_request_headers_callback_fn , pub body_callback : aws_s3_meta_request_receive_body_callback_fn , pub body_callback_ex : aws_s3_meta_request_receive_body_callback_ex_fn , pub finish_callback : aws_s3_meta_request_finish_fn , pub shutdown_callback : aws_s3_meta_request_shutdown_fn , pub progress_callback : aws_s3_meta_request_progress_fn , pub telemetry_callback : aws_s3_meta_request_telemetry_fn , pub upload_review_callback : aws_s3_meta_request_upload_review_fn , pub type_ : aws_s3_meta_request_type , pub s3express_session_host : * mut aws_string , pub is_express : bool , pub buffer_pool_optimized : bool , pub num_request_being_prepared : aws_atomic_var , pub synced_data : aws_s3_meta_request__bindgen_ty_1 , pub client_process_work_threaded_data : aws_s3_meta_request__bindgen_ty_2 , pub io_threaded_data : aws_s3_meta_request__bindgen_ty_3 , pub should_compute_content_md5 : bool , pub checksum_config : aws_s3_meta_request_checksum_config_storage , pub meta_request_level_response_header_checksum : aws_byte_buf , pub meta_request_level_running_response_sum : * mut aws_s3_checksum , pub recv_file : * mut FILE , pub recv_filepath : * mut aws_string , pub recv_file_delete_on_failure : bool , pub fio_opts : aws_s3_file_io_options , } # [repr (C)] pub struct aws_s3_meta_request__bindgen_ty_1 { pub lock : aws_mutex , pub pending_body_streaming_requests : aws_priority_queue , pub state : aws_s3_meta_request_state , pub read_window_running_total : u64 , pub next_streaming_part : u32 , pub num_parts_delivery_sent : u32 , pub num_parts_delivery_completed : u32 , pub event_delivery_task : aws_task , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub event_delivery_array : aws_array_list , pub event_delivery_active : bool , pub finish_result : aws_s3_meta_request_result , pub _bitfield_align_2 : [u8 ; 0] , pub _bitfield_2 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub cancellable_http_streams_list : aws_linked_list , pub pending_buffer_futures : aws_linked_list , pub async_write : aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data { pub ready_to_send : bool , pub eof : bool , pub buffered_data : aws_byte_buf , pub buffered_data_ticket : * mut aws_s3_buffer_ticket , pub waker : aws_simple_completion_callback , pub waker_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data"] [:: std :: mem :: size_of :: < aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data > () - 64usize] ; ["Alignment of aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data"] [:: std :: mem :: align_of :: < aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data > () - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::ready_to_send"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , ready_to_send) - 0usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::eof"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , eof) - 1usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::buffered_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , buffered_data) - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::buffered_data_ticket"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , buffered_data_ticket) - 40usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::waker"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , waker) - 48usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::waker_user_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , waker_user_data) - 56usize] ; } ; impl Default for aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_meta_request__bindgen_ty_1 > () - 464usize] ; ["Alignment of aws_s3_meta_request__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_meta_request__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::lock"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , lock) - 0usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::pending_body_streaming_requests"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , pending_body_streaming_requests) - 48usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::state"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , state) - 136usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::read_window_running_total"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , read_window_running_total) - 144usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::next_streaming_part"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , next_streaming_part) - 152usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::num_parts_delivery_sent"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , num_parts_delivery_sent) - 156usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::num_parts_delivery_completed"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , num_parts_delivery_completed) - 160usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::event_delivery_task"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , event_delivery_task) - 168usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::event_delivery_array"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , event_delivery_array) - 240usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::event_delivery_active"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , event_delivery_active) - 280usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::finish_result"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , finish_result) - 288usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::cancellable_http_streams_list"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , cancellable_http_streams_list) - 336usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::pending_buffer_futures"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , pending_buffer_futures) - 368usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::async_write"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , async_write) - 400usize] ; } ; impl Default for aws_s3_meta_request__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 () } } } impl aws_s3_meta_request__bindgen_ty_1 { # [inline] pub fn event_delivery_task_scheduled (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_event_delivery_task_scheduled (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn event_delivery_task_scheduled_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_event_delivery_task_scheduled_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (event_delivery_task_scheduled : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let event_delivery_task_scheduled : u32 = unsafe { :: std :: mem :: transmute (event_delivery_task_scheduled) } ; event_delivery_task_scheduled as u64 }) ; __bindgen_bitfield_unit } # [inline] pub fn finish_result_set (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_2 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_finish_result_set (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_2 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn finish_result_set_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_2) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_finish_result_set_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_2) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_2 (finish_result_set : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let finish_result_set : u32 = unsafe { :: std :: mem :: transmute (finish_result_set) } ; finish_result_set as u64 }) ; __bindgen_bitfield_unit } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request__bindgen_ty_2 { pub node : aws_linked_list_node , pub scheduled : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_meta_request__bindgen_ty_2 > () - 24usize] ; ["Alignment of aws_s3_meta_request__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_meta_request__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_2::node"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_2 , node) - 0usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_2::scheduled"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_2 , scheduled) - 16usize] ; } ; impl Default for aws_s3_meta_request__bindgen_ty_2 { 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)] pub struct aws_s3_meta_request__bindgen_ty_3 { pub event_delivery_array : aws_array_list , pub next_deliver_range_start : u64 , pub num_bytes_delivery_completed : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_meta_request__bindgen_ty_3 > () - 56usize] ; ["Alignment of aws_s3_meta_request__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_meta_request__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_3::event_delivery_array"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_3 , event_delivery_array) - 0usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_3::next_deliver_range_start"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_3 , next_deliver_range_start) - 40usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_3::num_bytes_delivery_completed"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_3 , num_bytes_delivery_completed) - 48usize] ; } ; impl Default for aws_s3_meta_request__bindgen_ty_3 { 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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request"] [:: std :: mem :: size_of :: < aws_s3_meta_request > () - 960usize] ; ["Alignment of aws_s3_meta_request"] [:: std :: mem :: align_of :: < aws_s3_meta_request > () - 8usize] ; ["Offset of field: aws_s3_meta_request::allocator"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , allocator) - 0usize] ; ["Offset of field: aws_s3_meta_request::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , ref_count) - 8usize] ; ["Offset of field: aws_s3_meta_request::impl_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , impl_) - 32usize] ; ["Offset of field: aws_s3_meta_request::vtable"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , vtable) - 40usize] ; ["Offset of field: aws_s3_meta_request::initial_request_message"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , initial_request_message) - 48usize] ; ["Offset of field: aws_s3_meta_request::request_body_async_stream"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , request_body_async_stream) - 56usize] ; ["Offset of field: aws_s3_meta_request::request_body_parallel_stream"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , request_body_parallel_stream) - 64usize] ; ["Offset of field: aws_s3_meta_request::request_body_using_async_writes"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , request_body_using_async_writes) - 72usize] ; ["Offset of field: aws_s3_meta_request::part_size"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , part_size) - 80usize] ; ["Offset of field: aws_s3_meta_request::max_active_connections_override"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , max_active_connections_override) - 88usize] ; ["Offset of field: aws_s3_meta_request::cached_signing_config"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , cached_signing_config) - 96usize] ; ["Offset of field: aws_s3_meta_request::client"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , client) - 104usize] ; ["Offset of field: aws_s3_meta_request::endpoint"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , endpoint) - 112usize] ; ["Offset of field: aws_s3_meta_request::num_requests_network"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , num_requests_network) - 120usize] ; ["Offset of field: aws_s3_meta_request::io_event_loop"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , io_event_loop) - 128usize] ; ["Offset of field: aws_s3_meta_request::user_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , user_data) - 136usize] ; ["Offset of field: aws_s3_meta_request::headers_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , headers_callback) - 144usize] ; ["Offset of field: aws_s3_meta_request::body_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , body_callback) - 152usize] ; ["Offset of field: aws_s3_meta_request::body_callback_ex"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , body_callback_ex) - 160usize] ; ["Offset of field: aws_s3_meta_request::finish_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , finish_callback) - 168usize] ; ["Offset of field: aws_s3_meta_request::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , shutdown_callback) - 176usize] ; ["Offset of field: aws_s3_meta_request::progress_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , progress_callback) - 184usize] ; ["Offset of field: aws_s3_meta_request::telemetry_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , telemetry_callback) - 192usize] ; ["Offset of field: aws_s3_meta_request::upload_review_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , upload_review_callback) - 200usize] ; ["Offset of field: aws_s3_meta_request::type_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , type_) - 208usize] ; ["Offset of field: aws_s3_meta_request::s3express_session_host"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , s3express_session_host) - 216usize] ; ["Offset of field: aws_s3_meta_request::is_express"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , is_express) - 224usize] ; ["Offset of field: aws_s3_meta_request::buffer_pool_optimized"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , buffer_pool_optimized) - 225usize] ; ["Offset of field: aws_s3_meta_request::num_request_being_prepared"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , num_request_being_prepared) - 232usize] ; ["Offset of field: aws_s3_meta_request::synced_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , synced_data) - 240usize] ; ["Offset of field: aws_s3_meta_request::client_process_work_threaded_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , client_process_work_threaded_data) - 704usize] ; ["Offset of field: aws_s3_meta_request::io_threaded_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , io_threaded_data) - 728usize] ; ["Offset of field: aws_s3_meta_request::should_compute_content_md5"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , should_compute_content_md5) - 784usize] ; ["Offset of field: aws_s3_meta_request::checksum_config"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , checksum_config) - 792usize] ; ["Offset of field: aws_s3_meta_request::meta_request_level_response_header_checksum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , meta_request_level_response_header_checksum) - 872usize] ; ["Offset of field: aws_s3_meta_request::meta_request_level_running_response_sum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , meta_request_level_running_response_sum) - 904usize] ; ["Offset of field: aws_s3_meta_request::recv_file"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , recv_file) - 912usize] ; ["Offset of field: aws_s3_meta_request::recv_filepath"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , recv_filepath) - 920usize] ; ["Offset of field: aws_s3_meta_request::recv_file_delete_on_failure"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , recv_file_delete_on_failure) - 928usize] ; ["Offset of field: aws_s3_meta_request::fio_opts"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , fio_opts) - 936usize] ; } ; impl Default for aws_s3_meta_request { 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)] pub struct aws_s3_mpu_part_info { pub size : u64 , pub etag : * mut aws_string , pub checksum_context : * mut aws_s3_upload_request_checksum_context , pub was_previously_uploaded : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_mpu_part_info"] [:: std :: mem :: size_of :: < aws_s3_mpu_part_info > () - 32usize] ; ["Alignment of aws_s3_mpu_part_info"] [:: std :: mem :: align_of :: < aws_s3_mpu_part_info > () - 8usize] ; ["Offset of field: aws_s3_mpu_part_info::size"] [:: std :: mem :: offset_of ! (aws_s3_mpu_part_info , size) - 0usize] ; ["Offset of field: aws_s3_mpu_part_info::etag"] [:: std :: mem :: offset_of ! (aws_s3_mpu_part_info , etag) - 8usize] ; ["Offset of field: aws_s3_mpu_part_info::checksum_context"] [:: std :: mem :: offset_of ! (aws_s3_mpu_part_info , checksum_context) - 16usize] ; ["Offset of field: aws_s3_mpu_part_info::was_previously_uploaded"] [:: std :: mem :: offset_of ! (aws_s3_mpu_part_info , was_previously_uploaded) - 24usize] ; } ; impl Default for aws_s3_mpu_part_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 () } } } unsafe extern "C" { pub fn aws_s3_meta_request_init_base (allocator : * mut aws_allocator , client : * mut aws_s3_client , part_size : usize , should_compute_content_md5 : bool , should_default_streaming : bool , options : * const aws_s3_meta_request_options , impl_ : * mut :: libc :: c_void , vtable : * mut aws_s3_meta_request_vtable , base_type : * mut aws_s3_meta_request) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_meta_request_is_active (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_is_finished (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_has_finish_result (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_lock_synced_data (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_unlock_synced_data (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_update (meta_request : * mut aws_s3_meta_request , flags : u32 , out_request : * mut * mut aws_s3_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_prepare_request (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , callback : aws_s3_meta_request_prepare_request_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_s3_meta_request_send_request (meta_request : * mut aws_s3_meta_request , connection : * mut aws_s3_connection) ; } unsafe extern "C" { pub fn aws_s3_meta_request_init_signing_date_time_default (meta_request : * mut aws_s3_meta_request , date_time : * mut aws_date_time) ; } unsafe extern "C" { pub fn aws_s3_meta_request_sign_request_default_impl (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , on_signing_complete : aws_signing_complete_fn , user_data : * mut :: libc :: c_void , disable_s3_express_signing : bool) ; } unsafe extern "C" { pub fn aws_s3_meta_request_sign_request_default (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , on_signing_complete : aws_signing_complete_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_s3_meta_request_send_request_finish_default (connection : * mut aws_s3_connection , stream : * mut aws_http_stream , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_finished_request (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_stream_response_body_synced (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_add_event_for_delivery_synced (meta_request : * mut aws_s3_meta_request , event : * const aws_s3_meta_request_event) ; } unsafe extern "C" { pub fn aws_s3_meta_request_are_events_out_for_delivery_synced (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_cancel_cancellable_requests_synced (meta_request : * mut aws_s3_meta_request , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_cancel_pending_buffer_futures_synced (meta_request : * mut aws_s3_meta_request , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_read_body (meta_request : * mut aws_s3_meta_request , offset : u64 , buffer : * mut aws_byte_buf) -> * mut aws_future_bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_set_fail_synced (meta_request : * mut aws_s3_meta_request , failed_request : * mut aws_s3_request , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_set_success_synced (meta_request : * mut aws_s3_meta_request , response_status : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_has_finish_result_synced (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_finish (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_finish_default (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_result_setup (meta_request : * mut aws_s3_meta_request , result : * mut aws_s3_meta_request_result , failed_request : * mut aws_s3_request , response_status : :: libc :: c_int , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_result_clean_up (meta_request : * mut aws_s3_meta_request , result : * mut aws_s3_meta_request_result) ; } unsafe extern "C" { pub fn aws_s3_meta_request_checksum_config_has_algorithm (meta_request : * mut aws_s3_meta_request , algorithm : aws_s3_checksum_algorithm) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_schedule_prepare_request_default_impl (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , parallel : bool , callback : aws_s3_meta_request_prepare_request_callback_fn , user_data : * mut :: libc :: c_void) ; } pub type __builtin_va_list = [__va_list_tag ; 1usize] ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct __va_list_tag { pub gp_offset : :: libc :: c_uint , pub fp_offset : :: libc :: c_uint , pub overflow_arg_area : * mut :: libc :: c_void , pub reg_save_area : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of __va_list_tag"] [:: std :: mem :: size_of :: < __va_list_tag > () - 24usize] ; ["Alignment of __va_list_tag"] [:: std :: mem :: align_of :: < __va_list_tag > () - 8usize] ; ["Offset of field: __va_list_tag::gp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , gp_offset) - 0usize] ; ["Offset of field: __va_list_tag::fp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , fp_offset) - 4usize] ; ["Offset of field: __va_list_tag::overflow_arg_area"] [:: std :: mem :: offset_of ! (__va_list_tag , overflow_arg_area) - 8usize] ; ["Offset of field: __va_list_tag::reg_save_area"] [:: std :: mem :: offset_of ! (__va_list_tag , reg_save_area) - 16usize] ; } ; impl Default for __va_list_tag { 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 = " (Optional)\n Use a cached merged profile collection. A merge collection has both config file\n (~/.aws/config) and credentials file based profile collection (~/.aws/credentials) using\n `aws_profile_collection_new_from_merge`.\n If this option is provided, `config_file_name_override` and `credentials_file_name_override` will be ignored."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_profile_collection { pub _address : u8 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_tls_ctx { pub _address : u8 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_parallel_input_stream { pub _address : u8 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_cached_signing_config_aws { pub _address : u8 , }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unclosed HTML tag `bool`
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/mountpoint-s3-crt-sys-ba8805edaea6a745/out/bindings.rs:5:165451
[INFO] [stdout]   |
[INFO] [stdout] 5 | ...re_bool) -> bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_acqu...
[INFO] [stdout]   |                                                                  ^^^^^^
[INFO] [stdout]   |
[INFO] [stdout] help: try marking as source code
[INFO] [stdout]   |
[INFO] [stdout] 5 | # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > where Storage : AsRef < [u8] > + AsMut < [u8] >, { # [inline] fn extract_bit (byte : u8 , index : usize) -> bool { let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn get_bit (& self , index : usize) -> bool { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = self . storage . as_ref () [byte_index] ; Self :: extract_bit (byte , index) } # [inline] pub unsafe fn raw_get_bit (this : * const Self , index : usize) -> bool { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { * (core :: ptr :: addr_of ! ((* this) . storage) as * const u8) . offset (byte_index as isize) } ; Self :: extract_bit (byte , index) } # [inline] fn change_bit (byte : u8 , index : usize , val : bool) -> u8 { let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { byte | mask } else { byte & ! mask } } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; * byte = Self :: change_bit (* byte , index , val) ; } # [inline] pub unsafe fn raw_set_bit (this : * mut Self , index : usize , val : bool) { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { (core :: ptr :: addr_of_mut ! ((* this) . storage) as * mut u8) . offset (byte_index as isize) } ; unsafe { * byte = Self :: change_bit (* byte , index , val) } ; } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; val |= 1 << index ; } } val } # [inline] pub unsafe fn raw_get (this : * const Self , bit_offset : usize , bit_width : u8 ,) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if unsafe { Self :: raw_get_bit (this , i + bit_offset) } { let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; val |= 1 << index ; } } val } # [inline] pub fn set (& mut self , bit_offset : usize , bit_width : u8 , val : u64) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } # [inline] pub unsafe fn raw_set (this : * mut Self , bit_offset : usize , bit_width : u8 , val : u64 ,) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; unsafe { Self :: raw_set_bit (this , index + bit_offset , val_bit_is_set) } ; } } } pub const PRInSTR : & [u8 ; 5] = b"%.*s\0" ; pub const AWS_PACKAGE_SLOTS : i32 = 32 ; pub const AWS_C_COMMON_PACKAGE_ID : i32 = 0 ; pub const AWS_OP_SUCCESS : i32 = 0 ; pub const AWS_OP_ERR : i32 = - 1 ; pub const AWS_ERROR_ENUM_STRIDE_BITS : i32 = 10 ; pub const AWS_ERROR_ENUM_STRIDE : i32 = 1024 ; pub const SIZE_BITS : i32 = 64 ; pub const AWS_C_IO_PACKAGE_ID : i32 = 1 ; pub const AWS_THREAD_NAME_RECOMMENDED_STRLEN : i32 = 15 ; pub const AWS_THREAD_ONCE_STATIC_INIT : i32 = 0 ; pub const AWS_LOG_LEVEL_NONE : i32 = 0 ; pub const AWS_LOG_LEVEL_FATAL : i32 = 1 ; pub const AWS_LOG_LEVEL_ERROR : i32 = 2 ; pub const AWS_LOG_LEVEL_WARN : i32 = 3 ; pub const AWS_LOG_LEVEL_INFO : i32 = 4 ; pub const AWS_LOG_LEVEL_DEBUG : i32 = 5 ; pub const AWS_LOG_LEVEL_TRACE : i32 = 6 ; pub const AWS_C_SDKUTILS_PACKAGE_ID : i32 = 15 ; pub const AWS_C_AUTH_PACKAGE_ID : i32 = 6 ; pub const AWS_C_HTTP_PACKAGE_ID : i32 = 2 ; pub const AWS_SHA512_LEN : i32 = 64 ; pub const AWS_SHA256_LEN : i32 = 32 ; pub const AWS_SHA1_LEN : i32 = 20 ; pub const AWS_MD5_LEN : i32 = 16 ; pub const AWS_HTTP2_DEFAULT_MAX_CLOSED_STREAMS : i32 = 32 ; pub const AWS_HTTP2_PING_DATA_SIZE : i32 = 8 ; pub const AWS_HTTP2_SETTINGS_COUNT : i32 = 6 ; pub const AWS_C_S3_PACKAGE_ID : i32 = 14 ; pub const AWS_S3_CLIENT_VERSION : & [u8 ; 6] = b"0.1.x\0" ; pub const AWS_CACHE_LINE : _bindgen_ty_18 = _bindgen_ty_18 :: AWS_CACHE_LINE ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_18 { AWS_CACHE_LINE = 64 , } pub type __gnuc_va_list = __builtin_va_list ; pub type va_list = __gnuc_va_list ; unsafe extern "C" { pub fn aws_fatal_assert (cond_str : * const :: libc :: c_char , file : * const :: libc :: c_char , line : :: libc :: c_int) -> ! ; } pub type pthread_once_t = :: libc :: 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)] pub struct aws_allocator { pub mem_acquire : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , size : usize) -> * mut :: libc :: c_void > , pub mem_release : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , ptr : * mut :: libc :: c_void) > , pub mem_realloc : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , oldptr : * mut :: libc :: c_void , oldsize : usize , newsize : usize) -> * mut :: libc :: c_void > , pub mem_calloc : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , num : usize , size : usize) -> * mut :: libc :: c_void > , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_allocator"] [:: std :: mem :: size_of :: < aws_allocator > () - 40usize] ; ["Alignment of aws_allocator"] [:: std :: mem :: align_of :: < aws_allocator > () - 8usize] ; ["Offset of field: aws_allocator::mem_acquire"] [:: std :: mem :: offset_of ! (aws_allocator , mem_acquire) - 0usize] ; ["Offset of field: aws_allocator::mem_release"] [:: std :: mem :: offset_of ! (aws_allocator , mem_release) - 8usize] ; ["Offset of field: aws_allocator::mem_realloc"] [:: std :: mem :: offset_of ! (aws_allocator , mem_realloc) - 16usize] ; ["Offset of field: aws_allocator::mem_calloc"] [:: std :: mem :: offset_of ! (aws_allocator , mem_calloc) - 24usize] ; ["Offset of field: aws_allocator::impl_"] [:: std :: mem :: offset_of ! (aws_allocator , impl_) - 32usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Inexpensive (constant time) check of data-structure invariants."] pub fn aws_allocator_is_valid (alloc : * const aws_allocator) -> bool ; } unsafe extern "C" { pub fn aws_default_allocator () -> * mut aws_allocator ; } unsafe extern "C" { pub fn aws_aligned_allocator () -> * mut aws_allocator ; } unsafe 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\n NULL. In later versions, if allocator->mem_acquire() returns NULL, this function will assert and exit. To handle\n conditions where OOM is not a fatal error, allocator->mem_acquire() is responsible for finding/reclaiming/running a\n GC etc...before returning."] pub fn aws_mem_acquire (allocator : * mut aws_allocator , size : usize) -> * mut :: libc :: c_void ; } unsafe 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\n to zero. In versions v0.6.8 and prior, this function was allowed to return NULL.\n In later versions, if allocator->mem_calloc() returns NULL, this function will assert and exit. To handle\n conditions where OOM is not a fatal error, allocator->mem_calloc() is responsible for finding/reclaiming/running a\n GC etc...before returning."] pub fn aws_mem_calloc (allocator : * mut aws_allocator , num : usize , size : usize) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Allocates many chunks of bytes into a single block. Expects to be called with alternating void ** (dest), size_t\n (size). The first void ** will be set to the root of the allocation. Alignment is assumed to be sizeof(intmax_t).\n\n This is useful for allocating structs using the pimpl pattern, as you may allocate the public object and impl object\n in the same contiguous block of memory.\n\n Returns a pointer to the allocation.\n\n In versions v0.6.8 and prior, this function was allowed to return\n NULL. In later versions, if allocator->mem_acquire() returns NULL, this function will assert and exit. To handle\n conditions where OOM is not a fatal error, allocator->mem_acquire() is responsible for finding/reclaiming/running a\n GC etc...before returning."] pub fn aws_mem_acquire_many (allocator : * mut aws_allocator , count : usize , ...) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Releases ptr back to whatever allocated it.\n Nothing happens if ptr is NULL."] pub fn aws_mem_release (allocator : * mut aws_allocator , ptr : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Attempts to adjust the size of the pointed-to memory buffer from oldsize to\n newsize. The pointer (*ptr) may be changed if the memory needs to be\n reallocated.\n\n In versions v0.6.8 and prior, this function was allowed to return\n NULL. In later versions, if allocator->mem_realloc() returns NULL, this function will assert and exit. To handle\n conditions where OOM is not a fatal error, allocator->mem_realloc() is responsible for finding/reclaiming/running a\n GC etc...before returning."] pub fn aws_mem_realloc (allocator : * mut aws_allocator , ptr : * mut * mut :: libc :: c_void , oldsize : usize , newsize : usize) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_mem_trace_level { AWS_MEMTRACE_NONE = 0 , AWS_MEMTRACE_BYTES = 1 , AWS_MEMTRACE_STACKS = 2 , } unsafe 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 ; } unsafe extern "C" { pub fn aws_mem_tracer_destroy (trace_allocator : * mut aws_allocator) -> * mut aws_allocator ; } unsafe extern "C" { pub fn aws_mem_tracer_dump (trace_allocator : * mut aws_allocator) ; } unsafe extern "C" { pub fn aws_mem_tracer_bytes (trace_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_mem_tracer_count (trace_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_small_block_allocator_new (allocator : * mut aws_allocator , multi_threaded : bool) -> * mut aws_allocator ; } unsafe extern "C" { pub fn aws_small_block_allocator_destroy (sba_allocator : * mut aws_allocator) ; } unsafe extern "C" { pub fn aws_small_block_allocator_bytes_active (sba_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_small_block_allocator_bytes_reserved (sba_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_small_block_allocator_page_size (sba_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_small_block_allocator_page_size_available (sba_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_explicit_aligned_allocator_new (alignment : usize) -> * mut aws_allocator ; } unsafe extern "C" { pub fn aws_explicit_aligned_allocator_destroy (aligned_alloc : * mut aws_allocator) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_error_info { pub error_code : :: libc :: c_int , pub literal_name : * const :: libc :: c_char , pub error_str : * const :: libc :: c_char , pub lib_name : * const :: libc :: c_char , pub formatted_name : * const :: libc :: c_char , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_error_info"] [:: std :: mem :: size_of :: < aws_error_info > () - 40usize] ; ["Alignment of aws_error_info"] [:: std :: mem :: align_of :: < aws_error_info > () - 8usize] ; ["Offset of field: aws_error_info::error_code"] [:: std :: mem :: offset_of ! (aws_error_info , error_code) - 0usize] ; ["Offset of field: aws_error_info::literal_name"] [:: std :: mem :: offset_of ! (aws_error_info , literal_name) - 8usize] ; ["Offset of field: aws_error_info::error_str"] [:: std :: mem :: offset_of ! (aws_error_info , error_str) - 16usize] ; ["Offset of field: aws_error_info::lib_name"] [:: std :: mem :: offset_of ! (aws_error_info , lib_name) - 24usize] ; ["Offset of field: aws_error_info::formatted_name"] [:: std :: mem :: offset_of ! (aws_error_info , formatted_name) - 32usize] ; } ; 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)] pub struct aws_error_info_list { pub error_list : * const aws_error_info , pub count : u16 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_error_info_list"] [:: std :: mem :: size_of :: < aws_error_info_list > () - 16usize] ; ["Alignment of aws_error_info_list"] [:: std :: mem :: align_of :: < aws_error_info_list > () - 8usize] ; ["Offset of field: aws_error_info_list::error_list"] [:: std :: mem :: offset_of ! (aws_error_info_list , error_list) - 0usize] ; ["Offset of field: aws_error_info_list::count"] [:: std :: mem :: offset_of ! (aws_error_info_list , count) - 8usize] ; } ; 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 : :: libc :: c_int , ctx : * mut :: libc :: c_void) > ; unsafe extern "C" { pub fn aws_last_error () -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_error_str (err : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { pub fn aws_error_name (err : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { pub fn aws_error_lib_name (err : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { pub fn aws_error_debug_str (err : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { pub fn aws_raise_error_private (err : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_raise_error (err : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_reset_error () ; } unsafe extern "C" { pub fn aws_restore_error (err : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_set_global_error_handler_fn (handler : aws_error_handler_fn , ctx : * mut :: libc :: c_void) -> aws_error_handler_fn ; } unsafe extern "C" { pub fn aws_set_thread_local_error_handler_fn (handler : aws_error_handler_fn , ctx : * mut :: libc :: c_void) -> aws_error_handler_fn ; } unsafe extern "C" { # [doc = " TODO: this needs to be a private function (wait till we have the cmake story\n better before moving it though). It should be external for the purpose of\n other libs we own, but customers should not be able to hit it without going\n out of their way to do so."] pub fn aws_register_error_info (error_info : * const aws_error_info_list) ; } unsafe extern "C" { pub fn aws_unregister_error_info (error_info : * const aws_error_info_list) ; } unsafe extern "C" { # [doc = " Convert a c library io error into an aws error, and raise it.\n If no conversion is found, fallback_aws_error_code is raised.\n Always returns AWS_OP_ERR."] pub fn aws_translate_and_raise_io_error_or (error_no : :: libc :: c_int , fallback_aws_error_code : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Convert a c library io error into an aws error, and raise it.\n If no conversion is found, AWS_ERROR_SYS_CALL_FAILURE is raised.\n Always returns AWS_OP_ERR."] pub fn aws_translate_and_raise_io_error (error_no : :: libc :: c_int) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_common_error { AWS_ERROR_SUCCESS = 0 , AWS_ERROR_OOM = 1 , AWS_ERROR_NO_SPACE = 2 , AWS_ERROR_UNKNOWN = 3 , AWS_ERROR_SHORT_BUFFER = 4 , AWS_ERROR_OVERFLOW_DETECTED = 5 , AWS_ERROR_UNSUPPORTED_OPERATION = 6 , AWS_ERROR_INVALID_BUFFER_SIZE = 7 , AWS_ERROR_INVALID_HEX_STR = 8 , AWS_ERROR_INVALID_BASE64_STR = 9 , AWS_ERROR_INVALID_INDEX = 10 , AWS_ERROR_THREAD_INVALID_SETTINGS = 11 , AWS_ERROR_THREAD_INSUFFICIENT_RESOURCE = 12 , AWS_ERROR_THREAD_NO_PERMISSIONS = 13 , AWS_ERROR_THREAD_NOT_JOINABLE = 14 , AWS_ERROR_THREAD_NO_SUCH_THREAD_ID = 15 , AWS_ERROR_THREAD_DEADLOCK_DETECTED = 16 , AWS_ERROR_MUTEX_NOT_INIT = 17 , AWS_ERROR_MUTEX_TIMEOUT = 18 , AWS_ERROR_MUTEX_CALLER_NOT_OWNER = 19 , AWS_ERROR_MUTEX_FAILED = 20 , AWS_ERROR_COND_VARIABLE_INIT_FAILED = 21 , AWS_ERROR_COND_VARIABLE_TIMED_OUT = 22 , AWS_ERROR_COND_VARIABLE_ERROR_UNKNOWN = 23 , AWS_ERROR_CLOCK_FAILURE = 24 , AWS_ERROR_LIST_EMPTY = 25 , AWS_ERROR_DEST_COPY_TOO_SMALL = 26 , AWS_ERROR_LIST_EXCEEDS_MAX_SIZE = 27 , AWS_ERROR_LIST_STATIC_MODE_CANT_SHRINK = 28 , AWS_ERROR_PRIORITY_QUEUE_FULL = 29 , AWS_ERROR_PRIORITY_QUEUE_EMPTY = 30 , AWS_ERROR_PRIORITY_QUEUE_BAD_NODE = 31 , AWS_ERROR_HASHTBL_ITEM_NOT_FOUND = 32 , AWS_ERROR_INVALID_DATE_STR = 33 , AWS_ERROR_INVALID_ARGUMENT = 34 , AWS_ERROR_RANDOM_GEN_FAILED = 35 , AWS_ERROR_MALFORMED_INPUT_STRING = 36 , AWS_ERROR_UNIMPLEMENTED = 37 , AWS_ERROR_INVALID_STATE = 38 , AWS_ERROR_ENVIRONMENT_GET = 39 , AWS_ERROR_ENVIRONMENT_SET = 40 , AWS_ERROR_ENVIRONMENT_UNSET = 41 , AWS_ERROR_STREAM_UNSEEKABLE = 42 , AWS_ERROR_NO_PERMISSION = 43 , AWS_ERROR_FILE_INVALID_PATH = 44 , AWS_ERROR_MAX_FDS_EXCEEDED = 45 , AWS_ERROR_SYS_CALL_FAILURE = 46 , AWS_ERROR_C_STRING_BUFFER_NOT_NULL_TERMINATED = 47 , AWS_ERROR_STRING_MATCH_NOT_FOUND = 48 , AWS_ERROR_DIVIDE_BY_ZERO = 49 , AWS_ERROR_INVALID_FILE_HANDLE = 50 , AWS_ERROR_OPERATION_INTERUPTED = 51 , AWS_ERROR_DIRECTORY_NOT_EMPTY = 52 , AWS_ERROR_PLATFORM_NOT_SUPPORTED = 53 , AWS_ERROR_INVALID_UTF8 = 54 , AWS_ERROR_GET_HOME_DIRECTORY_FAILED = 55 , AWS_ERROR_INVALID_XML = 56 , AWS_ERROR_FILE_OPEN_FAILURE = 57 , AWS_ERROR_FILE_READ_FAILURE = 58 , AWS_ERROR_FILE_WRITE_FAILURE = 59 , AWS_ERROR_INVALID_CBOR = 60 , AWS_ERROR_CBOR_UNEXPECTED_TYPE = 61 , AWS_ERROR_END_COMMON_RANGE = 1023 , } unsafe extern "C" { # [doc = " Returns whether each byte is zero."] pub fn aws_is_mem_zeroed (buf : * const :: libc :: c_void , bufsize : usize) -> bool ; } unsafe extern "C" { # [doc = " Securely zeroes a memory buffer. This function will attempt to ensure that\n the compiler will not optimize away this zeroing operation."] pub fn aws_secure_zero (pBuf : * mut :: libc :: c_void , bufsize : usize) ; } unsafe extern "C" { # [doc = " Initializes internal data structures used by aws-c-common.\n Must be called before using any functionality in aws-c-common."] pub fn aws_common_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Shuts down the internal data structures used by aws-c-common."] pub fn aws_common_library_clean_up () ; } unsafe extern "C" { pub fn aws_common_fatal_assert_library_initialized () ; } unsafe extern "C" { # [doc = " Multiplies a * b. If the result overflows, returns 2^64 - 1."] pub fn aws_mul_u64_saturating (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { # [doc = " If a * b overflows, returns AWS_OP_ERR; otherwise multiplies\n a * b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_mul_u64_checked (a : u64 , b : u64 , r : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Multiplies a * b. If the result overflows, returns 2^32 - 1."] pub fn aws_mul_u32_saturating (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { # [doc = " If a * b overflows, returns AWS_OP_ERR; otherwise multiplies\n a * b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_mul_u32_checked (a : u32 , b : u32 , r : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Adds a + b.  If the result overflows returns 2^64 - 1."] pub fn aws_add_u64_saturating (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { # [doc = " If a + b overflows, returns AWS_OP_ERR; otherwise adds\n a + b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_add_u64_checked (a : u64 , b : u64 , r : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Adds a + b. If the result overflows returns 2^32 - 1."] pub fn aws_add_u32_saturating (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { # [doc = " If a + b overflows, returns AWS_OP_ERR; otherwise adds\n a + b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_add_u32_checked (a : u32 , b : u32 , r : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Subtracts a - b. If the result overflows returns 0."] pub fn aws_sub_u64_saturating (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { # [doc = " If a - b overflows, returns AWS_OP_ERR; otherwise subtracts\n a - b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_sub_u64_checked (a : u64 , b : u64 , r : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Subtracts a - b. If the result overflows returns 0."] pub fn aws_sub_u32_saturating (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { # [doc = " If a - b overflows, returns AWS_OP_ERR; otherwise subtracts\n a - b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_sub_u32_checked (a : u32 , b : u32 , r : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Multiplies a * b. If the result overflows, returns SIZE_MAX."] pub fn aws_mul_size_saturating (a : usize , b : usize) -> usize ; } unsafe extern "C" { # [doc = " Multiplies a * b and returns the result in *r. If the result\n overflows, returns AWS_OP_ERR; otherwise returns AWS_OP_SUCCESS."] pub fn aws_mul_size_checked (a : usize , b : usize , r : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Adds a + b.  If the result overflows returns SIZE_MAX."] pub fn aws_add_size_saturating (a : usize , b : usize) -> usize ; } unsafe extern "C" { # [doc = " Adds a + b and returns the result in *r. If the result\n overflows, returns AWS_OP_ERR; otherwise returns AWS_OP_SUCCESS."] pub fn aws_add_size_checked (a : usize , b : usize , r : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Adds [num] arguments (expected to be of size_t), and returns the result in *r.\n 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 , ...) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Subtracts a - b. If the result overflows returns 0."] pub fn aws_sub_size_saturating (a : usize , b : usize) -> usize ; } unsafe extern "C" { # [doc = " If a - b overflows, returns AWS_OP_ERR; otherwise subtracts\n a - b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_sub_size_checked (a : usize , b : usize , r : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Function to check if x is power of 2"] pub fn aws_is_power_of_two (x : usize) -> bool ; } unsafe extern "C" { # [doc = " Function to find the smallest result that is power of 2 >= n. Returns AWS_OP_ERR if this cannot\n be done without overflow"] pub fn aws_round_up_to_power_of_two (n : usize , result : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Counts the number of leading 0 bits in an integer. 0 will return the size of the integer in bits."] pub fn aws_clz_u32 (n : u32) -> usize ; } unsafe extern "C" { pub fn aws_clz_i32 (n : i32) -> usize ; } unsafe extern "C" { pub fn aws_clz_u64 (n : u64) -> usize ; } unsafe extern "C" { pub fn aws_clz_i64 (n : i64) -> usize ; } unsafe extern "C" { pub fn aws_clz_size (n : usize) -> usize ; } unsafe extern "C" { # [doc = " Counts the number of trailing 0 bits in an integer. 0 will return the size of the integer in bits."] pub fn aws_ctz_u32 (n : u32) -> usize ; } unsafe extern "C" { pub fn aws_ctz_i32 (n : i32) -> usize ; } unsafe extern "C" { pub fn aws_ctz_u64 (n : u64) -> usize ; } unsafe extern "C" { pub fn aws_ctz_i64 (n : i64) -> usize ; } unsafe extern "C" { pub fn aws_ctz_size (n : usize) -> usize ; } unsafe extern "C" { pub fn aws_min_u8 (a : u8 , b : u8) -> u8 ; } unsafe extern "C" { pub fn aws_max_u8 (a : u8 , b : u8) -> u8 ; } unsafe extern "C" { pub fn aws_min_i8 (a : i8 , b : i8) -> i8 ; } unsafe extern "C" { pub fn aws_max_i8 (a : i8 , b : i8) -> i8 ; } unsafe extern "C" { pub fn aws_min_u16 (a : u16 , b : u16) -> u16 ; } unsafe extern "C" { pub fn aws_max_u16 (a : u16 , b : u16) -> u16 ; } unsafe extern "C" { pub fn aws_min_i16 (a : i16 , b : i16) -> i16 ; } unsafe extern "C" { pub fn aws_max_i16 (a : i16 , b : i16) -> i16 ; } unsafe extern "C" { pub fn aws_min_u32 (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { pub fn aws_max_u32 (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { pub fn aws_min_i32 (a : i32 , b : i32) -> i32 ; } unsafe extern "C" { pub fn aws_max_i32 (a : i32 , b : i32) -> i32 ; } unsafe extern "C" { pub fn aws_min_u64 (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { pub fn aws_max_u64 (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { pub fn aws_min_i64 (a : i64 , b : i64) -> i64 ; } unsafe extern "C" { pub fn aws_max_i64 (a : i64 , b : i64) -> i64 ; } unsafe extern "C" { pub fn aws_min_size (a : usize , b : usize) -> usize ; } unsafe extern "C" { pub fn aws_max_size (a : usize , b : usize) -> usize ; } unsafe extern "C" { pub fn aws_min_int (a : :: libc :: c_int , b : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_max_int (a : :: libc :: c_int , b : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_min_float (a : f32 , b : f32) -> f32 ; } unsafe extern "C" { pub fn aws_max_float (a : f32 , b : f32) -> f32 ; } unsafe extern "C" { pub fn aws_min_double (a : f64 , b : f64) -> f64 ; } unsafe extern "C" { pub fn aws_max_double (a : f64 , b : f64) -> f64 ; } pub const AWS_ARRAY_LIST_DEBUG_FILL : _bindgen_ty_19 = _bindgen_ty_19 :: AWS_ARRAY_LIST_DEBUG_FILL ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_19 { AWS_ARRAY_LIST_DEBUG_FILL = 221 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_array_list { pub alloc : * mut aws_allocator , pub current_size : usize , pub length : usize , pub item_size : usize , pub data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_array_list"] [:: std :: mem :: size_of :: < aws_array_list > () - 40usize] ; ["Alignment of aws_array_list"] [:: std :: mem :: align_of :: < aws_array_list > () - 8usize] ; ["Offset of field: aws_array_list::alloc"] [:: std :: mem :: offset_of ! (aws_array_list , alloc) - 0usize] ; ["Offset of field: aws_array_list::current_size"] [:: std :: mem :: offset_of ! (aws_array_list , current_size) - 8usize] ; ["Offset of field: aws_array_list::length"] [:: std :: mem :: offset_of ! (aws_array_list , length) - 16usize] ; ["Offset of field: aws_array_list::item_size"] [:: std :: mem :: offset_of ! (aws_array_list , item_size) - 24usize] ; ["Offset of field: aws_array_list::data"] [:: std :: mem :: offset_of ! (aws_array_list , data) - 32usize] ; } ; 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.\n\n a and b should be cast to pointers to the element type held in the list\n before being dereferenced. The function should compare the elements and\n return a positive number if a > b, zero if a = b, and a negative number\n if a < b."] pub type aws_array_list_comparator_fn = :: std :: option :: Option < unsafe extern "C" fn (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> :: libc :: c_int > ; unsafe extern "C" { # [doc = " Initializes an array list with an array of size initial_item_allocation * item_size. In this mode, the array size\n will grow by a factor of 2 upon insertion if space is not available. initial_item_allocation is the number of\n elements you want space allocated for. item_size is the size of each element in bytes. Mixing items types is not\n supported by this API."] pub fn aws_array_list_init_dynamic (list : * mut aws_array_list , alloc : * mut aws_allocator , initial_item_allocation : usize , item_size : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes an array list with a preallocated array of void *. item_count is the number of elements in the array,\n and item_size is the size in bytes of each element. Mixing items types is not supported\n by this API. Once this list is full, new items will be rejected."] pub fn aws_array_list_init_static (list : * mut aws_array_list , raw_array : * mut :: libc :: c_void , item_count : usize , item_size : usize) ; } unsafe extern "C" { # [doc = " Initializes an array list with a preallocated array of *already-initialized* elements. item_count is the number of\n elements in the array, and item_size is the size in bytes of each element.\n\n Once initialized, nothing further can be added to the list, since it will be full and cannot resize.\n\n Primary use case is to treat an already-initialized C array as an array list."] pub fn aws_array_list_init_static_from_initialized (list : * mut aws_array_list , raw_array : * mut :: libc :: c_void , item_count : usize , item_size : usize) ; } unsafe extern "C" { # [doc = " Set of properties of a valid aws_array_list."] pub fn aws_array_list_is_valid (list : * const aws_array_list) -> bool ; } unsafe extern "C" { # [doc = " Deallocates any memory that was allocated for this list, and resets list for reuse or deletion."] pub fn aws_array_list_clean_up (list : * mut aws_array_list) ; } unsafe extern "C" { # [doc = " Erases and then deallocates any memory that was allocated for this list, and resets list for reuse or deletion."] pub fn aws_array_list_clean_up_secure (list : * mut aws_array_list) ; } unsafe extern "C" { # [doc = " Pushes the memory pointed to by val onto the end of internal list"] pub fn aws_array_list_push_back (list : * mut aws_array_list , val : * const :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the element at the front of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised"] pub fn aws_array_list_front (list : * const aws_array_list , val : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Pushes the memory pointed to by val onto the front of internal list.\n This call results in shifting all of the elements in the list. Avoid this call unless that\n is intended behavior."] pub fn aws_array_list_push_front (list : * mut aws_array_list , val : * const :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Deletes the element at the front of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised.\n This call results in shifting all of the elements at the end of the array to the front. Avoid this call unless that\n is intended behavior."] pub fn aws_array_list_pop_front (list : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Delete N elements from the front of the list.\n Remaining elements are shifted to the front of the list.\n If the list has less than N elements, the list is cleared.\n This call is more efficient than calling aws_array_list_pop_front() N times."] pub fn aws_array_list_pop_front_n (list : * mut aws_array_list , n : usize) ; } unsafe extern "C" { # [doc = " Deletes the element this index in the list if it exists.\n If element does not exist, AWS_ERROR_INVALID_INDEX will be raised.\n This call results in shifting all remaining elements towards the front.\n Avoid this call unless that is intended behavior."] pub fn aws_array_list_erase (list : * mut aws_array_list , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the element at the end of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised."] pub fn aws_array_list_back (list : * const aws_array_list , val : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Deletes the element at the end of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised."] pub fn aws_array_list_pop_back (list : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Clears all elements in the array and resets length to zero. Size does not change in this operation."] pub fn aws_array_list_clear (list : * mut aws_array_list) ; } unsafe 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) -> :: libc :: c_int ; } unsafe 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\n in to will be overwritten in this copy."] pub fn aws_array_list_copy (from : * const aws_array_list , to : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Swap contents between two dynamic lists. Both lists must use the same allocator."] pub fn aws_array_list_swap_contents (list_a : * mut aws_array_list , list_b : * mut aws_array_list) ; } unsafe extern "C" { # [doc = " Returns the number of elements that can fit in the internal array. If list is initialized in dynamic mode,\n the capacity changes over time."] pub fn aws_array_list_capacity (list : * const aws_array_list) -> usize ; } unsafe extern "C" { # [doc = " Returns the number of elements in the internal array."] pub fn aws_array_list_length (list : * const aws_array_list) -> usize ; } unsafe extern "C" { # [doc = " Copies the memory at index to val. If element does not exist, AWS_ERROR_INVALID_INDEX will be raised."] pub fn aws_array_list_get_at (list : * const aws_array_list , val : * mut :: libc :: c_void , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the memory address of the element at index to *val. If element does not exist, AWS_ERROR_INVALID_INDEX will be\n raised."] pub fn aws_array_list_get_at_ptr (list : * const aws_array_list , val : * mut * mut :: libc :: c_void , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Ensures that the array list has enough capacity to store a value at the specified index. If there is not already\n enough capacity, and the list is in dynamic mode, this function will attempt to allocate more memory, expanding the\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the the memory pointed to by val into the array at index. If in dynamic mode, the size will grow by a factor\n of two when the array is full. In static mode, AWS_ERROR_INVALID_INDEX will be raised if the index is past the bounds\n of the array."] pub fn aws_array_list_set_at (list : * mut aws_array_list , val : * const :: libc :: c_void , index : usize) -> :: libc :: c_int ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Sort elements in the list in-place according to the comparator function."] pub fn aws_array_list_sort (list : * mut aws_array_list , compare_fn : aws_array_list_comparator_fn) ; } unsafe extern "C" { # [doc = " Returns 1 if machine is big endian, 0 if little endian.\n If you compile with even -O1 optimization, this check is completely optimized\n out at compile time and code which calls \"if (aws_is_big_endian())\" will do\n the right thing without branching."] pub fn aws_is_big_endian () -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Convert 64 bit integer from host to network byte order."] pub fn aws_hton64 (x : u64) -> u64 ; } unsafe extern "C" { # [doc = " Convert 64 bit integer from network to host byte order."] pub fn aws_ntoh64 (x : u64) -> u64 ; } unsafe extern "C" { # [doc = " Convert 32 bit integer from host to network byte order."] pub fn aws_hton32 (x : u32) -> u32 ; } unsafe extern "C" { # [doc = " Convert 32 bit float from host to network byte order."] pub fn aws_htonf32 (x : f32) -> f32 ; } unsafe extern "C" { # [doc = " Convert 64 bit double from host to network byte order."] pub fn aws_htonf64 (x : f64) -> f64 ; } unsafe extern "C" { # [doc = " Convert 32 bit integer from network to host byte order."] pub fn aws_ntoh32 (x : u32) -> u32 ; } unsafe extern "C" { # [doc = " Convert 32 bit float from network to host byte order."] pub fn aws_ntohf32 (x : f32) -> f32 ; } unsafe extern "C" { # [doc = " Convert 32 bit float from network to host byte order."] pub fn aws_ntohf64 (x : f64) -> f64 ; } unsafe extern "C" { # [doc = " Convert 16 bit integer from host to network byte order."] pub fn aws_hton16 (x : u16) -> u16 ; } unsafe extern "C" { # [doc = " Convert 16 bit integer from network to host byte order."] pub fn aws_ntoh16 (x : u16) -> u16 ; } # [doc = " Represents a length-delimited binary string or buffer. If byte buffer points\n to constant memory or memory that should otherwise not be freed by this\n struct, set allocator to NULL and free function will be a no-op.\n\n This structure used to define the output for all functions that write to a buffer.\n\n Note that this structure allocates memory at the buffer pointer only. The\n struct itself does not get dynamically allocated and must be either\n maintained or copied to avoid losing access to the memory."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_byte_buf { pub len : usize , pub buffer : * mut u8 , pub capacity : usize , pub allocator : * mut aws_allocator , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_byte_buf"] [:: std :: mem :: size_of :: < aws_byte_buf > () - 32usize] ; ["Alignment of aws_byte_buf"] [:: std :: mem :: align_of :: < aws_byte_buf > () - 8usize] ; ["Offset of field: aws_byte_buf::len"] [:: std :: mem :: offset_of ! (aws_byte_buf , len) - 0usize] ; ["Offset of field: aws_byte_buf::buffer"] [:: std :: mem :: offset_of ! (aws_byte_buf , buffer) - 8usize] ; ["Offset of field: aws_byte_buf::capacity"] [:: std :: mem :: offset_of ! (aws_byte_buf , capacity) - 16usize] ; ["Offset of field: aws_byte_buf::allocator"] [:: std :: mem :: offset_of ! (aws_byte_buf , allocator) - 24usize] ; } ; 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.\n\n This structure is used to define buffers for reading."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_byte_cursor { pub len : usize , pub ptr : * mut u8 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_byte_cursor"] [:: std :: mem :: size_of :: < aws_byte_cursor > () - 16usize] ; ["Alignment of aws_byte_cursor"] [:: std :: mem :: align_of :: < aws_byte_cursor > () - 8usize] ; ["Offset of field: aws_byte_cursor::len"] [:: std :: mem :: offset_of ! (aws_byte_cursor , len) - 0usize] ; ["Offset of field: aws_byte_cursor::ptr"] [:: std :: mem :: offset_of ! (aws_byte_cursor , ptr) - 8usize] ; } ; 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 > ; unsafe extern "C" { # [doc = " Compare two arrays.\n Return whether their contents are equivalent.\n NULL may be passed as the array pointer if its length is declared to be 0."] pub fn aws_array_eq (array_a : * const :: libc :: c_void , len_a : usize , array_b : * const :: libc :: c_void , len_b : usize) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of two arrays.\n Return whether their contents are equivalent.\n NULL may be passed as the array pointer if its length is declared to be 0.\n The \"C\" locale is used for comparing upper and lowercase letters.\n Data is assumed to be ASCII text, UTF-8 will work fine too."] pub fn aws_array_eq_ignore_case (array_a : * const :: libc :: c_void , len_a : usize , array_b : * const :: libc :: c_void , len_b : usize) -> bool ; } unsafe extern "C" { # [doc = " Compare an array and a null-terminated string.\n Returns true if their contents are equivalent.\n The array should NOT contain a null-terminator, or the comparison will always return false.\n 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 :: libc :: c_void , array_len : usize , c_str : * const :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of an array and a null-terminated string.\n Return whether their contents are equivalent.\n The array should NOT contain a null-terminator, or the comparison will always return false.\n NULL may be passed as the array pointer if its length is declared to be 0.\n The \"C\" locale is used for comparing upper and lowercase letters.\n Data is assumed to be ASCII text, UTF-8 will work fine too."] pub fn aws_array_eq_c_str_ignore_case (array : * const :: libc :: c_void , array_len : usize , c_str : * const :: libc :: c_char) -> bool ; } unsafe extern "C" { pub fn aws_byte_buf_init (buf : * mut aws_byte_buf , allocator : * mut aws_allocator , capacity : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes an aws_byte_buf structure base on another valid one.\n Requires: *src and *allocator are valid objects.\n Ensures: *dest is a valid aws_byte_buf with a new backing array dest->buffer\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Reads 'filename' into 'out_buf'. If successful, 'out_buf' is allocated and filled with the data;\n It is your responsibility to call 'aws_byte_buf_clean_up()' on it. Otherwise, 'out_buf' remains\n unused. In the very unfortunate case where some API needs to treat out_buf as a c_string, a null terminator\n 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 :: libc :: c_char) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Same as aws_byte_buf_init_from_file(), but for reading \"special files\" like /proc/cpuinfo.\n These files don't accurately report their size, so size_hint is used as initial buffer size,\n and the buffer grows until the while file is read."] pub fn aws_byte_buf_init_from_file_with_size_hint (out_buf : * mut aws_byte_buf , alloc : * mut aws_allocator , filename : * const :: libc :: c_char , size_hint : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Evaluates the set of properties that define the shape of all valid aws_byte_buf structures.\n 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 ; } unsafe extern "C" { # [doc = " Evaluates the set of properties that define the shape of all valid aws_byte_cursor structures.\n 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 ; } unsafe extern "C" { # [doc = " Copies src buffer into dest and sets the correct len and capacity.\n A new memory zone is allocated for dest->buffer. When dest is no longer needed it will have to be cleaned-up using\n aws_byte_buf_clean_up(dest).\n Dest capacity and len will be equal to the src len. Allocator of the dest will be identical with parameter allocator.\n If src buffer is null the dest will have a null buffer with a len and a capacity of 0\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Init buffer with contents of multiple cursors, and update cursors to reference the memory stored in the buffer.\n Each cursor arg must be an `struct aws_byte_cursor *`. NULL must be passed as the final arg.\n NOTE: Do not append/grow/resize buffers initialized this way, or the cursors will end up referencing invalid memory.\n Returns AWS_OP_SUCCESS in case of success.\n 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 , ...) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_byte_buf_clean_up (buf : * mut aws_byte_buf) ; } unsafe extern "C" { # [doc = " Equivalent to calling aws_byte_buf_secure_zero and then aws_byte_buf_clean_up\n on the buffer."] pub fn aws_byte_buf_clean_up_secure (buf : * mut aws_byte_buf) ; } unsafe extern "C" { # [doc = " Resets the len of the buffer to 0, but does not free the memory. The buffer can then be reused.\n 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) ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Compare two aws_byte_buf structures.\n Return whether their contents are equivalent."] pub fn aws_byte_buf_eq (a : * const aws_byte_buf , b : * const aws_byte_buf) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of two aws_byte_buf structures.\n Return whether their contents are equivalent.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 ; } unsafe extern "C" { # [doc = " Compare an aws_byte_buf and a null-terminated string.\n Returns true if their contents are equivalent.\n 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 :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of an aws_byte_buf and a null-terminated string.\n Return whether their contents are equivalent.\n The buffer should NOT contain a null-terminator, or the comparison will always return false.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " No copies, no buffer allocations. Iterates over input_str, and returns the\n next substring between split_on instances relative to previous substr.\n Behaves similar to strtok with substr being used as state for next split.\n\n Returns true each time substr is set and false when there is no more splits\n (substr is set to empty in that case).\n\n Example usage.\n struct aws_byte_cursor substr = {0};\n while (aws_byte_cursor_next_split(&input_str, ';', &substr)) {\n   // ...use substr...\n }\n\n Note: It is the user's responsibility zero-initialize substr before the first call.\n\n Edge case rules are as follows:\n empty input will have single empty split. ex. \"\" splits into \"\"\n if input starts with split_on then first split is empty. ex \";A\" splits into \"\", \"A\"\n adjacent split tokens result in empty split. ex \"A;;B\" splits into \"A\", \"\", \"B\"\n If the input ends with split_on, last split is empty. ex. \"A;\" splits into \"A\", \"\"\n\n It is the user's responsibility to make sure the input buffer stays in memory\n long enough to use the results."] pub fn aws_byte_cursor_next_split (input_str : * const aws_byte_cursor , split_on : :: libc :: c_char , substr : * mut aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " No copies, no buffer allocations. Fills in output with a list of\n aws_byte_cursor instances where buffer is an offset into the input_str and\n len is the length of that string in the original buffer.\n\n Edge case rules are as follows:\n if the input begins with split_on, an empty cursor will be the first entry in\n output. if the input has two adjacent split_on tokens, an empty cursor will\n be inserted into the output. if the input ends with split_on, an empty cursor\n will be appended to the output.\n\n It is the user's responsibility to properly initialize output. Recommended number of preallocated elements from\n output is your most likely guess for the upper bound of the number of elements resulting from the split.\n\n The type that will be stored in output is struct aws_byte_cursor (you'll need\n this for the item size param).\n\n It is the user's responsibility to make sure the input buffer stays in memory\n long enough to use the results."] pub fn aws_byte_cursor_split_on_char (input_str : * const aws_byte_cursor , split_on : :: libc :: c_char , output : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " No copies, no buffer allocations. Fills in output with a list of aws_byte_cursor instances where buffer is\n an offset into the input_str and len is the length of that string in the original buffer. N is the max number of\n splits, if this value is zero, it will add all splits to the output.\n\n Edge case rules are as follows:\n if the input begins with split_on, an empty cursor will be the first entry in output\n if the input has two adjacent split_on tokens, an empty cursor will be inserted into the output.\n if the input ends with split_on, an empty cursor will be appended to the output.\n\n It is the user's responsibility to properly initialize output. Recommended number of preallocated elements from\n output is your most likely guess for the upper bound of the number of elements resulting from the split.\n\n If the output array is not large enough, input_str will be updated to point to the first character after the last\n processed split_on instance.\n\n The type that will be stored in output is struct aws_byte_cursor (you'll need this for the item size param).\n\n 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 : :: libc :: c_char , n : usize , output : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Search for an exact byte match inside a cursor. The first match will be returned. Returns AWS_OP_SUCCESS\n on successful match and first_find will be set to the offset in input_str, and length will be the remaining length\n from input_str past the returned offset. If the match was not found, AWS_OP_ERR will be returned and\n 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) -> :: libc :: c_int ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Copies from to to. If to is too small, AWS_ERROR_DEST_COPY_TOO_SMALL will be\n returned. dest->len will contain the amount of data actually copied to dest.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies from to to while converting bytes via the passed in lookup table.\n If to is too small, AWS_ERROR_DEST_COPY_TOO_SMALL will be\n returned. to->len will contain its original size plus the amount of data actually copied to to.\n\n from and to should not be the same buffer (overlap is not handled)\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies from to to. If to is too small, the buffer will be grown appropriately and\n the old contents copied to, before the new contents are appended.\n\n If the grow fails (overflow or OOM), then an error will be returned.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies `from` to `to`. If `to` is too small, the buffer will be grown appropriately and\n the old contents copied over, before the new contents are appended.\n\n If the grow fails (overflow or OOM), then an error will be returned.\n\n If the buffer is grown, the old buffer will be securely cleared before getting freed.\n\n `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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies a single byte into `to`. If `to` is too small, the buffer will be grown appropriately and\n the old contents copied over, before the byte is appended.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies a single byte into `to`. If `to` is too small, the buffer will be grown appropriately and\n the old contents copied over, before the byte is appended.\n\n If the grow fails (overflow or OOM), then an error will be returned.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copy contents of cursor to buffer, then update cursor to reference the memory stored in the buffer.\n If buffer is too small, AWS_ERROR_DEST_COPY_TOO_SMALL will be returned.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Appends '\\0' at the end of the buffer."] pub fn aws_byte_buf_append_null_terminator (buf : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Attempts to increase the capacity of a buffer to the requested capacity\n\n If the the buffer's capacity is currently larger than the request capacity, the\n function does nothing (no shrink is performed)."] pub fn aws_byte_buf_reserve (buffer : * mut aws_byte_buf , requested_capacity : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Convenience function that attempts to increase the capacity of a buffer relative to the current\n length.\n\n  aws_byte_buf_reserve_relative(buf, x) ~~ aws_byte_buf_reserve(buf, buf->len + x)\n"] pub fn aws_byte_buf_reserve_relative (buffer : * mut aws_byte_buf , additional_length : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Concatenates a variable number of struct aws_byte_buf * into destination.\n Number of args must be greater than 1. If dest is too small,\n AWS_ERROR_DEST_COPY_TOO_SMALL will be returned. dest->len will contain the\n amount of data actually copied to dest."] pub fn aws_byte_buf_cat (dest : * mut aws_byte_buf , number_of_args : usize , ...) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Compare two aws_byte_cursor structures.\n Return whether their contents are equivalent."] pub fn aws_byte_cursor_eq (a : * const aws_byte_cursor , b : * const aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of two aws_byte_cursor structures.\n Return whether their contents are equivalent.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 ; } unsafe extern "C" { # [doc = " Compare an aws_byte_cursor and an aws_byte_buf.\n 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 ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of an aws_byte_cursor and an aws_byte_buf.\n Return whether their contents are equivalent.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 ; } unsafe extern "C" { # [doc = " Compare an aws_byte_cursor and a null-terminated string.\n Returns true if their contents are equivalent.\n 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 :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of an aws_byte_cursor and a null-terminated string.\n Return whether their contents are equivalent.\n The cursor should NOT contain a null-terminator, or the comparison will always return false.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 :: libc :: c_char) -> bool ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Return true if the input starts with the prefix (case-insensitive).\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 ; } unsafe extern "C" { # [doc = " Case-insensitive hash function for array containing ASCII or UTF-8 text."] pub fn aws_hash_array_ignore_case (array : * const :: libc :: c_void , len : usize) -> u64 ; } unsafe extern "C" { # [doc = " Case-insensitive hash function for aws_byte_cursors stored in an aws_hash_table.\n For case-sensitive hashing, use aws_hash_byte_cursor_ptr()."] pub fn aws_hash_byte_cursor_ptr_ignore_case (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Returns a lookup table for bytes that is the identity transformation with the exception\n of uppercase ascii characters getting replaced with lowercase characters.  Used in\n caseless comparisons."] pub fn aws_lookup_table_to_lower_get () -> * const u8 ; } unsafe extern "C" { # [doc = " Returns lookup table to go from ASCII/UTF-8 hex character to a number (0-15).\n Non-hex characters map to 255.\n Valid examples:\n '0' -> 0\n 'F' -> 15\n 'f' -> 15\n Invalid examples:\n ' ' -> 255\n 'Z' -> 255\n '\\0' -> 255"] pub fn aws_lookup_table_hex_to_num_get () -> * const u8 ; } unsafe 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) -> :: libc :: c_int ; } unsafe 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) -> :: libc :: c_int ; } unsafe 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 :: libc :: c_char) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_byte_buf_from_array (bytes : * const :: libc :: c_void , len : usize) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_byte_buf_from_empty_array (bytes : * const :: libc :: c_void , capacity : usize) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_byte_cursor_from_buf (buf : * const aws_byte_buf) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_byte_cursor_from_c_str (c_str : * const :: libc :: c_char) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_byte_cursor_from_array (bytes : * const :: libc :: c_void , len : usize) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Tests if the given aws_byte_cursor has at least len bytes remaining. If so,\n *buf is advanced by len bytes (incrementing ->ptr and decrementing ->len),\n and an aws_byte_cursor referring to the first len bytes of the original *buf\n is returned. Otherwise, an aws_byte_cursor with ->ptr = NULL, ->len = 0 is\n returned.\n\n Note that if len is above (SIZE_MAX / 2), this function will also treat it as\n 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 ; } unsafe extern "C" { # [doc = " Behaves identically to aws_byte_cursor_advance, but avoids speculative\n execution potentially reading out-of-bounds pointers (by returning an\n empty ptr in such speculated paths).\n\n This should generally be done when using an untrusted or\n data-dependent value for 'len', to avoid speculating into a path where\n 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 ; } unsafe extern "C" { # [doc = " Reads specified length of data from byte cursor and copies it to the\n destination array.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read (cur : * mut aws_byte_cursor , dest : * mut :: libc :: c_void , len : usize) -> bool ; } unsafe extern "C" { # [doc = " Reads as many bytes from cursor as size of buffer, and copies them to buffer.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_and_fill_buffer (cur : * mut aws_byte_cursor , dest : * mut aws_byte_buf) -> bool ; } unsafe extern "C" { # [doc = " Reads a single byte from cursor, placing it in *var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_u8 (cur : * mut aws_byte_cursor , var : * mut u8) -> bool ; } unsafe extern "C" { # [doc = " Reads a 16-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_be16 (cur : * mut aws_byte_cursor , var : * mut u16) -> bool ; } unsafe extern "C" { # [doc = " Reads an unsigned 24-bit value (3 bytes) in network byte order from cur,\n and places it in host byte order into 32-bit var.\n Ex: if cur's next 3 bytes are {0xAA, 0xBB, 0xCC}, then var becomes 0x00AABBCC.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_be24 (cur : * mut aws_byte_cursor , var : * mut u32) -> bool ; } unsafe extern "C" { # [doc = " Reads a 32-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_be32 (cur : * mut aws_byte_cursor , var : * mut u32) -> bool ; } unsafe extern "C" { # [doc = " Reads a 64-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_be64 (cur : * mut aws_byte_cursor , var : * mut u64) -> bool ; } unsafe extern "C" { # [doc = " Reads a 32-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_float_be32 (cur : * mut aws_byte_cursor , var : * mut f32) -> bool ; } unsafe extern "C" { # [doc = " Reads a 64-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_float_be64 (cur : * mut aws_byte_cursor , var : * mut f64) -> bool ; } unsafe extern "C" { # [doc = " Reads 2 hex characters from ASCII/UTF-8 text to produce an 8-bit number.\n Accepts both lowercase 'a'-'f' and uppercase 'A'-'F'.\n For example: \"0F\" produces 15.\n\n On success, returns true and advances the cursor by 2.\n If there is insufficient space in the cursor or an invalid character\n 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 ; } unsafe extern "C" { # [doc = " Appends a sub-buffer to the specified buffer.\n\n If the buffer has at least `len' bytes remaining (buffer->capacity - buffer->len >= len),\n then buffer->len is incremented by len, and an aws_byte_buf is assigned to *output corresponding\n to the last len bytes of the input buffer. The aws_byte_buf at *output will have a null\n allocator, a zero initial length, and a capacity of 'len'. The function then returns true.\n\n If there is insufficient space, then this function nulls all fields in *output and returns\n false."] pub fn aws_byte_buf_advance (buffer : * mut aws_byte_buf , output : * mut aws_byte_buf , len : usize) -> bool ; } unsafe extern "C" { # [doc = " Write specified number of bytes from array to byte buffer.\n\n On success, returns true and updates the buffer length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write (buf : * mut aws_byte_buf , src : * const u8 , len : usize) -> bool ; } unsafe extern "C" { # [doc = " Copies all bytes from buffer to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_from_whole_buffer (buf : * mut aws_byte_buf , src : aws_byte_buf) -> bool ; } unsafe extern "C" { # [doc = " Copies all bytes from buffer to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_from_whole_cursor (buf : * mut aws_byte_buf , src : aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " Without increasing buf's capacity, write as much as possible from advancing_cursor into buf.\n\n buf's len is updated accordingly.\n advancing_cursor is advanced so it contains the remaining unwritten parts.\n Returns the section of advancing_cursor which was written.\n\n This function cannot fail. If buf is full (len == capacity) or advancing_len has 0 length,\n then buf and advancing_cursor are not altered and a cursor with 0 length is returned.\n\n Example: Given a buf with 2 bytes of space available and advancing_cursor with contents \"abc\".\n \"ab\" will be written to buf and buf->len will increase 2 and become equal to buf->capacity.\n advancing_cursor will advance so its contents become the unwritten \"c\".\n 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 ; } unsafe extern "C" { # [doc = " Copies one byte to buffer.\n\n On success, returns true and updates the cursor /length\naccordingly.\n\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_u8 (buf : * mut aws_byte_buf , c : u8) -> bool ; } unsafe extern "C" { # [doc = " Writes one byte repeatedly to buffer (like memset)\n\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_u8_n (buf : * mut aws_byte_buf , c : u8 , count : usize) -> bool ; } unsafe extern "C" { # [doc = " Writes a 16-bit integer in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_be16 (buf : * mut aws_byte_buf , x : u16) -> bool ; } unsafe extern "C" { # [doc = " Writes low 24-bits (3 bytes) of an unsigned integer in network byte order (big endian) to buffer.\n Ex: If x is 0x00AABBCC then {0xAA, 0xBB, 0xCC} is written to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, or x's value cannot fit in 3 bytes,\n returns false, leaving the buffer unchanged."] pub fn aws_byte_buf_write_be24 (buf : * mut aws_byte_buf , x : u32) -> bool ; } unsafe extern "C" { # [doc = " Writes a 32-bit integer in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_be32 (buf : * mut aws_byte_buf , x : u32) -> bool ; } unsafe extern "C" { # [doc = " Writes a 32-bit float in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_float_be32 (buf : * mut aws_byte_buf , x : f32) -> bool ; } unsafe extern "C" { # [doc = " Writes a 64-bit integer in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_be64 (buf : * mut aws_byte_buf , x : u64) -> bool ; } unsafe extern "C" { # [doc = " Writes a 64-bit float in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_float_be64 (buf : * mut aws_byte_buf , x : f64) -> bool ; } unsafe extern "C" { # [doc = " Like isalnum(), but ignores C locale.\n 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 ; } unsafe extern "C" { # [doc = " Like isalpha(), but ignores C locale.\n Returns true if ch has the value of ASCII/UTF-8: 'a'-'z' or 'A'-'Z'."] pub fn aws_isalpha (ch : u8) -> bool ; } unsafe extern "C" { # [doc = " Like isdigit().\n Returns true if ch has the value of ASCII/UTF-8: '0'-'9'.\n\n Note: C's built-in isdigit() is also supposed to ignore the C locale,\n but cppreference.com claims \"some implementations (e.g. Microsoft in 1252 codepage)\n may classify additional single-byte characters as digits\""] pub fn aws_isdigit (ch : u8) -> bool ; } unsafe extern "C" { # [doc = " Like isxdigit().\n Returns true if ch has the value of ASCII/UTF-8: '0'-'9', 'a'-'f', or 'A'-'F'.\n\n Note: C's built-in isxdigit() is also supposed to ignore the C locale,\n but cppreference.com claims \"some implementations (e.g. Microsoft in 1252 codepage)\n may classify additional single-byte characters as digits\""] pub fn aws_isxdigit (ch : u8) -> bool ; } unsafe extern "C" { # [doc = " Like isspace(), but ignores C locale.\n Return true if ch has the value of ASCII/UTF-8: space (0x20), form feed (0x0C),\n line feed (0x0A), carriage return (0x0D), horizontal tab (0x09), or vertical tab (0x0B)."] pub fn aws_isspace (ch : u8) -> bool ; } unsafe extern "C" { # [doc = " Read entire cursor as ASCII/UTF-8 unsigned base-10 number.\n Stricter than strtoull(), which allows whitespace and inputs that start with \"0x\"\n\n Examples:\n \"0\" -> 0\n \"123\" -> 123\n \"00004\" -> 4 // leading zeros ok\n\n Rejects things like:\n \"-1\" // negative numbers not allowed\n \"1,000\" // only characters 0-9 allowed\n \"\" // blank string not allowed\n \" 0 \" // whitespace not allowed\n \"0x0\" // hex not allowed\n \"FF\" // hex not allowed\n \"999999999999999999999999999999999999999999\" // larger than max u64"] pub fn aws_byte_cursor_utf8_parse_u64 (cursor : aws_byte_cursor , dst : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Read entire cursor as ASCII/UTF-8 unsigned base-16 number with NO \"0x\" prefix.\n\n Examples:\n \"F\" -> 15\n \"000000ff\" -> 255 // leading zeros ok\n \"Ff\" -> 255 // mixed case ok\n \"123\" -> 291\n \"FFFFFFFFFFFFFFFF\" -> 18446744073709551616 // max u64\n\n Rejects things like:\n \"0x0\" // 0x prefix not allowed\n \"\" // blank string not allowed\n \" F \" // whitespace not allowed\n \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\" // larger than max u64"] pub fn aws_byte_cursor_utf8_parse_u64_hex (cursor : aws_byte_cursor , dst : * mut u64) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_linked_list_node { pub next : * mut aws_linked_list_node , pub prev : * mut aws_linked_list_node , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_linked_list_node"] [:: std :: mem :: size_of :: < aws_linked_list_node > () - 16usize] ; ["Alignment of aws_linked_list_node"] [:: std :: mem :: align_of :: < aws_linked_list_node > () - 8usize] ; ["Offset of field: aws_linked_list_node::next"] [:: std :: mem :: offset_of ! (aws_linked_list_node , next) - 0usize] ; ["Offset of field: aws_linked_list_node::prev"] [:: std :: mem :: offset_of ! (aws_linked_list_node , prev) - 8usize] ; } ; 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)] pub struct aws_linked_list { pub head : aws_linked_list_node , pub tail : aws_linked_list_node , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_linked_list"] [:: std :: mem :: size_of :: < aws_linked_list > () - 32usize] ; ["Alignment of aws_linked_list"] [:: std :: mem :: align_of :: < aws_linked_list > () - 8usize] ; ["Offset of field: aws_linked_list::head"] [:: std :: mem :: offset_of ! (aws_linked_list , head) - 0usize] ; ["Offset of field: aws_linked_list::tail"] [:: std :: mem :: offset_of ! (aws_linked_list , tail) - 16usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Set node's next and prev pointers to NULL."] pub fn aws_linked_list_node_reset (node : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Tests if the list is empty."] pub fn aws_linked_list_empty (list : * const aws_linked_list) -> bool ; } unsafe extern "C" { # [doc = " Checks that a linked list is valid."] pub fn aws_linked_list_is_valid (list : * const aws_linked_list) -> bool ; } unsafe extern "C" { # [doc = " Checks that the prev of the next pointer of a node points to the\n node. As this checks whether the [next] connection of a node is\n bidirectional, it returns false if used for the list tail."] pub fn aws_linked_list_node_next_is_valid (node : * const aws_linked_list_node) -> bool ; } unsafe extern "C" { # [doc = " Checks that the next of the prev pointer of a node points to the\n node. Similarly to the above, this returns false if used for the\n head of a list."] pub fn aws_linked_list_node_prev_is_valid (node : * const aws_linked_list_node) -> bool ; } unsafe extern "C" { # [doc = " Checks that a linked list satisfies double linked list connectivity\n constraints. This check is O(n) as it traverses the whole linked\n list to ensure that tail is reachable from head (and vice versa)\n and that every connection is bidirectional.\n\n Note: This check *cannot* go into an infinite loop, because we\n ensure that the connection to the next node is\n bidirectional. Therefore, if a node's [a] a.next is a previous node\n [b] in the list, b.prev != &a and so this check would fail, thus\n terminating the loop."] pub fn aws_linked_list_is_valid_deep (list : * const aws_linked_list) -> bool ; } unsafe extern "C" { # [doc = " Initializes the list. List will be empty after this call."] pub fn aws_linked_list_init (list : * mut aws_linked_list) ; } unsafe extern "C" { # [doc = " Returns an iteration pointer for the first element in the list."] pub fn aws_linked_list_begin (list : * const aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns an iteration pointer for one past the last element in the list."] pub fn aws_linked_list_end (list : * const aws_linked_list) -> * const aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns a pointer for the last element in the list.\n Used to begin iterating the list in reverse. Ex:\n   for (i = aws_linked_list_rbegin(list); i != aws_linked_list_rend(list); i = aws_linked_list_prev(i)) {...}"] pub fn aws_linked_list_rbegin (list : * const aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the pointer to one before the first element in the list.\n Used to end iterating the list in reverse."] pub fn aws_linked_list_rend (list : * const aws_linked_list) -> * const aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the next element in the list."] pub fn aws_linked_list_next (node : * const aws_linked_list_node) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the previous element in the list."] pub fn aws_linked_list_prev (node : * const aws_linked_list_node) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Inserts to_add immediately after after."] pub fn aws_linked_list_insert_after (after : * mut aws_linked_list_node , to_add : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Swaps the order two nodes in the linked list."] pub fn aws_linked_list_swap_nodes (a : * mut aws_linked_list_node , b : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Inserts to_add immediately before before."] pub fn aws_linked_list_insert_before (before : * mut aws_linked_list_node , to_add : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Removes the specified node from the list (prev/next point to each other) and\n returns the next node in the list."] pub fn aws_linked_list_remove (node : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Append new_node."] pub fn aws_linked_list_push_back (list : * mut aws_linked_list , node : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Returns the element in the back of the list."] pub fn aws_linked_list_back (list : * const aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the element in the back of the list and removes it"] pub fn aws_linked_list_pop_back (list : * mut aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Prepend new_node."] pub fn aws_linked_list_push_front (list : * mut aws_linked_list , node : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Returns the element in the front of the list."] pub fn aws_linked_list_front (list : * const aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the element in the front of the list and removes it"] pub fn aws_linked_list_pop_front (list : * mut aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { pub fn aws_linked_list_swap_contents (a : * mut aws_linked_list , b : * mut aws_linked_list) ; } unsafe extern "C" { # [doc = " Remove all nodes from one list, and add them to the back of another.\n\n Example: if dst={1,2} and src={3,4}, they become dst={1,2,3,4} and src={}"] pub fn aws_linked_list_move_all_back (dst : * mut aws_linked_list , src : * mut aws_linked_list) ; } unsafe extern "C" { # [doc = " Remove all nodes from one list, and add them to the front of another.\n\n Example: if dst={2,1} and src={4,3}, they become dst={4,3,2,1} and src={}"] pub fn aws_linked_list_move_all_front (dst : * mut aws_linked_list , src : * mut aws_linked_list) ; } unsafe extern "C" { # [doc = " Returns true if the node is currently in a list, false otherwise."] pub fn aws_linked_list_node_is_in_list (node : * mut aws_linked_list_node) -> bool ; } pub type aws_io_set_queue_on_handle_fn = :: std :: option :: Option < unsafe extern "C" fn (handle : * mut aws_io_handle , queue : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_io_handle { pub data : aws_io_handle__bindgen_ty_1 , pub additional_data : * mut :: libc :: c_void , pub set_queue : aws_io_set_queue_on_handle_fn , } # [repr (C)] # [derive (Copy , Clone)] pub union aws_io_handle__bindgen_ty_1 { pub fd : :: libc :: c_int , pub handle : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_io_handle__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_io_handle__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_io_handle__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_io_handle__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_io_handle__bindgen_ty_1::fd"] [:: std :: mem :: offset_of ! (aws_io_handle__bindgen_ty_1 , fd) - 0usize] ; ["Offset of field: aws_io_handle__bindgen_ty_1::handle"] [:: std :: mem :: offset_of ! (aws_io_handle__bindgen_ty_1 , handle) - 0usize] ; } ; impl Default for aws_io_handle__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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_io_handle"] [:: std :: mem :: size_of :: < aws_io_handle > () - 24usize] ; ["Alignment of aws_io_handle"] [:: std :: mem :: align_of :: < aws_io_handle > () - 8usize] ; ["Offset of field: aws_io_handle::data"] [:: std :: mem :: offset_of ! (aws_io_handle , data) - 0usize] ; ["Offset of field: aws_io_handle::additional_data"] [:: std :: mem :: offset_of ! (aws_io_handle , additional_data) - 8usize] ; ["Offset of field: aws_io_handle::set_queue"] [:: std :: mem :: offset_of ! (aws_io_handle , set_queue) - 16usize] ; } ; impl Default for aws_io_handle { 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 (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_io_message_type { AWS_IO_MESSAGE_APPLICATION_DATA = 0 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_channel { _unused : [u8 ; 0] , } pub type aws_channel_on_message_write_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (channel : * mut aws_channel , message : * mut aws_io_message , err_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_io_message { # [doc = " Allocator used for the message and message data. If this is null, the message belongs to a pool or some other\n message manager."] pub allocator : * mut aws_allocator , # [doc = " Buffer containing the data for message"] pub message_data : aws_byte_buf , # [doc = " type of the message. This is used for framework control messages. Currently the only type is\n AWS_IO_MESSAGE_APPLICATION_DATA"] pub message_type : aws_io_message_type , # [doc = " Conveys information about the contents of message_data (e.g. cast the ptr to some type). If 0, it's just opaque\n data."] pub message_tag : :: libc :: c_int , # [doc = " In order to avoid excess allocations/copies, on a partial read or write, the copy mark is set to indicate how\n much of this message has already been processed or copied."] pub copy_mark : usize , # [doc = " The channel that the message is bound to."] pub owning_channel : * mut aws_channel , # [doc = " Invoked by the channel once the entire message has been written to the data sink."] pub on_completion : aws_channel_on_message_write_completed_fn , # [doc = " arbitrary user data for the on_completion callback"] pub user_data : * mut :: libc :: c_void , # [doc = " it's incredibly likely something is going to need to queue this,\n go ahead and make sure the list info is part of the original allocation."] pub queueing_handle : aws_linked_list_node , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_io_message"] [:: std :: mem :: size_of :: < aws_io_message > () - 96usize] ; ["Alignment of aws_io_message"] [:: std :: mem :: align_of :: < aws_io_message > () - 8usize] ; ["Offset of field: aws_io_message::allocator"] [:: std :: mem :: offset_of ! (aws_io_message , allocator) - 0usize] ; ["Offset of field: aws_io_message::message_data"] [:: std :: mem :: offset_of ! (aws_io_message , message_data) - 8usize] ; ["Offset of field: aws_io_message::message_type"] [:: std :: mem :: offset_of ! (aws_io_message , message_type) - 40usize] ; ["Offset of field: aws_io_message::message_tag"] [:: std :: mem :: offset_of ! (aws_io_message , message_tag) - 44usize] ; ["Offset of field: aws_io_message::copy_mark"] [:: std :: mem :: offset_of ! (aws_io_message , copy_mark) - 48usize] ; ["Offset of field: aws_io_message::owning_channel"] [:: std :: mem :: offset_of ! (aws_io_message , owning_channel) - 56usize] ; ["Offset of field: aws_io_message::on_completion"] [:: std :: mem :: offset_of ! (aws_io_message , on_completion) - 64usize] ; ["Offset of field: aws_io_message::user_data"] [:: std :: mem :: offset_of ! (aws_io_message , user_data) - 72usize] ; ["Offset of field: aws_io_message::queueing_handle"] [:: std :: mem :: offset_of ! (aws_io_message , queueing_handle) - 80usize] ; } ; impl Default for aws_io_message { 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_io_clock_fn = :: std :: option :: Option < unsafe extern "C" fn (timestamp : * mut u64) -> :: libc :: c_int > ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_io_errors { AWS_IO_CHANNEL_ERROR_ERROR_CANT_ACCEPT_INPUT = 1024 , AWS_IO_CHANNEL_UNKNOWN_MESSAGE_TYPE = 1025 , AWS_IO_CHANNEL_READ_WOULD_EXCEED_WINDOW = 1026 , AWS_IO_EVENT_LOOP_ALREADY_ASSIGNED = 1027 , AWS_IO_EVENT_LOOP_SHUTDOWN = 1028 , AWS_IO_TLS_ERROR_NEGOTIATION_FAILURE = 1029 , AWS_IO_TLS_ERROR_NOT_NEGOTIATED = 1030 , AWS_IO_TLS_ERROR_WRITE_FAILURE = 1031 , AWS_IO_TLS_ERROR_ALERT_RECEIVED = 1032 , AWS_IO_TLS_CTX_ERROR = 1033 , AWS_IO_TLS_VERSION_UNSUPPORTED = 1034 , AWS_IO_TLS_CIPHER_PREF_UNSUPPORTED = 1035 , AWS_IO_MISSING_ALPN_MESSAGE = 1036 , AWS_IO_UNHANDLED_ALPN_PROTOCOL_MESSAGE = 1037 , AWS_IO_FILE_VALIDATION_FAILURE = 1038 , AWS_ERROR_IO_EVENT_LOOP_THREAD_ONLY = 1039 , AWS_ERROR_IO_ALREADY_SUBSCRIBED = 1040 , AWS_ERROR_IO_NOT_SUBSCRIBED = 1041 , AWS_ERROR_IO_OPERATION_CANCELLED = 1042 , AWS_IO_READ_WOULD_BLOCK = 1043 , AWS_IO_BROKEN_PIPE = 1044 , AWS_IO_SOCKET_UNSUPPORTED_ADDRESS_FAMILY = 1045 , AWS_IO_SOCKET_INVALID_OPERATION_FOR_TYPE = 1046 , AWS_IO_SOCKET_CONNECTION_REFUSED = 1047 , AWS_IO_SOCKET_TIMEOUT = 1048 , AWS_IO_SOCKET_NO_ROUTE_TO_HOST = 1049 , AWS_IO_SOCKET_NETWORK_DOWN = 1050 , AWS_IO_SOCKET_CLOSED = 1051 , AWS_IO_SOCKET_NOT_CONNECTED = 1052 , AWS_IO_SOCKET_INVALID_OPTIONS = 1053 , AWS_IO_SOCKET_ADDRESS_IN_USE = 1054 , AWS_IO_SOCKET_INVALID_ADDRESS = 1055 , AWS_IO_SOCKET_ILLEGAL_OPERATION_FOR_STATE = 1056 , AWS_IO_SOCKET_CONNECT_ABORTED = 1057 , AWS_IO_DNS_QUERY_FAILED = 1058 , AWS_IO_DNS_INVALID_NAME = 1059 , AWS_IO_DNS_NO_ADDRESS_FOR_HOST = 1060 , AWS_IO_DNS_HOST_REMOVED_FROM_CACHE = 1061 , AWS_IO_STREAM_INVALID_SEEK_POSITION = 1062 , AWS_IO_STREAM_READ_FAILED = 1063 , DEPRECATED_AWS_IO_INVALID_FILE_HANDLE = 1064 , AWS_IO_SHARED_LIBRARY_LOAD_FAILURE = 1065 , AWS_IO_SHARED_LIBRARY_FIND_SYMBOL_FAILURE = 1066 , AWS_IO_TLS_NEGOTIATION_TIMEOUT = 1067 , AWS_IO_TLS_ALERT_NOT_GRACEFUL = 1068 , AWS_IO_MAX_RETRIES_EXCEEDED = 1069 , AWS_IO_RETRY_PERMISSION_DENIED = 1070 , AWS_IO_TLS_DIGEST_ALGORITHM_UNSUPPORTED = 1071 , AWS_IO_TLS_SIGNATURE_ALGORITHM_UNSUPPORTED = 1072 , AWS_ERROR_PKCS11_VERSION_UNSUPPORTED = 1073 , AWS_ERROR_PKCS11_TOKEN_NOT_FOUND = 1074 , AWS_ERROR_PKCS11_KEY_NOT_FOUND = 1075 , AWS_ERROR_PKCS11_KEY_TYPE_UNSUPPORTED = 1076 , AWS_ERROR_PKCS11_UNKNOWN_CRYPTOKI_RETURN_VALUE = 1077 , AWS_ERROR_PKCS11_CKR_CANCEL = 1078 , AWS_ERROR_PKCS11_CKR_HOST_MEMORY = 1079 , AWS_ERROR_PKCS11_CKR_SLOT_ID_INVALID = 1080 , AWS_ERROR_PKCS11_CKR_GENERAL_ERROR = 1081 , AWS_ERROR_PKCS11_CKR_FUNCTION_FAILED = 1082 , AWS_ERROR_PKCS11_CKR_ARGUMENTS_BAD = 1083 , AWS_ERROR_PKCS11_CKR_NO_EVENT = 1084 , AWS_ERROR_PKCS11_CKR_NEED_TO_CREATE_THREADS = 1085 , AWS_ERROR_PKCS11_CKR_CANT_LOCK = 1086 , AWS_ERROR_PKCS11_CKR_ATTRIBUTE_READ_ONLY = 1087 , AWS_ERROR_PKCS11_CKR_ATTRIBUTE_SENSITIVE = 1088 , AWS_ERROR_PKCS11_CKR_ATTRIBUTE_TYPE_INVALID = 1089 , AWS_ERROR_PKCS11_CKR_ATTRIBUTE_VALUE_INVALID = 1090 , AWS_ERROR_PKCS11_CKR_ACTION_PROHIBITED = 1091 , AWS_ERROR_PKCS11_CKR_DATA_INVALID = 1092 , AWS_ERROR_PKCS11_CKR_DATA_LEN_RANGE = 1093 , AWS_ERROR_PKCS11_CKR_DEVICE_ERROR = 1094 , AWS_ERROR_PKCS11_CKR_DEVICE_MEMORY = 1095 , AWS_ERROR_PKCS11_CKR_DEVICE_REMOVED = 1096 , AWS_ERROR_PKCS11_CKR_ENCRYPTED_DATA_INVALID = 1097 , AWS_ERROR_PKCS11_CKR_ENCRYPTED_DATA_LEN_RANGE = 1098 , AWS_ERROR_PKCS11_CKR_FUNCTION_CANCELED = 1099 , AWS_ERROR_PKCS11_CKR_FUNCTION_NOT_PARALLEL = 1100 , AWS_ERROR_PKCS11_CKR_FUNCTION_NOT_SUPPORTED = 1101 , AWS_ERROR_PKCS11_CKR_KEY_HANDLE_INVALID = 1102 , AWS_ERROR_PKCS11_CKR_KEY_SIZE_RANGE = 1103 , AWS_ERROR_PKCS11_CKR_KEY_TYPE_INCONSISTENT = 1104 , AWS_ERROR_PKCS11_CKR_KEY_NOT_NEEDED = 1105 , AWS_ERROR_PKCS11_CKR_KEY_CHANGED = 1106 , AWS_ERROR_PKCS11_CKR_KEY_NEEDED = 1107 , AWS_ERROR_PKCS11_CKR_KEY_INDIGESTIBLE = 1108 , AWS_ERROR_PKCS11_CKR_KEY_FUNCTION_NOT_PERMITTED = 1109 , AWS_ERROR_PKCS11_CKR_KEY_NOT_WRAPPABLE = 1110 , AWS_ERROR_PKCS11_CKR_KEY_UNEXTRACTABLE = 1111 , AWS_ERROR_PKCS11_CKR_MECHANISM_INVALID = 1112 , AWS_ERROR_PKCS11_CKR_MECHANISM_PARAM_INVALID = 1113 , AWS_ERROR_PKCS11_CKR_OBJECT_HANDLE_INVALID = 1114 , AWS_ERROR_PKCS11_CKR_OPERATION_ACTIVE = 1115 , AWS_ERROR_PKCS11_CKR_OPERATION_NOT_INITIALIZED = 1116 , AWS_ERROR_PKCS11_CKR_PIN_INCORRECT = 1117 , AWS_ERROR_PKCS11_CKR_PIN_INVALID = 1118 , AWS_ERROR_PKCS11_CKR_PIN_LEN_RANGE = 1119 , AWS_ERROR_PKCS11_CKR_PIN_EXPIRED = 1120 , AWS_ERROR_PKCS11_CKR_PIN_LOCKED = 1121 , AWS_ERROR_PKCS11_CKR_SESSION_CLOSED = 1122 , AWS_ERROR_PKCS11_CKR_SESSION_COUNT = 1123 , AWS_ERROR_PKCS11_CKR_SESSION_HANDLE_INVALID = 1124 , AWS_ERROR_PKCS11_CKR_SESSION_PARALLEL_NOT_SUPPORTED = 1125 , AWS_ERROR_PKCS11_CKR_SESSION_READ_ONLY = 1126 , AWS_ERROR_PKCS11_CKR_SESSION_EXISTS = 1127 , AWS_ERROR_PKCS11_CKR_SESSION_READ_ONLY_EXISTS = 1128 , AWS_ERROR_PKCS11_CKR_SESSION_READ_WRITE_SO_EXISTS = 1129 , AWS_ERROR_PKCS11_CKR_SIGNATURE_INVALID = 1130 , AWS_ERROR_PKCS11_CKR_SIGNATURE_LEN_RANGE = 1131 , AWS_ERROR_PKCS11_CKR_TEMPLATE_INCOMPLETE = 1132 , AWS_ERROR_PKCS11_CKR_TEMPLATE_INCONSISTENT = 1133 , AWS_ERROR_PKCS11_CKR_TOKEN_NOT_PRESENT = 1134 , AWS_ERROR_PKCS11_CKR_TOKEN_NOT_RECOGNIZED = 1135 , AWS_ERROR_PKCS11_CKR_TOKEN_WRITE_PROTECTED = 1136 , AWS_ERROR_PKCS11_CKR_UNWRAPPING_KEY_HANDLE_INVALID = 1137 , AWS_ERROR_PKCS11_CKR_UNWRAPPING_KEY_SIZE_RANGE = 1138 , AWS_ERROR_PKCS11_CKR_UNWRAPPING_KEY_TYPE_INCONSISTENT = 1139 , AWS_ERROR_PKCS11_CKR_USER_ALREADY_LOGGED_IN = 1140 , AWS_ERROR_PKCS11_CKR_USER_NOT_LOGGED_IN = 1141 , AWS_ERROR_PKCS11_CKR_USER_PIN_NOT_INITIALIZED = 1142 , AWS_ERROR_PKCS11_CKR_USER_TYPE_INVALID = 1143 , AWS_ERROR_PKCS11_CKR_USER_ANOTHER_ALREADY_LOGGED_IN = 1144 , AWS_ERROR_PKCS11_CKR_USER_TOO_MANY_TYPES = 1145 , AWS_ERROR_PKCS11_CKR_WRAPPED_KEY_INVALID = 1146 , AWS_ERROR_PKCS11_CKR_WRAPPED_KEY_LEN_RANGE = 1147 , AWS_ERROR_PKCS11_CKR_WRAPPING_KEY_HANDLE_INVALID = 1148 , AWS_ERROR_PKCS11_CKR_WRAPPING_KEY_SIZE_RANGE = 1149 , AWS_ERROR_PKCS11_CKR_WRAPPING_KEY_TYPE_INCONSISTENT = 1150 , AWS_ERROR_PKCS11_CKR_RANDOM_SEED_NOT_SUPPORTED = 1151 , AWS_ERROR_PKCS11_CKR_RANDOM_NO_RNG = 1152 , AWS_ERROR_PKCS11_CKR_DOMAIN_PARAMS_INVALID = 1153 , AWS_ERROR_PKCS11_CKR_CURVE_NOT_SUPPORTED = 1154 , AWS_ERROR_PKCS11_CKR_BUFFER_TOO_SMALL = 1155 , AWS_ERROR_PKCS11_CKR_SAVED_STATE_INVALID = 1156 , AWS_ERROR_PKCS11_CKR_INFORMATION_SENSITIVE = 1157 , AWS_ERROR_PKCS11_CKR_STATE_UNSAVEABLE = 1158 , AWS_ERROR_PKCS11_CKR_CRYPTOKI_NOT_INITIALIZED = 1159 , AWS_ERROR_PKCS11_CKR_CRYPTOKI_ALREADY_INITIALIZED = 1160 , AWS_ERROR_PKCS11_CKR_MUTEX_BAD = 1161 , AWS_ERROR_PKCS11_CKR_MUTEX_NOT_LOCKED = 1162 , AWS_ERROR_PKCS11_CKR_NEW_PIN_MODE = 1163 , AWS_ERROR_PKCS11_CKR_NEXT_OTP = 1164 , AWS_ERROR_PKCS11_CKR_EXCEEDED_MAX_ITERATIONS = 1165 , AWS_ERROR_PKCS11_CKR_FIPS_SELF_TEST_FAILED = 1166 , AWS_ERROR_PKCS11_CKR_LIBRARY_LOAD_FAILED = 1167 , AWS_ERROR_PKCS11_CKR_PIN_TOO_WEAK = 1168 , AWS_ERROR_PKCS11_CKR_PUBLIC_KEY_INVALID = 1169 , AWS_ERROR_PKCS11_CKR_FUNCTION_REJECTED = 1170 , AWS_ERROR_IO_PINNED_EVENT_LOOP_MISMATCH = 1171 , AWS_ERROR_PKCS11_ENCODING_ERROR = 1172 , AWS_IO_TLS_ERROR_DEFAULT_TRUST_STORE_NOT_FOUND = 1173 , AWS_IO_STREAM_SEEK_FAILED = 1174 , AWS_IO_STREAM_GET_LENGTH_FAILED = 1175 , AWS_IO_STREAM_SEEK_UNSUPPORTED = 1176 , AWS_IO_STREAM_GET_LENGTH_UNSUPPORTED = 1177 , AWS_IO_TLS_ERROR_READ_FAILURE = 1178 , AWS_ERROR_PEM_MALFORMED = 1179 , AWS_IO_SOCKET_MISSING_EVENT_LOOP = 1180 , AWS_IO_TLS_UNKNOWN_ROOT_CERTIFICATE = 1181 , AWS_IO_TLS_NO_ROOT_CERTIFICATE_FOUND = 1182 , AWS_IO_TLS_CERTIFICATE_EXPIRED = 1183 , AWS_IO_TLS_CERTIFICATE_NOT_YET_VALID = 1184 , AWS_IO_TLS_BAD_CERTIFICATE = 1185 , AWS_IO_TLS_PEER_CERTIFICATE_EXPIRED = 1186 , AWS_IO_TLS_BAD_PEER_CERTIFICATE = 1187 , AWS_IO_TLS_PEER_CERTIFICATE_REVOKED = 1188 , AWS_IO_TLS_PEER_CERTIFICATE_UNKNOWN = 1189 , AWS_IO_TLS_INTERNAL_ERROR = 1190 , AWS_IO_TLS_CLOSED_GRACEFUL = 1191 , AWS_IO_TLS_CLOSED_ABORT = 1192 , AWS_IO_TLS_INVALID_CERTIFICATE_CHAIN = 1193 , AWS_IO_TLS_HOST_NAME_MISMATCH = 1194 , AWS_IO_DNS_QUERY_AGAIN = 1195 , AWS_IO_ERROR_END_RANGE = 2047 , AWS_IO_INVALID_FILE_HANDLE = 50 , } unsafe extern "C" { # [doc = " Initializes internal datastructures used by aws-c-io.\n Must be called before using any functionality in aws-c-io."] pub fn aws_io_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Shuts down the internal datastructures used by aws-c-io."] pub fn aws_io_library_clean_up () ; } unsafe extern "C" { pub fn aws_io_fatal_assert_library_initialized () ; } unsafe extern "C" { pub fn aws_io_error_code_is_retryable (error_code : :: libc :: c_int) -> bool ; } # [doc = " struct aws_atomic_var represents an atomic variable - a value which can hold an integer or pointer\n that can be manipulated atomically. struct aws_atomic_vars should normally only be manipulated\n with atomics methods defined in this header."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_atomic_var { pub value : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_atomic_var"] [:: std :: mem :: size_of :: < aws_atomic_var > () - 8usize] ; ["Alignment of aws_atomic_var"] [:: std :: mem :: align_of :: < aws_atomic_var > () - 8usize] ; ["Offset of field: aws_atomic_var::value"] [:: std :: mem :: offset_of ! (aws_atomic_var , value) - 0usize] ; } ; 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 () } } } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_memory_order { # [doc = " No particular ordering constraints are guaranteed relative to other\n operations at all; we merely ensure that the operation itself is atomic."] aws_memory_order_relaxed = 0 , # [doc = " Specifies acquire ordering. No reads or writes on the current thread can be\n reordered to happen before this operation. This is typically paired with a release\n ordering; any writes that happened on the releasing operation will be visible\n after the paired acquire operation.\n\n Acquire ordering is only meaningful on load or load-store operations."] aws_memory_order_acquire = 2 , # [doc = " Specifies release order. No reads or writes can be reordered to come after this\n operation. Typically paired with an acquire operation.\n\n Release ordering is only meaningful on store or load-store operations."] aws_memory_order_release = 3 , # [doc = " Specifies acquire-release order; if this operation acts as a load, it acts as an\n acquire operation; if it acts as a store, it acts as a release operation; if it's\n a load-store, it does both."] aws_memory_order_acq_rel = 4 , # [doc = " Specifies acquire-release order; if this operation acts as a load, it acts as an\n acquire operation; if it acts as a store, it acts as a release operation; if it's\n a load-store, it does both."] aws_memory_order_seq_cst = 5 , } unsafe extern "C" { # [doc = " Initializes an atomic variable with an integer value. This operation should be done before any\n other operations on this atomic variable, and must be done before attempting any parallel operations.\n\n This operation does not imply a barrier. Ensure that you use an acquire-release barrier (or stronger)\n when communicating the fact that initialization is complete to the other thread. Launching the thread\n implies a sufficiently strong barrier."] pub fn aws_atomic_init_int (var : * mut aws_atomic_var , n : usize) ; } unsafe extern "C" { # [doc = " Initializes an atomic variable with a pointer value. This operation should be done before any\n other operations on this atomic variable, and must be done before attempting any parallel operations.\n\n This operation does not imply a barrier. Ensure that you use an acquire-release barrier (or stronger)\n when communicating the fact that initialization is complete to the other thread. Launching the thread\n implies a sufficiently strong barrier."] pub fn aws_atomic_init_ptr (var : * mut aws_atomic_var , p : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Reads an atomic var as an integer, using the specified ordering, and returns the result."] pub fn aws_atomic_load_int_explicit (var : * const aws_atomic_var , memory_order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Reads an atomic var as an integer, using sequentially consistent ordering, and returns the result."] pub fn aws_atomic_load_int (var : * const aws_atomic_var) -> usize ; } unsafe extern "C" { # [doc = " Reads an atomic var as a pointer, using the specified ordering, and returns the result."] pub fn aws_atomic_load_ptr_explicit (var : * const aws_atomic_var , memory_order : aws_memory_order) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Reads an atomic var as a pointer, using sequentially consistent ordering, and returns the result."] pub fn aws_atomic_load_ptr (var : * const aws_atomic_var) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Stores an integer into an atomic var, using the specified ordering."] pub fn aws_atomic_store_int_explicit (var : * mut aws_atomic_var , n : usize , memory_order : aws_memory_order) ; } unsafe extern "C" { # [doc = " Stores an integer into an atomic var, using sequentially consistent ordering."] pub fn aws_atomic_store_int (var : * mut aws_atomic_var , n : usize) ; } unsafe extern "C" { # [doc = " Stores a pointer into an atomic var, using the specified ordering."] pub fn aws_atomic_store_ptr_explicit (var : * mut aws_atomic_var , p : * mut :: libc :: c_void , memory_order : aws_memory_order) ; } unsafe extern "C" { # [doc = " Stores a pointer into an atomic var, using sequentially consistent ordering."] pub fn aws_atomic_store_ptr (var : * mut aws_atomic_var , p : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Exchanges an integer with the value in an atomic_var, using the specified ordering.\n Returns the value that was previously in the atomic_var."] pub fn aws_atomic_exchange_int_explicit (var : * mut aws_atomic_var , n : usize , memory_order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Exchanges an integer with the value in an atomic_var, using sequentially consistent ordering.\n Returns the value that was previously in the atomic_var."] pub fn aws_atomic_exchange_int (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Exchanges a pointer with the value in an atomic_var, using the specified ordering.\n Returns the value that was previously in the atomic_var."] pub fn aws_atomic_exchange_ptr_explicit (var : * mut aws_atomic_var , p : * mut :: libc :: c_void , memory_order : aws_memory_order) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Exchanges an integer with the value in an atomic_var, using sequentially consistent ordering.\n Returns the value that was previously in the atomic_var."] pub fn aws_atomic_exchange_ptr (var : * mut aws_atomic_var , p : * mut :: libc :: c_void) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set\n to the value in *var. On success, the memory ordering used was order_success; otherwise, it was order_failure.\n order_failure must be no stronger than order_success, and must not be release or acq_rel.\n Returns true if the compare was successful and the variable updated to desired."] pub fn aws_atomic_compare_exchange_int_explicit (var : * mut aws_atomic_var , expected : * mut usize , desired : usize , order_success : aws_memory_order , order_failure : aws_memory_order) -> bool ; } unsafe extern "C" { # [doc = " Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set\n to the value in *var. Uses sequentially consistent memory ordering, regardless of success or failure.\n Returns true if the compare was successful and the variable updated to desired."] pub fn aws_atomic_compare_exchange_int (var : * mut aws_atomic_var , expected : * mut usize , desired : usize) -> bool ; } unsafe extern "C" { # [doc = " Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set\n to the value in *var. On success, the memory ordering used was order_success; otherwise, it was order_failure.\n order_failure must be no stronger than order_success, and must not be release or acq_rel.\n Returns true if the compare was successful and the variable updated to desired."] pub fn aws_atomic_compare_exchange_ptr_explicit (var : * mut aws_atomic_var , expected : * mut * mut :: libc :: c_void , desired : * mut :: libc :: c_void , order_success : aws_memory_order , order_failure : aws_memory_order) -> bool ; } unsafe extern "C" { # [doc = " Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set\n to the value in *var. Uses sequentially consistent memory ordering, regardless of success or failure.\n Returns true if the compare was successful and the variable updated to desired."] pub fn aws_atomic_compare_exchange_ptr (var : * mut aws_atomic_var , expected : * mut * mut :: libc :: c_void , desired : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " Atomically adds n to *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_add_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically subtracts n from *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_sub_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically ORs n with *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_or_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically ANDs n with *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_and_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically XORs n with *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_xor_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically adds n to *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_add (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Atomically subtracts n from *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_sub (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Atomically ands n into *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_and (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Atomically ors n into *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_or (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Atomically xors n into *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_xor (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Provides the same reordering guarantees as an atomic operation with the specified memory order, without\n needing to actually perform an atomic operation."] pub fn aws_atomic_thread_fence (order : aws_memory_order) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_string { pub allocator : * mut aws_allocator , pub len : usize , pub bytes : [u8 ; 1usize] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_string"] [:: std :: mem :: size_of :: < aws_string > () - 24usize] ; ["Alignment of aws_string"] [:: std :: mem :: align_of :: < aws_string > () - 8usize] ; ["Offset of field: aws_string::allocator"] [:: std :: mem :: offset_of ! (aws_string , allocator) - 0usize] ; ["Offset of field: aws_string::len"] [:: std :: mem :: offset_of ! (aws_string , len) - 8usize] ; ["Offset of field: aws_string::bytes"] [:: std :: mem :: offset_of ! (aws_string , bytes) - 16usize] ; } ; 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 () } } } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn aws_string_eq_c_str (str_ : * const aws_string , c_str : * const :: libc :: c_char) -> bool ; } unsafe 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 :: libc :: c_char) -> bool ; } unsafe 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 :: libc :: c_char) -> * mut aws_string ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Deallocate string."] pub fn aws_string_destroy (str_ : * mut aws_string) ; } unsafe extern "C" { # [doc = " Zeroes out the data bytes of string and then deallocates the memory.\n Not safe to run on a string created with AWS_STATIC_STRING_FROM_LITERAL."] pub fn aws_string_destroy_secure (str_ : * mut aws_string) ; } unsafe extern "C" { # [doc = " Compares lexicographical ordering of two strings. This is a binary\n byte-by-byte comparison, treating bytes as unsigned integers. It is suitable\n for either textual or binary data and is unaware of unicode or any other byte\n encoding. If both strings are identical in the bytes of the shorter string,\n then the longer string is lexicographically after the shorter.\n\n Returns a positive number if string a > string b. (i.e., string a is\n lexicographically after string b.) Returns zero if string a = string b.\n Returns negative number if string a < string b."] pub fn aws_string_compare (a : * const aws_string , b : * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " A convenience function for sorting lists of (const struct aws_string *) elements. This can be used as a\n 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 :: libc :: c_void , b : * const :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies all bytes from string to buf.\n\n On success, returns true and updates the buf pointer/length\n accordingly. If there is insufficient space in the buf, returns\n false, leaving the buf unchanged."] pub fn aws_byte_buf_write_from_whole_string (buf : * mut aws_byte_buf , src : * const aws_string) -> bool ; } unsafe extern "C" { # [doc = " Creates an aws_byte_cursor from an existing string.\n If the src is NULL, it returns an empty cursor"] pub fn aws_byte_cursor_from_string (src : * const aws_string) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " If the string was dynamically allocated, clones it. If the string was statically allocated (i.e. has no allocator),\n returns the original string."] pub fn aws_string_clone_or_reuse (allocator : * mut aws_allocator , str_ : * const aws_string) -> * mut aws_string ; } unsafe 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\n is found within max_read_len of str, AWS_ERROR_C_STRING_BUFFER_NOT_NULL_TERMINATED is raised. Otherwise, str_len\n will contain the string length minus the NULL character, and AWS_OP_SUCCESS will be returned."] pub fn aws_secure_strlen (str_ : * const :: libc :: c_char , max_read_len : usize , str_len : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Equivalent to str->bytes."] pub fn aws_string_bytes (str_ : * const aws_string) -> * const u8 ; } unsafe extern "C" { # [doc = " Equivalent to `(const char *)str->bytes`."] pub fn aws_string_c_str (str_ : * const aws_string) -> * const :: libc :: c_char ; } unsafe extern "C" { # [doc = " Evaluates the set of properties that define the shape of all valid aws_string structures.\n It is also a cheap check, in the sense it run in constant time (i.e., no loops or recursion)."] pub fn aws_string_is_valid (str_ : * const aws_string) -> bool ; } unsafe extern "C" { # [doc = " Best-effort checks aws_string invariants, when the str->len is unknown"] pub fn aws_c_string_is_valid (str_ : * const :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " Evaluates if a char is a white character."] pub fn aws_char_is_space (c : u8) -> bool ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_thread_detach_state { AWS_THREAD_NOT_CREATED = 1 , AWS_THREAD_JOINABLE = 2 , AWS_THREAD_JOIN_COMPLETED = 3 , AWS_THREAD_MANAGED = 4 , } # [repr (u32)] # [non_exhaustive] # [doc = " Specifies the join strategy used on an aws_thread, which in turn controls whether or not a thread participates\n in the managed thread system.  The managed thread system provides logic to guarantee a join on all participating\n threads at the cost of laziness (the user cannot control when joins happen).\n\n Manual - thread does not participate in the managed thread system; any joins must be done by the user.  This\n is the default.  The user must call aws_thread_clean_up(), but only after any desired join operation has completed.\n Not doing so will cause the windows handle to leak.\n\n Managed - the managed thread system will automatically perform a join some time after the thread's run function\n has completed.  It is an error to call aws_thread_join on a thread configured with the managed join strategy.  The\n managed thread system will call aws_thread_clean_up() on the thread after the background join has completed.\n\n Additionally, an API exists, aws_thread_join_all_managed(), which blocks and returns when all outstanding threads\n with the managed strategy have fully joined.  This API is useful for tests (rather than waiting for many individual\n signals) and program shutdown or DLL unload.  This API is automatically invoked by the common library clean up\n function.  If the common library clean up is called from a managed thread, this will cause deadlock.\n\n Lazy thread joining is done only when threads finish their run function or when the user calls\n aws_thread_join_all_managed().  This means it may be a long time between thread function completion and the join\n being applied, but the queue of unjoined threads is always one or fewer so there is no critical resource\n backlog.\n\n Currently, only event loop group async cleanup and host resolver threads participate in the managed thread system.\n Additionally, event loop threads will increment and decrement the pending join count (they are manually joined\n internally) in order to have an accurate view of internal thread usage and also to prevent failure to release\n an event loop group fully from allowing aws_thread_join_all_managed() from running to completion when its\n intent is such that it should block instead."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_thread_join_strategy { AWS_TJS_MANUAL = 0 , AWS_TJS_MANAGED = 1 , } # [repr (C)] # [derive (Debug , Copy , Clone)] 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.\n The length should not exceed AWS_THREAD_NAME_RECOMMENDED_STRLEN(15)\n if you want it to display properly on all platforms."] pub name : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_thread_options"] [:: std :: mem :: size_of :: < aws_thread_options > () - 32usize] ; ["Alignment of aws_thread_options"] [:: std :: mem :: align_of :: < aws_thread_options > () - 8usize] ; ["Offset of field: aws_thread_options::stack_size"] [:: std :: mem :: offset_of ! (aws_thread_options , stack_size) - 0usize] ; ["Offset of field: aws_thread_options::cpu_id"] [:: std :: mem :: offset_of ! (aws_thread_options , cpu_id) - 8usize] ; ["Offset of field: aws_thread_options::join_strategy"] [:: std :: mem :: offset_of ! (aws_thread_options , join_strategy) - 12usize] ; ["Offset of field: aws_thread_options::name"] [:: std :: mem :: offset_of ! (aws_thread_options , name) - 16usize] ; } ; 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_thread"] [:: std :: mem :: size_of :: < aws_thread > () - 24usize] ; ["Alignment of aws_thread"] [:: std :: mem :: align_of :: < aws_thread > () - 8usize] ; ["Offset of field: aws_thread::allocator"] [:: std :: mem :: offset_of ! (aws_thread , allocator) - 0usize] ; ["Offset of field: aws_thread::detach_state"] [:: std :: mem :: offset_of ! (aws_thread , detach_state) - 8usize] ; ["Offset of field: aws_thread::thread_id"] [:: std :: mem :: offset_of ! (aws_thread , thread_id) - 16usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Returns an instance of system default thread options."] pub fn aws_default_thread_options () -> * const aws_thread_options ; } unsafe extern "C" { pub fn aws_thread_call_once (flag : * mut aws_thread_once , call_once : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: libc :: c_void) > , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Initializes a new platform specific thread object struct (not the os-level\n thread itself)."] pub fn aws_thread_init (thread : * mut aws_thread , allocator : * mut aws_allocator) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Creates an OS level thread and associates it with func. context will be passed to func when it is executed.\n options will be applied to the thread if they are applicable for the platform.\n\n After launch, you may join on the thread.  A successfully launched thread must have clean_up called on it in order\n to avoid a handle leak.  If you do not join before calling clean_up, the thread will become detached.\n\n 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 :: libc :: c_void) > , arg : * mut :: libc :: c_void , options : * const aws_thread_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the id of thread"] pub fn aws_thread_get_id (thread : * mut aws_thread) -> aws_thread_id_t ; } unsafe extern "C" { # [doc = " Gets the detach state of the thread. For example, is it safe to call join on\n this thread? Has it been detached()?"] pub fn aws_thread_get_detach_state (thread : * mut aws_thread) -> aws_thread_detach_state ; } unsafe extern "C" { # [doc = " Joins the calling thread to a thread instance. Returns when thread is\n finished.  Calling this from the associated OS thread will cause a deadlock."] pub fn aws_thread_join (thread : * mut aws_thread) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Blocking call that waits for all managed threads to complete their join call.  This can only be called\n from the main thread or a non-managed thread.\n\n This gets called automatically from library cleanup.\n\n 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 () -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Overrides how long, in nanoseconds, that aws_thread_join_all_managed will wait for threads to complete.\n A value of zero will result in an unbounded wait."] pub fn aws_thread_set_managed_join_timeout_ns (timeout_in_ns : u64) ; } unsafe 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\n before calling this function."] pub fn aws_thread_clean_up (thread : * mut aws_thread) ; } unsafe extern "C" { # [doc = " Returns the thread id of the calling thread."] pub fn aws_thread_current_thread_id () -> aws_thread_id_t ; } unsafe extern "C" { # [doc = " Compare thread ids."] pub fn aws_thread_thread_id_equal (t1 : aws_thread_id_t , t2 : aws_thread_id_t) -> bool ; } unsafe 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 :: libc :: c_void) > ; unsafe extern "C" { # [doc = " Adds a callback to the chain to be called when the current thread joins.\n Callbacks are called from the current thread, in the reverse order they\n were added, after the thread function returns.\n 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 :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Increments the count of unjoined threads in the managed thread system.  Used by managed threads and\n event loop threads.  Additional usage requires the user to join corresponding threads themselves and\n correctly increment/decrement even in the face of launch/join errors.\n\n aws_thread_join_all_managed() will not return until this count has gone to zero."] pub fn aws_thread_increment_unjoined_count () ; } unsafe extern "C" { # [doc = " Decrements the count of unjoined threads in the managed thread system.  Used by managed threads and\n event loop threads.  Additional usage requires the user to join corresponding threads themselves and\n correctly increment/decrement even in the face of launch/join errors.\n\n aws_thread_join_all_managed() will not return until this count has gone to zero."] pub fn aws_thread_decrement_unjoined_count () ; } unsafe extern "C" { # [doc = " Gets name of the current thread.\n Caller is responsible for destroying returned string.\n If thread does not have a name, AWS_OP_SUCCESS is returned and out_name is\n set to NULL.\n If underlying OS call fails,  AWS_ERROR_SYS_CALL_FAILURE will be raised\n If OS does not support getting thread name, AWS_ERROR_PLATFORM_NOT_SUPPORTED\n will be raised"] pub fn aws_thread_current_name (allocator : * mut aws_allocator , out_name : * mut * mut aws_string) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets name of the thread.\n Caller is responsible for destroying returned string.\n If thread does not have a name, AWS_OP_SUCCESS is returned and out_name is\n set to NULL.\n If underlying OS call fails,  AWS_ERROR_SYS_CALL_FAILURE will be raised\n If OS does not support getting thread name, AWS_ERROR_PLATFORM_NOT_SUPPORTED\n will be raised"] pub fn aws_thread_name (allocator : * mut aws_allocator , thread_id : aws_thread_id_t , out_name : * mut * mut aws_string) -> :: libc :: c_int ; } pub mod aws_log_level { # [doc = " Controls what log calls pass through the logger and what log calls get filtered out.\n If a log level has a value of X, then all log calls using a level <= X will appear, while\n those using a value > X will not occur.\n\n You can filter both dynamically (by setting the log level on the logger object) or statically\n (by defining AWS_STATIC_LOG_LEVEL to be an appropriate integer module-wide).  Statically filtered\n log calls will be completely compiled out but require a rebuild if you want to get more detail\n about what's happening."] pub type Type = :: libc :: c_uint ; pub const AWS_LL_NONE : Type = 0 ; pub const AWS_LL_FATAL : Type = 1 ; pub const AWS_LL_ERROR : Type = 2 ; pub const AWS_LL_WARN : Type = 3 ; pub const AWS_LL_INFO : Type = 4 ; pub const AWS_LL_DEBUG : Type = 5 ; pub const AWS_LL_TRACE : Type = 6 ; pub const AWS_LL_COUNT : Type = 7 ; } # [doc = " Log subject is a way of designating the topic of logging.\n\n The general idea is to support a finer-grained approach to log level control.  The primary use case\n is for situations that require more detailed logging within a specific domain, where enabling that detail\n globally leads to an untenable flood of information.\n\n For example, enable TRACE logging for tls-related log statements (handshake binary payloads), but\n only WARN logging everywhere else (because http payloads would blow up the log files).\n\n Log subject is an enum similar to aws error: each library has its own value-space and someone is\n responsible for registering the value <-> string connections."] pub type aws_log_subject_t = u32 ; pub const AWS_LOG_SUBJECT_STRIDE_BITS : _bindgen_ty_20 = _bindgen_ty_20 :: AWS_LOG_SUBJECT_STRIDE_BITS ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_20 { AWS_LOG_SUBJECT_STRIDE_BITS = 10 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_log_subject_info { pub subject_id : aws_log_subject_t , pub subject_name : * const :: libc :: c_char , pub subject_description : * const :: libc :: c_char , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_subject_info"] [:: std :: mem :: size_of :: < aws_log_subject_info > () - 24usize] ; ["Alignment of aws_log_subject_info"] [:: std :: mem :: align_of :: < aws_log_subject_info > () - 8usize] ; ["Offset of field: aws_log_subject_info::subject_id"] [:: std :: mem :: offset_of ! (aws_log_subject_info , subject_id) - 0usize] ; ["Offset of field: aws_log_subject_info::subject_name"] [:: std :: mem :: offset_of ! (aws_log_subject_info , subject_name) - 8usize] ; ["Offset of field: aws_log_subject_info::subject_description"] [:: std :: mem :: offset_of ! (aws_log_subject_info , subject_description) - 16usize] ; } ; 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)] pub struct aws_log_subject_info_list { pub subject_list : * mut aws_log_subject_info , pub count : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_subject_info_list"] [:: std :: mem :: size_of :: < aws_log_subject_info_list > () - 16usize] ; ["Alignment of aws_log_subject_info_list"] [:: std :: mem :: align_of :: < aws_log_subject_info_list > () - 8usize] ; ["Offset of field: aws_log_subject_info_list::subject_list"] [:: std :: mem :: offset_of ! (aws_log_subject_info_list , subject_list) - 0usize] ; ["Offset of field: aws_log_subject_info_list::count"] [:: std :: mem :: offset_of ! (aws_log_subject_info_list , count) - 8usize] ; } ; 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 () } } } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_common_log_subject { AWS_LS_COMMON_GENERAL = 0 , AWS_LS_COMMON_TASK_SCHEDULER = 1 , AWS_LS_COMMON_THREAD = 2 , AWS_LS_COMMON_MEMTRACE = 3 , AWS_LS_COMMON_XML_PARSER = 4 , AWS_LS_COMMON_IO = 5 , AWS_LS_COMMON_BUS = 6 , AWS_LS_COMMON_TEST = 7 , AWS_LS_COMMON_JSON_PARSER = 8 , AWS_LS_COMMON_CBOR = 9 , AWS_LS_COMMON_LAST = 1023 , } # [doc = " We separate the log level function from the log call itself so that we can do the filter check in the macros (see\n below)\n\n By doing so, we make it so that the variadic format arguments are not even evaluated if the filter check does not\n succeed."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_logger_vtable { pub log : :: std :: option :: Option < unsafe extern "C" fn (logger : * mut aws_logger , log_level : aws_log_level :: Type , subject : aws_log_subject_t , format : * const :: libc :: c_char , ...) -> :: libc :: 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 :: Type > , 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 :: Type) -> :: libc :: c_int > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logger_vtable"] [:: std :: mem :: size_of :: < aws_logger_vtable > () - 32usize] ; ["Alignment of aws_logger_vtable"] [:: std :: mem :: align_of :: < aws_logger_vtable > () - 8usize] ; ["Offset of field: aws_logger_vtable::log"] [:: std :: mem :: offset_of ! (aws_logger_vtable , log) - 0usize] ; ["Offset of field: aws_logger_vtable::get_log_level"] [:: std :: mem :: offset_of ! (aws_logger_vtable , get_log_level) - 8usize] ; ["Offset of field: aws_logger_vtable::clean_up"] [:: std :: mem :: offset_of ! (aws_logger_vtable , clean_up) - 16usize] ; ["Offset of field: aws_logger_vtable::set_log_level"] [:: std :: mem :: offset_of ! (aws_logger_vtable , set_log_level) - 24usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_logger { pub vtable : * mut aws_logger_vtable , pub allocator : * mut aws_allocator , pub p_impl : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logger"] [:: std :: mem :: size_of :: < aws_logger > () - 24usize] ; ["Alignment of aws_logger"] [:: std :: mem :: align_of :: < aws_logger > () - 8usize] ; ["Offset of field: aws_logger::vtable"] [:: std :: mem :: offset_of ! (aws_logger , vtable) - 0usize] ; ["Offset of field: aws_logger::allocator"] [:: std :: mem :: offset_of ! (aws_logger , allocator) - 8usize] ; ["Offset of field: aws_logger::p_impl"] [:: std :: mem :: offset_of ! (aws_logger , p_impl) - 16usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logger_pipeline"] [:: std :: mem :: size_of :: < aws_logger_pipeline > () - 40usize] ; ["Alignment of aws_logger_pipeline"] [:: std :: mem :: align_of :: < aws_logger_pipeline > () - 8usize] ; ["Offset of field: aws_logger_pipeline::formatter"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , formatter) - 0usize] ; ["Offset of field: aws_logger_pipeline::channel"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , channel) - 8usize] ; ["Offset of field: aws_logger_pipeline::writer"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , writer) - 16usize] ; ["Offset of field: aws_logger_pipeline::allocator"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , allocator) - 24usize] ; ["Offset of field: aws_logger_pipeline::level"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , level) - 32usize] ; } ; 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().\n Set `filename` to open a file for logging and close it when the logger cleans up.\n Set `file` to use a file that is already open, such as `stderr` or `stdout`."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_logger_standard_options { pub level : aws_log_level :: Type , pub filename : * const :: libc :: c_char , pub file : * mut FILE , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logger_standard_options"] [:: std :: mem :: size_of :: < aws_logger_standard_options > () - 24usize] ; ["Alignment of aws_logger_standard_options"] [:: std :: mem :: align_of :: < aws_logger_standard_options > () - 8usize] ; ["Offset of field: aws_logger_standard_options::level"] [:: std :: mem :: offset_of ! (aws_logger_standard_options , level) - 0usize] ; ["Offset of field: aws_logger_standard_options::filename"] [:: std :: mem :: offset_of ! (aws_logger_standard_options , filename) - 8usize] ; ["Offset of field: aws_logger_standard_options::file"] [:: std :: mem :: offset_of ! (aws_logger_standard_options , file) - 16usize] ; } ; 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 () } } } unsafe 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) ; } unsafe extern "C" { # [doc = " Gets the aws logger used globally across the process."] pub fn aws_logger_get () -> * mut aws_logger ; } unsafe extern "C" { # [doc = " Gets the aws logger used globally across the process if the logging level is at least the inputted level.\n\n @param subject log subject to perform the level check versus, not currently used\n @param level logging level to check against in order to return the logger\n @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 :: Type) -> * mut aws_logger ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Sets the current logging level for the logger.  Loggers are not require to support this.\n @param logger logger to set the log level for\n @param level new log level for the logger\n @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 :: Type) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Converts a log level to a c-string constant.  Intended primarily to support building log lines that\n include the level in them, i.e.\n\n [ERROR] 10:34:54.642 01-31-19 - Json parse error...."] pub fn aws_log_level_to_string (log_level : aws_log_level :: Type , level_string : * mut * const :: libc :: c_char) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Converts a c-string constant to a log level value.  Uses case-insensitive comparison\n and simply iterates all possibilities until a match or nothing remains.  If no match\n is found, AWS_OP_ERR is returned."] pub fn aws_string_to_log_level (level_string : * const :: libc :: c_char , log_level : * mut aws_log_level :: Type) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Converts an aws_thread_id_t to a c-string.  For portability, aws_thread_id_t\n must not be printed directly.  Intended primarily to support building log\n lines that include the thread id in them.  The parameter `buffer` must\n point-to a char buffer of length `bufsz == AWS_THREAD_ID_T_REPR_BUFSZ`.  The\n thread id representation is returned in `buffer`."] pub fn aws_thread_id_t_to_string (thread_id : aws_thread_id_t , buffer : * mut :: libc :: c_char , bufsz : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get subject name from log subject."] pub fn aws_log_subject_name (subject : aws_log_subject_t) -> * const :: libc :: c_char ; } unsafe 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) ; } unsafe 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) ; } unsafe extern "C" { pub fn aws_logger_init_standard (logger : * mut aws_logger , allocator : * mut aws_allocator , options : * mut aws_logger_standard_options) -> :: libc :: c_int ; } unsafe 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 :: Type) -> :: libc :: c_int ; } unsafe extern "C" { pub static mut g_pipeline_logger_owned_vtable : aws_logger_vtable ; } unsafe extern "C" { pub fn aws_logger_init_noalloc (logger : * mut aws_logger , allocator : * mut aws_allocator , options : * mut aws_logger_standard_options) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_io_log_subject { AWS_LS_IO_GENERAL = 1024 , AWS_LS_IO_EVENT_LOOP = 1025 , AWS_LS_IO_SOCKET = 1026 , AWS_LS_IO_SOCKET_HANDLER = 1027 , AWS_LS_IO_TLS = 1028 , AWS_LS_IO_ALPN = 1029 , AWS_LS_IO_DNS = 1030 , AWS_LS_IO_PKI = 1031 , AWS_LS_IO_CHANNEL = 1032 , AWS_LS_IO_CHANNEL_BOOTSTRAP = 1033 , AWS_LS_IO_FILE_UTILS = 1034 , AWS_LS_IO_SHARED_LIBRARY = 1035 , AWS_LS_IO_EXPONENTIAL_BACKOFF_RETRY_STRATEGY = 1036 , AWS_LS_IO_STANDARD_RETRY_STRATEGY = 1037 , AWS_LS_IO_PKCS11 = 1038 , AWS_LS_IO_PEM = 1039 , AWS_IO_LS_LAST = 2047 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_sdkutils_errors { AWS_ERROR_SDKUTILS_GENERAL = 15360 , AWS_ERROR_SDKUTILS_PARSE_FATAL = 15361 , AWS_ERROR_SDKUTILS_PARSE_RECOVERABLE = 15362 , AWS_ERROR_SDKUTILS_ENDPOINTS_UNSUPPORTED_RULESET = 15363 , AWS_ERROR_SDKUTILS_ENDPOINTS_PARSE_FAILED = 15364 , AWS_ERROR_SDKUTILS_ENDPOINTS_RESOLVE_INIT_FAILED = 15365 , AWS_ERROR_SDKUTILS_ENDPOINTS_RESOLVE_FAILED = 15366 , AWS_ERROR_SDKUTILS_ENDPOINTS_EMPTY_RULESET = 15367 , AWS_ERROR_SDKUTILS_ENDPOINTS_RULESET_EXHAUSTED = 15368 , AWS_ERROR_SDKUTILS_PARTITIONS_UNSUPPORTED = 15369 , AWS_ERROR_SDKUTILS_PARTITIONS_PARSE_FAILED = 15370 , AWS_ERROR_SDKUTILS_ENDPOINTS_UNSUPPORTED_REGEX = 15371 , AWS_ERROR_SDKUTILS_ENDPOINTS_REGEX_NO_MATCH = 15372 , AWS_ERROR_SDKUTILS_END_RANGE = 16383 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_sdkutils_log_subject { AWS_LS_SDKUTILS_GENERAL = 15360 , AWS_LS_SDKUTILS_PROFILE = 15361 , AWS_LS_SDKUTILS_ENDPOINTS_PARSING = 15362 , AWS_LS_SDKUTILS_ENDPOINTS_RESOLVE = 15363 , AWS_LS_SDKUTILS_ENDPOINTS_GENERAL = 15364 , AWS_LS_SDKUTILS_PARTITIONS_PARSING = 15365 , AWS_LS_SDKUTILS_ENDPOINTS_REGEX = 15366 , AWS_LS_SDKUTILS_LAST = 16383 , } unsafe extern "C" { pub fn aws_sdkutils_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { pub fn aws_sdkutils_library_clean_up () ; } # [repr (u32)] # [non_exhaustive] # [doc = " Auth-specific error codes"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_auth_errors { AWS_AUTH_PROFILE_PARSE_RECOVERABLE_ERROR = 15362 , AWS_AUTH_PROFILE_PARSE_FATAL_ERROR = 15361 , AWS_AUTH_SIGNING_UNSUPPORTED_ALGORITHM = 6144 , AWS_AUTH_SIGNING_MISMATCHED_CONFIGURATION = 6145 , AWS_AUTH_SIGNING_NO_CREDENTIALS = 6146 , AWS_AUTH_SIGNING_ILLEGAL_REQUEST_QUERY_PARAM = 6147 , AWS_AUTH_SIGNING_ILLEGAL_REQUEST_HEADER = 6148 , AWS_AUTH_SIGNING_INVALID_CONFIGURATION = 6149 , AWS_AUTH_CREDENTIALS_PROVIDER_INVALID_ENVIRONMENT = 6150 , AWS_AUTH_CREDENTIALS_PROVIDER_INVALID_DELEGATE = 6151 , AWS_AUTH_CREDENTIALS_PROVIDER_PROFILE_SOURCE_FAILURE = 6152 , AWS_AUTH_CREDENTIALS_PROVIDER_IMDS_SOURCE_FAILURE = 6153 , AWS_AUTH_CREDENTIALS_PROVIDER_STS_SOURCE_FAILURE = 6154 , AWS_AUTH_CREDENTIALS_PROVIDER_HTTP_STATUS_FAILURE = 6155 , AWS_AUTH_PROVIDER_PARSER_UNEXPECTED_RESPONSE = 6156 , AWS_AUTH_CREDENTIALS_PROVIDER_ECS_SOURCE_FAILURE = 6157 , AWS_AUTH_CREDENTIALS_PROVIDER_X509_SOURCE_FAILURE = 6158 , AWS_AUTH_CREDENTIALS_PROVIDER_PROCESS_SOURCE_FAILURE = 6159 , AWS_AUTH_CREDENTIALS_PROVIDER_STS_WEB_IDENTITY_SOURCE_FAILURE = 6160 , AWS_AUTH_SIGNING_UNSUPPORTED_SIGNATURE_TYPE = 6161 , AWS_AUTH_SIGNING_MISSING_PREVIOUS_SIGNATURE = 6162 , AWS_AUTH_SIGNING_INVALID_CREDENTIALS = 6163 , AWS_AUTH_CANONICAL_REQUEST_MISMATCH = 6164 , AWS_AUTH_SIGV4A_SIGNATURE_VALIDATION_FAILURE = 6165 , AWS_AUTH_CREDENTIALS_PROVIDER_COGNITO_SOURCE_FAILURE = 6166 , AWS_AUTH_CREDENTIALS_PROVIDER_DELEGATE_FAILURE = 6167 , AWS_AUTH_SSO_TOKEN_PROVIDER_SOURCE_FAILURE = 6168 , AWS_AUTH_SSO_TOKEN_INVALID = 6169 , AWS_AUTH_SSO_TOKEN_EXPIRED = 6170 , AWS_AUTH_CREDENTIALS_PROVIDER_SSO_SOURCE_FAILURE = 6171 , AWS_AUTH_IMDS_CLIENT_SOURCE_FAILURE = 6172 , AWS_AUTH_PROFILE_STS_CREDENTIALS_PROVIDER_CYCLE_FAILURE = 6173 , AWS_AUTH_CREDENTIALS_PROVIDER_ECS_INVALID_TOKEN_FILE_PATH = 6174 , AWS_AUTH_CREDENTIALS_PROVIDER_ECS_INVALID_HOST = 6175 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_SESSION_MISSING = 6176 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_REGION_MISSING = 6177 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_TOKEN_PATH = 6178 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_TOKEN = 6179 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_TOKEN_EXPIRED = 6180 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_INVALID_PEM = 6181 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_REFRESH_TOKEN = 6182 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_WRITE_TOKEN = 6183 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_DPOP_HEADER = 6184 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_REQUEST_BODY = 6185 , AWS_AUTH_ERROR_END_RANGE = 7167 , } # [repr (u32)] # [non_exhaustive] # [doc = " Auth-specific logging subjects"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_auth_log_subject { AWS_LS_AUTH_GENERAL = 6144 , AWS_LS_AUTH_PROFILE = 6145 , AWS_LS_AUTH_CREDENTIALS_PROVIDER = 6146 , AWS_LS_AUTH_SIGNING = 6147 , AWS_LS_IMDS_CLIENT = 6148 , AWS_LS_AUTH_LAST = 7167 , } unsafe extern "C" { # [doc = " Initializes internal datastructures used by aws-c-auth.\n Must be called before using any functionality in aws-c-auth.\n\n @param allocator memory allocator to use for any module-level memory allocation"] pub fn aws_auth_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Clean up internal datastructures used by aws-c-auth.\n Must not be called until application is done using functionality in aws-c-auth."] pub fn aws_auth_library_clean_up () ; } pub type aws_simple_completion_callback = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: libc :: c_void) > ; # [doc = " Configuration for a callback to invoke when something has been completely\n cleaned up.  Primarily used in async cleanup control flows."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_shutdown_callback_options { # [doc = " Function to invoke when the associated object is fully destroyed."] pub shutdown_callback_fn : aws_simple_completion_callback , # [doc = " User data to invoke the shutdown callback with."] pub shutdown_callback_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_shutdown_callback_options"] [:: std :: mem :: size_of :: < aws_shutdown_callback_options > () - 16usize] ; ["Alignment of aws_shutdown_callback_options"] [:: std :: mem :: align_of :: < aws_shutdown_callback_options > () - 8usize] ; ["Offset of field: aws_shutdown_callback_options::shutdown_callback_fn"] [:: std :: mem :: offset_of ! (aws_shutdown_callback_options , shutdown_callback_fn) - 0usize] ; ["Offset of field: aws_shutdown_callback_options::shutdown_callback_user_data"] [:: std :: mem :: offset_of ! (aws_shutdown_callback_options , shutdown_callback_user_data) - 8usize] ; } ; 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 () } } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_ref_count { pub ref_count : aws_atomic_var , pub object : * mut :: libc :: c_void , pub on_zero_fn : aws_simple_completion_callback , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_ref_count"] [:: std :: mem :: size_of :: < aws_ref_count > () - 24usize] ; ["Alignment of aws_ref_count"] [:: std :: mem :: align_of :: < aws_ref_count > () - 8usize] ; ["Offset of field: aws_ref_count::ref_count"] [:: std :: mem :: offset_of ! (aws_ref_count , ref_count) - 0usize] ; ["Offset of field: aws_ref_count::object"] [:: std :: mem :: offset_of ! (aws_ref_count , object) - 8usize] ; ["Offset of field: aws_ref_count::on_zero_fn"] [:: std :: mem :: offset_of ! (aws_ref_count , on_zero_fn) - 16usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Initializes a ref-counter structure.  After initialization, the ref count will be 1.\n\n @param ref_count ref-counter to initialize\n @param object object being ref counted\n @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 :: libc :: c_void , on_zero_fn : aws_simple_completion_callback) ; } unsafe extern "C" { # [doc = " Increments a ref-counter's ref count\n\n @param ref_count ref-counter to increment the count for\n @return the object being ref-counted"] pub fn aws_ref_count_acquire (ref_count : * mut aws_ref_count) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Decrements a ref-counter's ref count.  Invokes the on_zero callback if the ref count drops to zero\n @param ref_count ref-counter to decrement the count for\n @return the value of the decremented ref count"] pub fn aws_ref_count_release (ref_count : * mut aws_ref_count) -> usize ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_errors { AWS_ERROR_HTTP_UNKNOWN = 2048 , AWS_ERROR_HTTP_HEADER_NOT_FOUND = 2049 , AWS_ERROR_HTTP_INVALID_HEADER_FIELD = 2050 , AWS_ERROR_HTTP_INVALID_HEADER_NAME = 2051 , AWS_ERROR_HTTP_INVALID_HEADER_VALUE = 2052 , AWS_ERROR_HTTP_INVALID_METHOD = 2053 , AWS_ERROR_HTTP_INVALID_PATH = 2054 , AWS_ERROR_HTTP_INVALID_STATUS_CODE = 2055 , AWS_ERROR_HTTP_MISSING_BODY_STREAM = 2056 , AWS_ERROR_HTTP_INVALID_BODY_STREAM = 2057 , AWS_ERROR_HTTP_CONNECTION_CLOSED = 2058 , AWS_ERROR_HTTP_SWITCHED_PROTOCOLS = 2059 , AWS_ERROR_HTTP_UNSUPPORTED_PROTOCOL = 2060 , AWS_ERROR_HTTP_REACTION_REQUIRED = 2061 , AWS_ERROR_HTTP_DATA_NOT_AVAILABLE = 2062 , AWS_ERROR_HTTP_OUTGOING_STREAM_LENGTH_INCORRECT = 2063 , AWS_ERROR_HTTP_CALLBACK_FAILURE = 2064 , AWS_ERROR_HTTP_WEBSOCKET_UPGRADE_FAILURE = 2065 , AWS_ERROR_HTTP_WEBSOCKET_CLOSE_FRAME_SENT = 2066 , AWS_ERROR_HTTP_WEBSOCKET_IS_MIDCHANNEL_HANDLER = 2067 , AWS_ERROR_HTTP_CONNECTION_MANAGER_INVALID_STATE_FOR_ACQUIRE = 2068 , AWS_ERROR_HTTP_CONNECTION_MANAGER_VENDED_CONNECTION_UNDERFLOW = 2069 , AWS_ERROR_HTTP_SERVER_CLOSED = 2070 , AWS_ERROR_HTTP_PROXY_CONNECT_FAILED = 2071 , AWS_ERROR_HTTP_CONNECTION_MANAGER_SHUTTING_DOWN = 2072 , AWS_ERROR_HTTP_CHANNEL_THROUGHPUT_FAILURE = 2073 , AWS_ERROR_HTTP_PROTOCOL_ERROR = 2074 , AWS_ERROR_HTTP_STREAM_IDS_EXHAUSTED = 2075 , AWS_ERROR_HTTP_GOAWAY_RECEIVED = 2076 , AWS_ERROR_HTTP_RST_STREAM_RECEIVED = 2077 , AWS_ERROR_HTTP_RST_STREAM_SENT = 2078 , AWS_ERROR_HTTP_STREAM_NOT_ACTIVATED = 2079 , AWS_ERROR_HTTP_STREAM_HAS_COMPLETED = 2080 , AWS_ERROR_HTTP_PROXY_STRATEGY_NTLM_CHALLENGE_TOKEN_MISSING = 2081 , AWS_ERROR_HTTP_PROXY_STRATEGY_TOKEN_RETRIEVAL_FAILURE = 2082 , AWS_ERROR_HTTP_PROXY_CONNECT_FAILED_RETRYABLE = 2083 , AWS_ERROR_HTTP_PROTOCOL_SWITCH_FAILURE = 2084 , AWS_ERROR_HTTP_MAX_CONCURRENT_STREAMS_EXCEEDED = 2085 , AWS_ERROR_HTTP_STREAM_MANAGER_SHUTTING_DOWN = 2086 , AWS_ERROR_HTTP_STREAM_MANAGER_CONNECTION_ACQUIRE_FAILURE = 2087 , AWS_ERROR_HTTP_STREAM_MANAGER_UNEXPECTED_HTTP_VERSION = 2088 , AWS_ERROR_HTTP_WEBSOCKET_PROTOCOL_ERROR = 2089 , AWS_ERROR_HTTP_MANUAL_WRITE_NOT_ENABLED = 2090 , AWS_ERROR_HTTP_MANUAL_WRITE_HAS_COMPLETED = 2091 , AWS_ERROR_HTTP_RESPONSE_FIRST_BYTE_TIMEOUT = 2092 , AWS_ERROR_HTTP_CONNECTION_MANAGER_ACQUISITION_TIMEOUT = 2093 , AWS_ERROR_HTTP_CONNECTION_MANAGER_MAX_PENDING_ACQUISITIONS_EXCEEDED = 2094 , AWS_ERROR_HTTP_END_RANGE = 3071 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http2_error_code { AWS_HTTP2_ERR_NO_ERROR = 0 , AWS_HTTP2_ERR_PROTOCOL_ERROR = 1 , AWS_HTTP2_ERR_INTERNAL_ERROR = 2 , AWS_HTTP2_ERR_FLOW_CONTROL_ERROR = 3 , AWS_HTTP2_ERR_SETTINGS_TIMEOUT = 4 , AWS_HTTP2_ERR_STREAM_CLOSED = 5 , AWS_HTTP2_ERR_FRAME_SIZE_ERROR = 6 , AWS_HTTP2_ERR_REFUSED_STREAM = 7 , AWS_HTTP2_ERR_CANCEL = 8 , AWS_HTTP2_ERR_COMPRESSION_ERROR = 9 , AWS_HTTP2_ERR_CONNECT_ERROR = 10 , AWS_HTTP2_ERR_ENHANCE_YOUR_CALM = 11 , AWS_HTTP2_ERR_INADEQUATE_SECURITY = 12 , AWS_HTTP2_ERR_HTTP_1_1_REQUIRED = 13 , AWS_HTTP2_ERR_COUNT = 14 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_log_subject { AWS_LS_HTTP_GENERAL = 2048 , AWS_LS_HTTP_CONNECTION = 2049 , AWS_LS_HTTP_ENCODER = 2050 , AWS_LS_HTTP_DECODER = 2051 , AWS_LS_HTTP_SERVER = 2052 , AWS_LS_HTTP_STREAM = 2053 , AWS_LS_HTTP_CONNECTION_MANAGER = 2054 , AWS_LS_HTTP_STREAM_MANAGER = 2055 , AWS_LS_HTTP_WEBSOCKET = 2056 , AWS_LS_HTTP_WEBSOCKET_SETUP = 2057 , AWS_LS_HTTP_PROXY_NEGOTIATION = 2058 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_version { AWS_HTTP_VERSION_UNKNOWN = 0 , AWS_HTTP_VERSION_1_0 = 1 , AWS_HTTP_VERSION_1_1 = 2 , AWS_HTTP_VERSION_2 = 3 , AWS_HTTP_VERSION_COUNT = 4 , } unsafe extern "C" { # [doc = " Initializes internal datastructures used by aws-c-http.\n Must be called before using any functionality in aws-c-http."] pub fn aws_http_library_init (alloc : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Clean up internal datastructures used by aws-c-http.\n Must not be called until application is done using functionality in aws-c-http."] pub fn aws_http_library_clean_up () ; } unsafe extern "C" { pub fn aws_http_error_code_is_retryable (error_code : :: libc :: c_int) -> bool ; } unsafe extern "C" { # [doc = " Returns the description of common status codes.\n Ex: 404 -> \"Not Found\"\n An empty string is returned if the status code is not recognized."] pub fn aws_http_status_text (status_code : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { # [doc = " Shortcuts for common HTTP request methods"] pub static aws_http_method_get : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_head : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_post : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_put : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_delete : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_connect : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_options : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_method : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_scheme : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_authority : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_path : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_status : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_scheme_http : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_scheme_https : aws_byte_cursor ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_impl { _unused : [u8 ; 0] , } # [doc = " Completion callback for aws_future<T>"] pub type aws_future_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; pub type aws_future_impl_result_clean_up_fn = :: std :: option :: Option < unsafe extern "C" fn (result_addr : * mut :: libc :: c_void) > ; pub type aws_future_impl_result_destroy_fn = :: std :: option :: Option < unsafe extern "C" fn (result : * mut :: libc :: c_void) > ; pub type aws_future_impl_result_release_fn = :: std :: option :: Option < unsafe extern "C" fn (result : * mut :: libc :: c_void) -> * mut :: libc :: c_void > ; unsafe extern "C" { pub fn aws_future_impl_new_by_value (alloc : * mut aws_allocator , sizeof_result : usize) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_new_by_value_with_clean_up (alloc : * mut aws_allocator , sizeof_result : usize , result_clean_up : aws_future_impl_result_clean_up_fn) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_new_pointer (alloc : * mut aws_allocator) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_new_pointer_with_destroy (alloc : * mut aws_allocator , result_destroy : aws_future_impl_result_destroy_fn) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_new_pointer_with_release (alloc : * mut aws_allocator , result_release : aws_future_impl_result_release_fn) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_release (promise : * mut aws_future_impl) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_acquire (promise : * mut aws_future_impl) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_set_error (promise : * mut aws_future_impl , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_future_impl_set_result_by_move (promise : * mut aws_future_impl , src_address : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_impl_is_done (future : * const aws_future_impl) -> bool ; } unsafe extern "C" { pub fn aws_future_impl_register_callback (future : * mut aws_future_impl , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_impl_register_callback_if_not_done (future : * mut aws_future_impl , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { pub fn aws_future_impl_register_event_loop_callback (future : * mut aws_future_impl , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_impl_register_channel_callback (future : * mut aws_future_impl , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_impl_wait (future : * const aws_future_impl , timeout_ns : u64) -> bool ; } unsafe extern "C" { pub fn aws_future_impl_get_error (future : * const aws_future_impl) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_future_impl_get_result_address (future : * const aws_future_impl) -> * mut :: libc :: c_void ; } unsafe extern "C" { pub fn aws_future_impl_get_result_by_move (future : * mut aws_future_impl , dst_address : * mut :: libc :: c_void) ; } # [doc = " aws_future<size_t>\n See top of future.h for docs."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_size { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_new (alloc : * mut aws_allocator) -> * mut aws_future_size ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_set_result (future : * mut aws_future_size , result : usize) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_get_result (future : * const aws_future_size) -> usize ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_acquire (future : * mut aws_future_size) -> * mut aws_future_size ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_release (future : * mut aws_future_size) -> * mut aws_future_size ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_set_error (future : * mut aws_future_size , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_is_done (future : * const aws_future_size) -> bool ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_get_error (future : * const aws_future_size) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_register_callback (future : * mut aws_future_size , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_register_callback_if_not_done (future : * mut aws_future_size , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_register_event_loop_callback (future : * mut aws_future_size , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_register_channel_callback (future : * mut aws_future_size , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_wait (future : * mut aws_future_size , timeout_ns : u64) -> bool ; } # [doc = " aws_future<bool>\n See top of future.h for docs."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_bool { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_new (alloc : * mut aws_allocator) -> * mut aws_future_bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_set_result (future : * mut aws_future_bool , result : bool) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_get_result (future : * const aws_future_bool) -> bool ; } unsafe extern "C" { # [doc = " `aws_future<bool>`\n See top of future.h for docs."] pub fn aws_future_bool_acquire (future : * mut aws_future_bool) -> * mut aws_future_bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_release (future : * mut aws_future_bool) -> * mut aws_future_bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_set_error (future : * mut aws_future_bool , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_is_done (future : * const aws_future_bool) -> bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_get_error (future : * const aws_future_bool) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_register_callback (future : * mut aws_future_bool , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_register_callback_if_not_done (future : * mut aws_future_bool , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_register_event_loop_callback (future : * mut aws_future_bool , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_register_channel_callback (future : * mut aws_future_bool , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_wait (future : * mut aws_future_bool , timeout_ns : u64) -> bool ; } # [doc = " aws_future<void>\n See top of future.h for docs."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_void { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<void>\n See top of future.h for docs."] pub fn aws_future_void_new (alloc : * mut aws_allocator) -> * mut aws_future_void ; } unsafe extern "C" { pub fn aws_future_void_set_result (future : * mut aws_future_void) ; } unsafe extern "C" { pub fn aws_future_void_acquire (future : * mut aws_future_void) -> * mut aws_future_void ; } unsafe extern "C" { pub fn aws_future_void_release (future : * mut aws_future_void) -> * mut aws_future_void ; } unsafe extern "C" { pub fn aws_future_void_set_error (future : * mut aws_future_void , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_future_void_is_done (future : * const aws_future_void) -> bool ; } unsafe extern "C" { pub fn aws_future_void_get_error (future : * const aws_future_void) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_future_void_register_callback (future : * mut aws_future_void , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_void_register_callback_if_not_done (future : * mut aws_future_void , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { pub fn aws_future_void_register_event_loop_callback (future : * mut aws_future_void , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_void_register_channel_callback (future : * mut aws_future_void , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_void_wait (future : * mut aws_future_void , timeout_ns : u64) -> bool ; } # [doc = " An HTTP connection.\n This type is used by both server-side and client-side connections.\n This type is also used by all supported versions of HTTP."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_connection { _unused : [u8 ; 0] , } # [doc = " A stream exists for the duration of a request/response exchange.\n A client creates a stream to send a request and receive a response.\n A server creates a stream to receive a request and send a response.\n In http/2, a push-promise stream can be sent by a server and received by a client."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_stream { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [doc = " Controls whether a header's strings may be compressed by encoding the index of\n strings in a cache, rather than encoding the literal string.\n\n This setting has no effect on HTTP/1.x connections.\n On HTTP/2 connections this controls HPACK behavior.\n See RFC-7541 Section 7.1 for security considerations."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_header_compression { # [doc = " Compress header by encoding the cached index of its strings,\n or by updating the cache to contain these strings for future reference.\n Best for headers that are sent repeatedly.\n This is the default setting."] AWS_HTTP_HEADER_COMPRESSION_USE_CACHE = 0 , # [doc = " Encode header strings literally.\n If an intermediary re-broadcasts the headers, it is permitted to use cache.\n Best for unique headers that are unlikely to repeat."] AWS_HTTP_HEADER_COMPRESSION_NO_CACHE = 1 , # [doc = " Encode header strings literally and forbid all intermediaries from using\n cache when re-broadcasting.\n Best for header fields that are highly valuable or sensitive to recovery."] AWS_HTTP_HEADER_COMPRESSION_NO_FORWARD_CACHE = 2 , } # [doc = " A lightweight HTTP header struct.\n Note that the underlying strings are not owned by the byte cursors."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_header { pub name : aws_byte_cursor , pub value : aws_byte_cursor , pub compression : aws_http_header_compression , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_header"] [:: std :: mem :: size_of :: < aws_http_header > () - 40usize] ; ["Alignment of aws_http_header"] [:: std :: mem :: align_of :: < aws_http_header > () - 8usize] ; ["Offset of field: aws_http_header::name"] [:: std :: mem :: offset_of ! (aws_http_header , name) - 0usize] ; ["Offset of field: aws_http_header::value"] [:: std :: mem :: offset_of ! (aws_http_header , value) - 16usize] ; ["Offset of field: aws_http_header::compression"] [:: std :: mem :: offset_of ! (aws_http_header , compression) - 32usize] ; } ; impl Default for aws_http_header { 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 = " A transformable block of HTTP headers.\n Provides a nice API for getting/setting header names and values.\n\n All strings are copied and stored within this datastructure.\n The index of a given header may change any time headers are modified.\n When iterating headers, the following ordering rules apply:\n\n - Headers with the same name will always be in the same order, relative to one another.\n   If \"A: one\" is added before \"A: two\", then \"A: one\" will always precede \"A: two\".\n\n - Headers with different names could be in any order, relative to one another.\n   If \"A: one\" is seen before \"B: bee\" in one iteration, you might see \"B: bee\" before \"A: one\" on the next."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_headers { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [doc = " Header block type.\n INFORMATIONAL: Header block for 1xx informational (interim) responses.\n MAIN: Main header block sent with request or response.\n TRAILING: Headers sent after the body of a request or response."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_header_block { AWS_HTTP_HEADER_BLOCK_MAIN = 0 , AWS_HTTP_HEADER_BLOCK_INFORMATIONAL = 1 , AWS_HTTP_HEADER_BLOCK_TRAILING = 2 , } # [doc = " The definition for an outgoing HTTP request or response.\n The message may be transformed (ex: signing the request) before its data is eventually sent.\n\n The message keeps internal copies of its trivial strings (method, path, headers)\n but does NOT take ownership of its body stream.\n\n A language binding would likely present this as an HttpMessage base class with\n HttpRequest and HttpResponse subclasses."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_message { _unused : [u8 ; 0] , } # [doc = " Function to invoke when a message transformation completes.\n This function MUST be invoked or the application will soft-lock.\n `message` and `complete_ctx` must be the same pointers provided to the `aws_http_message_transform_fn`.\n `error_code` should should be AWS_ERROR_SUCCESS if transformation was successful,\n otherwise pass a different AWS_ERROR_X value."] pub type aws_http_message_transform_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (message : * mut aws_http_message , error_code : :: libc :: c_int , complete_ctx : * mut :: libc :: c_void) > ; # [doc = " A function that may modify a request or response before it is sent.\n The transformation may be asynchronous or immediate.\n The user MUST invoke the `complete_fn` when transformation is complete or the application will soft-lock.\n When invoking the `complete_fn`, pass along the `message` and `complete_ctx` provided here and an error code.\n The error code should be AWS_ERROR_SUCCESS if transformation was successful,\n otherwise pass a different AWS_ERROR_X value."] pub type aws_http_message_transform_fn = :: std :: option :: Option < unsafe extern "C" fn (message : * mut aws_http_message , user_data : * mut :: libc :: c_void , complete_fn : aws_http_message_transform_complete_fn , complete_ctx : * mut :: libc :: c_void) > ; # [doc = " Invoked repeatedly times as headers are received.\n At this point, aws_http_stream_get_incoming_response_status() can be called for the client.\n And aws_http_stream_get_incoming_request_method() and aws_http_stream_get_incoming_request_uri() can be called for\n the server.\n This is always invoked on the HTTP connection's event-loop thread.\n\n Return AWS_OP_SUCCESS to continue processing the stream.\n Return aws_raise_error(E) to indicate failure and cancel the stream.\n The error you raise will be reflected in the error_code passed to the on_complete callback."] pub type aws_http_on_incoming_headers_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , header_block : aws_http_header_block , header_array : * const aws_http_header , num_headers : usize , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked when the incoming header block of this type(informational/main/trailing) has been completely read.\n This is always invoked on the HTTP connection's event-loop thread.\n\n Return AWS_OP_SUCCESS to continue processing the stream.\n Return aws_raise_error(E) to indicate failure and cancel the stream.\n The error you raise will be reflected in the error_code passed to the on_complete callback."] pub type aws_http_on_incoming_header_block_done_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , header_block : aws_http_header_block , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Called repeatedly as body data is received.\n The data must be copied immediately if you wish to preserve it.\n This is always invoked on the HTTP connection's event-loop thread.\n\n Note that, if the connection is using manual_window_management then the window\n size has shrunk by the amount of body data received. If the window size\n reaches 0 no further data will be received. Increment the window size with\n aws_http_stream_update_window().\n\n Return AWS_OP_SUCCESS to continue processing the stream.\n Return aws_raise_error(E) to indicate failure and cancel the stream.\n The error you raise will be reflected in the error_code passed to the on_complete callback."] pub type aws_http_on_incoming_body_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , data : * const aws_byte_cursor , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked when request has been completely read.\n This is always invoked on the HTTP connection's event-loop thread.\n\n Return AWS_OP_SUCCESS to continue processing the stream.\n Return aws_raise_error(E) to indicate failure and cancel the stream.\n The error you raise will be reflected in the error_code passed to the on_complete callback."] pub type aws_http_on_incoming_request_done_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked when a request/response stream is complete, whether successful or unsuccessful\n This is always invoked on the HTTP connection's event-loop thread.\n This will not be invoked if the stream is never activated."] pub type aws_http_on_stream_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when request/response stream destroy completely.\n This can be invoked within the same thead who release the refcount on http stream.\n This is invoked even if the stream is never activated."] pub type aws_http_on_stream_destroy_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " Tracing metrics for aws_http_stream.\n Data maybe not be available if the data of stream was never sent/received before it completes."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_stream_metrics { pub send_start_timestamp_ns : i64 , pub send_end_timestamp_ns : i64 , pub sending_duration_ns : i64 , pub receive_start_timestamp_ns : i64 , pub receive_end_timestamp_ns : i64 , pub receiving_duration_ns : i64 , pub stream_id : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_stream_metrics"] [:: std :: mem :: size_of :: < aws_http_stream_metrics > () - 56usize] ; ["Alignment of aws_http_stream_metrics"] [:: std :: mem :: align_of :: < aws_http_stream_metrics > () - 8usize] ; ["Offset of field: aws_http_stream_metrics::send_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , send_start_timestamp_ns) - 0usize] ; ["Offset of field: aws_http_stream_metrics::send_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , send_end_timestamp_ns) - 8usize] ; ["Offset of field: aws_http_stream_metrics::sending_duration_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , sending_duration_ns) - 16usize] ; ["Offset of field: aws_http_stream_metrics::receive_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , receive_start_timestamp_ns) - 24usize] ; ["Offset of field: aws_http_stream_metrics::receive_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , receive_end_timestamp_ns) - 32usize] ; ["Offset of field: aws_http_stream_metrics::receiving_duration_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , receiving_duration_ns) - 40usize] ; ["Offset of field: aws_http_stream_metrics::stream_id"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , stream_id) - 48usize] ; } ; # [doc = " Invoked right before request/response stream is complete to report the tracing metrics for aws_http_stream.\n This may be invoked synchronously when aws_http_stream_release() is called.\n This is invoked even if the stream is never activated.\n See `aws_http_stream_metrics` for details."] pub type aws_http_on_stream_metrics_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , metrics : * const aws_http_stream_metrics , user_data : * mut :: libc :: c_void) > ; # [doc = " Options for creating a stream which sends a request from the client and receives a response from the server."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_make_request_options { # [doc = " The sizeof() this struct, used for versioning.\n Required."] pub self_size : usize , # [doc = " Definition for outgoing request.\n Required.\n The request will be kept alive via refcounting until the request completes."] pub request : * mut aws_http_message , pub user_data : * mut :: libc :: c_void , # [doc = " Invoked repeatedly times as headers are received.\n Optional.\n See `aws_http_on_incoming_headers_fn`."] pub on_response_headers : aws_http_on_incoming_headers_fn , # [doc = " Invoked when response header block has been completely read.\n Optional.\n See `aws_http_on_incoming_header_block_done_fn`."] pub on_response_header_block_done : aws_http_on_incoming_header_block_done_fn , # [doc = " Invoked repeatedly as body data is received.\n Optional.\n See `aws_http_on_incoming_body_fn`."] pub on_response_body : aws_http_on_incoming_body_fn , # [doc = " Invoked right before stream is complete, whether successful or unsuccessful\n Optional.\n See `aws_http_on_stream_metrics_fn`"] pub on_metrics : aws_http_on_stream_metrics_fn , # [doc = " Invoked when request/response stream is complete, whether successful or unsuccessful\n Optional.\n See `aws_http_on_stream_complete_fn`."] pub on_complete : aws_http_on_stream_complete_fn , pub on_destroy : aws_http_on_stream_destroy_fn , # [doc = " When using HTTP/2, request body data will be provided over time. The stream will only be polled for writing\n when data has been supplied via `aws_http2_stream_write_data`"] pub http2_use_manual_data_writes : bool , # [doc = " Optional (ignored if 0).\n After a request is fully sent, if the server does not begin responding within N milliseconds, then fail with\n AWS_ERROR_HTTP_RESPONSE_FIRST_BYTE_TIMEOUT.\n It override the connection level settings, when the request completes, the\n original monitoring options will be applied back to the connection.\n TODO: Only supported in HTTP/1.1 now, support it in HTTP/2"] pub response_first_byte_timeout_ms : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_make_request_options"] [:: std :: mem :: size_of :: < aws_http_make_request_options > () - 88usize] ; ["Alignment of aws_http_make_request_options"] [:: std :: mem :: align_of :: < aws_http_make_request_options > () - 8usize] ; ["Offset of field: aws_http_make_request_options::self_size"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , self_size) - 0usize] ; ["Offset of field: aws_http_make_request_options::request"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , request) - 8usize] ; ["Offset of field: aws_http_make_request_options::user_data"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , user_data) - 16usize] ; ["Offset of field: aws_http_make_request_options::on_response_headers"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_response_headers) - 24usize] ; ["Offset of field: aws_http_make_request_options::on_response_header_block_done"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_response_header_block_done) - 32usize] ; ["Offset of field: aws_http_make_request_options::on_response_body"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_response_body) - 40usize] ; ["Offset of field: aws_http_make_request_options::on_metrics"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_metrics) - 48usize] ; ["Offset of field: aws_http_make_request_options::on_complete"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_complete) - 56usize] ; ["Offset of field: aws_http_make_request_options::on_destroy"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_destroy) - 64usize] ; ["Offset of field: aws_http_make_request_options::http2_use_manual_data_writes"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , http2_use_manual_data_writes) - 72usize] ; ["Offset of field: aws_http_make_request_options::response_first_byte_timeout_ms"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , response_first_byte_timeout_ms) - 80usize] ; } ; impl Default for aws_http_make_request_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)] pub struct aws_http_request_handler_options { pub self_size : usize , # [doc = " Required."] pub server_connection : * mut aws_http_connection , # [doc = " user_data passed to callbacks.\n Optional."] pub user_data : * mut :: libc :: c_void , # [doc = " Invoked repeatedly times as headers are received.\n Optional.\n See `aws_http_on_incoming_headers_fn`."] pub on_request_headers : aws_http_on_incoming_headers_fn , # [doc = " Invoked when the request header block has been completely read.\n Optional.\n See `aws_http_on_incoming_header_block_done_fn`."] pub on_request_header_block_done : aws_http_on_incoming_header_block_done_fn , # [doc = " Invoked as body data is received.\n Optional.\n See `aws_http_on_incoming_body_fn`."] pub on_request_body : aws_http_on_incoming_body_fn , # [doc = " Invoked when request has been completely read.\n Optional.\n See `aws_http_on_incoming_request_done_fn`."] pub on_request_done : aws_http_on_incoming_request_done_fn , # [doc = " Invoked when request/response stream is complete, whether successful or unsuccessful\n Optional.\n See `aws_http_on_stream_complete_fn`."] pub on_complete : aws_http_on_stream_complete_fn , pub on_destroy : aws_http_on_stream_destroy_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_request_handler_options"] [:: std :: mem :: size_of :: < aws_http_request_handler_options > () - 72usize] ; ["Alignment of aws_http_request_handler_options"] [:: std :: mem :: align_of :: < aws_http_request_handler_options > () - 8usize] ; ["Offset of field: aws_http_request_handler_options::self_size"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , self_size) - 0usize] ; ["Offset of field: aws_http_request_handler_options::server_connection"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , server_connection) - 8usize] ; ["Offset of field: aws_http_request_handler_options::user_data"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , user_data) - 16usize] ; ["Offset of field: aws_http_request_handler_options::on_request_headers"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_request_headers) - 24usize] ; ["Offset of field: aws_http_request_handler_options::on_request_header_block_done"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_request_header_block_done) - 32usize] ; ["Offset of field: aws_http_request_handler_options::on_request_body"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_request_body) - 40usize] ; ["Offset of field: aws_http_request_handler_options::on_request_done"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_request_done) - 48usize] ; ["Offset of field: aws_http_request_handler_options::on_complete"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_complete) - 56usize] ; ["Offset of field: aws_http_request_handler_options::on_destroy"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_destroy) - 64usize] ; } ; impl Default for aws_http_request_handler_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 () } } } # [doc = " Invoked when the data stream of an outgoing HTTP write operation is no longer in use.\n This is always invoked on the HTTP connection's event-loop thread.\n\n @param stream        HTTP-stream this write operation was submitted to.\n @param error_code    If error_code is AWS_ERROR_SUCCESS (0), the data was successfully sent.\n                      Any other error_code indicates that the HTTP-stream is in the process of terminating.\n                      If the error_code is AWS_ERROR_HTTP_STREAM_HAS_COMPLETED,\n                      the stream's termination has nothing to do with this write operation.\n                      Any other non-zero error code indicates a problem with this particular write\n                      operation's data.\n @param user_data     User data for this write operation."] pub type aws_http_stream_write_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when the data of an outgoing HTTP/1.1 chunk is no longer in use.\n This is always invoked on the HTTP connection's event-loop thread.\n\n @param stream        HTTP-stream this chunk was submitted to.\n @param error_code    If error_code is AWS_ERROR_SUCCESS (0), the data was successfully sent.\n                      Any other error_code indicates that the HTTP-stream is in the process of terminating.\n                      If the error_code is AWS_ERROR_HTTP_STREAM_HAS_COMPLETED,\n                      the stream's termination has nothing to do with this chunk.\n                      Any other non-zero error code indicates a problem with this particular chunk's data.\n @param user_data     User data for this chunk."] pub type aws_http1_stream_write_chunk_complete_fn = aws_http_stream_write_complete_fn ; # [doc = " HTTP/1.1 chunk extension for chunked encoding.\n Note that the underlying strings are not owned by the byte cursors."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http1_chunk_extension { pub key : aws_byte_cursor , pub value : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http1_chunk_extension"] [:: std :: mem :: size_of :: < aws_http1_chunk_extension > () - 32usize] ; ["Alignment of aws_http1_chunk_extension"] [:: std :: mem :: align_of :: < aws_http1_chunk_extension > () - 8usize] ; ["Offset of field: aws_http1_chunk_extension::key"] [:: std :: mem :: offset_of ! (aws_http1_chunk_extension , key) - 0usize] ; ["Offset of field: aws_http1_chunk_extension::value"] [:: std :: mem :: offset_of ! (aws_http1_chunk_extension , value) - 16usize] ; } ; impl Default for aws_http1_chunk_extension { 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 = " Encoding options for an HTTP/1.1 chunked transfer encoding chunk."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http1_chunk_options { pub chunk_data : * mut aws_input_stream , pub chunk_data_size : u64 , # [doc = " A pointer to an array of chunked extensions.\n The num_extensions must match the length of the array.\n This data is deep-copied by aws_http1_stream_write_chunk(),\n it does not need to remain valid until on_complete is invoked."] pub extensions : * mut aws_http1_chunk_extension , # [doc = " The number of elements defined in the extensions array."] pub num_extensions : usize , # [doc = " Invoked when the chunk data is no longer in use, whether or not it was successfully sent.\n Optional.\n See `aws_http1_stream_write_chunk_complete_fn`."] pub on_complete : aws_http1_stream_write_chunk_complete_fn , # [doc = " User provided data passed to the on_complete callback on its invocation."] pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http1_chunk_options"] [:: std :: mem :: size_of :: < aws_http1_chunk_options > () - 48usize] ; ["Alignment of aws_http1_chunk_options"] [:: std :: mem :: align_of :: < aws_http1_chunk_options > () - 8usize] ; ["Offset of field: aws_http1_chunk_options::chunk_data"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , chunk_data) - 0usize] ; ["Offset of field: aws_http1_chunk_options::chunk_data_size"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , chunk_data_size) - 8usize] ; ["Offset of field: aws_http1_chunk_options::extensions"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , extensions) - 16usize] ; ["Offset of field: aws_http1_chunk_options::num_extensions"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , num_extensions) - 24usize] ; ["Offset of field: aws_http1_chunk_options::on_complete"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , on_complete) - 32usize] ; ["Offset of field: aws_http1_chunk_options::user_data"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , user_data) - 40usize] ; } ; impl Default for aws_http1_chunk_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 () } } } # [doc = " Invoked when the data of an outgoing HTTP2 data frame is no longer in use.\n This is always invoked on the HTTP connection's event-loop thread.\n\n @param stream        HTTP2-stream this write was submitted to.\n @param error_code    If error_code is AWS_ERROR_SUCCESS (0), the data was successfully sent.\n                      Any other error_code indicates that the HTTP-stream is in the process of terminating.\n                      If the error_code is AWS_ERROR_HTTP_STREAM_HAS_COMPLETED,\n                      the stream's termination has nothing to do with this write.\n                      Any other non-zero error code indicates a problem with this particular write's data.\n @param user_data     User data for this write."] pub type aws_http2_stream_write_data_complete_fn = aws_http_stream_write_complete_fn ; # [doc = " Encoding options for manual H2 data frame writes"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http2_stream_write_data_options { # [doc = " The data to be sent.\n Optional.\n If not set, input stream with length 0 will be used."] pub data : * mut aws_input_stream , # [doc = " Set true when it's the last chunk to be sent.\n After a write with end_stream, no more data write will be accepted."] pub end_stream : bool , # [doc = " Invoked when the data stream is no longer in use, whether or not it was successfully sent.\n Optional.\n See `aws_http2_stream_write_data_complete_fn`."] pub on_complete : aws_http2_stream_write_data_complete_fn , # [doc = " User provided data passed to the on_complete callback on its invocation."] pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http2_stream_write_data_options"] [:: std :: mem :: size_of :: < aws_http2_stream_write_data_options > () - 32usize] ; ["Alignment of aws_http2_stream_write_data_options"] [:: std :: mem :: align_of :: < aws_http2_stream_write_data_options > () - 8usize] ; ["Offset of field: aws_http2_stream_write_data_options::data"] [:: std :: mem :: offset_of ! (aws_http2_stream_write_data_options , data) - 0usize] ; ["Offset of field: aws_http2_stream_write_data_options::end_stream"] [:: std :: mem :: offset_of ! (aws_http2_stream_write_data_options , end_stream) - 8usize] ; ["Offset of field: aws_http2_stream_write_data_options::on_complete"] [:: std :: mem :: offset_of ! (aws_http2_stream_write_data_options , on_complete) - 16usize] ; ["Offset of field: aws_http2_stream_write_data_options::user_data"] [:: std :: mem :: offset_of ! (aws_http2_stream_write_data_options , user_data) - 24usize] ; } ; impl Default for aws_http2_stream_write_data_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 () } } } unsafe extern "C" { # [doc = " Return whether both names are equivalent.\n This is a case-insensitive string comparison.\n\n Example Matches:\n \"Content-Length\" == \"content-length\" // upper or lower case ok\n\n Example Mismatches:\n \"Content-Length\" != \" Content-Length\" // leading whitespace bad"] pub fn aws_http_header_name_eq (name_a : aws_byte_cursor , name_b : aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " Create a new headers object.\n The caller has a hold on the object and must call aws_http_headers_release() when they are done with it."] pub fn aws_http_headers_new (allocator : * mut aws_allocator) -> * mut aws_http_headers ; } unsafe extern "C" { # [doc = " Acquire a hold on the object, preventing it from being deleted until\n aws_http_headers_release() is called by all those with a hold on it."] pub fn aws_http_headers_acquire (headers : * mut aws_http_headers) ; } unsafe extern "C" { # [doc = " Release a hold on the object.\n The object is deleted when all holds on it are released."] pub fn aws_http_headers_release (headers : * mut aws_http_headers) ; } unsafe extern "C" { # [doc = " Add a header.\n The underlying strings are copied."] pub fn aws_http_headers_add_header (headers : * mut aws_http_headers , header : * const aws_http_header) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add a header.\n The underlying strings are copied."] pub fn aws_http_headers_add (headers : * mut aws_http_headers , name : aws_byte_cursor , value : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add an array of headers.\n The underlying strings are copied."] pub fn aws_http_headers_add_array (headers : * mut aws_http_headers , array : * const aws_http_header , count : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set a header value.\n The header is added if necessary and any existing values for this name are removed.\n The underlying strings are copied."] pub fn aws_http_headers_set (headers : * mut aws_http_headers , name : aws_byte_cursor , value : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the total number of headers."] pub fn aws_http_headers_count (headers : * const aws_http_headers) -> usize ; } unsafe extern "C" { # [doc = " Get the header at the specified index.\n The index of a given header may change any time headers are modified.\n When iterating headers, the following ordering rules apply:\n\n - Headers with the same name will always be in the same order, relative to one another.\n   If \"A: one\" is added before \"A: two\", then \"A: one\" will always precede \"A: two\".\n\n - Headers with different names could be in any order, relative to one another.\n   If \"A: one\" is seen before \"B: bee\" in one iteration, you might see \"B: bee\" before \"A: one\" on the next.\n\n AWS_ERROR_INVALID_INDEX is raised if the index is invalid."] pub fn aws_http_headers_get_index (headers : * const aws_http_headers , index : usize , out_header : * mut aws_http_header) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get all values with this name, combined into one new aws_string that you are responsible for destroying.\n If there are multiple headers with this name, their values are appended with comma-separators.\n If there are no headers with this name, NULL is returned and AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised."] pub fn aws_http_headers_get_all (headers : * const aws_http_headers , name : aws_byte_cursor) -> * mut aws_string ; } unsafe extern "C" { # [doc = " Get the first value for this name, ignoring any additional values.\n AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised if the name is not found."] pub fn aws_http_headers_get (headers : * const aws_http_headers , name : aws_byte_cursor , out_value : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Test if header name exists or not in headers"] pub fn aws_http_headers_has (headers : * const aws_http_headers , name : aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " Remove all headers with this name.\n AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised if no headers with this name are found."] pub fn aws_http_headers_erase (headers : * mut aws_http_headers , name : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Remove the first header found with this name and value.\n AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised if no such header is found."] pub fn aws_http_headers_erase_value (headers : * mut aws_http_headers , name : aws_byte_cursor , value : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Remove the header at the specified index.\n\n AWS_ERROR_INVALID_INDEX is raised if the index is invalid."] pub fn aws_http_headers_erase_index (headers : * mut aws_http_headers , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Clear all headers."] pub fn aws_http_headers_clear (headers : * mut aws_http_headers) ; } unsafe extern "C" { # [doc = " Get the `:method` value (HTTP/2 headers only)."] pub fn aws_http2_headers_get_request_method (h2_headers : * const aws_http_headers , out_method : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:method` (HTTP/2 headers only).\n The headers makes its own copy of the underlying string."] pub fn aws_http2_headers_set_request_method (h2_headers : * mut aws_http_headers , method : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http2_headers_get_request_scheme (h2_headers : * const aws_http_headers , out_scheme : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:scheme` (request pseudo headers only).\n The pseudo headers makes its own copy of the underlying string."] pub fn aws_http2_headers_set_request_scheme (h2_headers : * mut aws_http_headers , scheme : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http2_headers_get_request_authority (h2_headers : * const aws_http_headers , out_authority : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:authority` (request pseudo headers only).\n The pseudo headers makes its own copy of the underlying string."] pub fn aws_http2_headers_set_request_authority (h2_headers : * mut aws_http_headers , authority : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http2_headers_get_request_path (h2_headers : * const aws_http_headers , out_path : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:path` (request pseudo headers only).\n The pseudo headers makes its own copy of the underlying string."] pub fn aws_http2_headers_set_request_path (h2_headers : * mut aws_http_headers , path : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get `:status` (response pseudo headers only).\n If no status is set, AWS_ERROR_HTTP_DATA_NOT_AVAILABLE is raised."] pub fn aws_http2_headers_get_response_status (h2_headers : * const aws_http_headers , out_status_code : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:status` (response pseudo headers only)."] pub fn aws_http2_headers_set_response_status (h2_headers : * mut aws_http_headers , status_code : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Create a new HTTP/1.1 request message.\n The message is blank, all properties (method, path, etc) must be set individually.\n If HTTP/1.1 message used in HTTP/2 connection, the transformation will be automatically applied.\n A HTTP/2 message will created and sent based on the HTTP/1.1 message.\n\n The caller has a hold on the object and must call aws_http_message_release() when they are done with it."] pub fn aws_http_message_new_request (allocator : * mut aws_allocator) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Like aws_http_message_new_request(), but uses existing aws_http_headers instead of creating a new one.\n Acquires a hold on the headers, and releases it when the request is destroyed."] pub fn aws_http_message_new_request_with_headers (allocator : * mut aws_allocator , existing_headers : * mut aws_http_headers) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Create a new HTTP/1.1 response message.\n The message is blank, all properties (status, headers, etc) must be set individually.\n\n The caller has a hold on the object and must call aws_http_message_release() when they are done with it."] pub fn aws_http_message_new_response (allocator : * mut aws_allocator) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Create a new HTTP/2 request message.\n pseudo headers need to be set from aws_http2_headers_set_request_* to the headers of the aws_http_message.\n Will be errored out if used in HTTP/1.1 connection.\n\n The caller has a hold on the object and must call aws_http_message_release() when they are done with it."] pub fn aws_http2_message_new_request (allocator : * mut aws_allocator) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Create a new HTTP/2 response message.\n pseudo headers need to be set from aws_http2_headers_set_response_status to the headers of the aws_http_message.\n Will be errored out if used in HTTP/1.1 connection.\n\n The caller has a hold on the object and must call aws_http_message_release() when they are done with it."] pub fn aws_http2_message_new_response (allocator : * mut aws_allocator) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Create an HTTP/2 message from HTTP/1.1 message.\n pseudo headers will be created from the context and added to the headers of new message.\n Normal headers will be copied to the headers of new message.\n Note:\n  - if `host` exist, it will be removed and `:authority` will be added using the information.\n  - `:scheme` always defaults to \"https\". To use a different scheme create the HTTP/2 message directly"] pub fn aws_http2_message_new_from_http1 (alloc : * mut aws_allocator , http1_msg : * const aws_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Acquire a hold on the object, preventing it from being deleted until\n aws_http_message_release() is called by all those with a hold on it.\n\n This function returns the passed in message (possibly NULL) so that acquire-and-assign can be done with a single\n statement."] pub fn aws_http_message_acquire (message : * mut aws_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Release a hold on the object.\n The object is deleted when all holds on it are released.\n\n This function always returns NULL so that release-and-assign-NULL can be done with a single statement."] pub fn aws_http_message_release (message : * mut aws_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Deprecated. This is equivalent to aws_http_message_release()."] pub fn aws_http_message_destroy (message : * mut aws_http_message) ; } unsafe extern "C" { pub fn aws_http_message_is_request (message : * const aws_http_message) -> bool ; } unsafe extern "C" { pub fn aws_http_message_is_response (message : * const aws_http_message) -> bool ; } unsafe extern "C" { # [doc = " Get the protocol version of the http message."] pub fn aws_http_message_get_protocol_version (message : * const aws_http_message) -> aws_http_version ; } unsafe extern "C" { # [doc = " Get the method (request messages only)."] pub fn aws_http_message_get_request_method (request_message : * const aws_http_message , out_method : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set the method (request messages only).\n The request makes its own copy of the underlying string."] pub fn aws_http_message_set_request_method (request_message : * mut aws_http_message , method : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http_message_get_request_path (request_message : * const aws_http_message , out_path : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set the path-and-query value (request messages only).\n The request makes its own copy of the underlying string."] pub fn aws_http_message_set_request_path (request_message : * mut aws_http_message , path : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the status code (response messages only).\n If no status is set, AWS_ERROR_HTTP_DATA_NOT_AVAILABLE is raised."] pub fn aws_http_message_get_response_status (response_message : * const aws_http_message , out_status_code : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set the status code (response messages only)."] pub fn aws_http_message_set_response_status (response_message : * mut aws_http_message , status_code : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the body stream.\n Returns NULL if no body stream is set."] pub fn aws_http_message_get_body_stream (message : * const aws_http_message) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Set the body stream.\n NULL is an acceptable value for messages with no body.\n Note: The message does NOT take ownership of the body stream.\n The stream must not be destroyed until the message is complete."] pub fn aws_http_message_set_body_stream (message : * mut aws_http_message , body_stream : * mut aws_input_stream) ; } # [doc = " aws_future<aws_http_message*>"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_http_message { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_new (alloc : * mut aws_allocator) -> * mut aws_future_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_set_result_by_move (future : * mut aws_future_http_message , pointer_address : * mut * mut aws_http_message) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_get_result_by_move (future : * mut aws_future_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_peek_result (future : * const aws_future_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_acquire (future : * mut aws_future_http_message) -> * mut aws_future_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_release (future : * mut aws_future_http_message) -> * mut aws_future_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_set_error (future : * mut aws_future_http_message , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_is_done (future : * const aws_future_http_message) -> bool ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_get_error (future : * const aws_future_http_message) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_register_callback (future : * mut aws_future_http_message , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_register_callback_if_not_done (future : * mut aws_future_http_message , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_register_event_loop_callback (future : * mut aws_future_http_message , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_register_channel_callback (future : * mut aws_future_http_message , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_wait (future : * mut aws_future_http_message , timeout_ns : u64) -> bool ; } unsafe extern "C" { # [doc = " Submit a chunk of data to be sent on an HTTP/1.1 stream.\n The stream must have specified \"chunked\" in a \"transfer-encoding\" header,\n and the aws_http_message must NOT have any body stream set.\n For client streams, activate() must be called before any chunks are submitted.\n For server streams, the response must be submitted before any chunks.\n A final chunk with size 0 must be submitted to successfully complete the HTTP-stream.\n\n Returns AWS_OP_SUCCESS if the chunk has been submitted. The chunk's completion\n callback will be invoked when the HTTP-stream is done with the chunk data,\n whether or not it was successfully sent (see `aws_http1_stream_write_chunk_complete_fn`).\n The chunk data must remain valid until the completion callback is invoked.\n\n Returns AWS_OP_ERR and raises an error if the chunk could not be submitted.\n In this case, the chunk's completion callback will never be invoked.\n Note that it is always possible for the HTTP-stream to terminate unexpectedly\n prior to this call being made, in which case the error raised is\n AWS_ERROR_HTTP_STREAM_HAS_COMPLETED."] pub fn aws_http1_stream_write_chunk (http1_stream : * mut aws_http_stream , options : * const aws_http1_chunk_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " The stream must have specified `http2_use_manual_data_writes` during request creation.\n For client streams, activate() must be called before any frames are submitted.\n For server streams, the response headers must be submitted before any frames.\n A write with options that has end_stream set to be true will end the stream and prevent any further write.\n\n @return AWS_OP_SUCCESS if the write was queued\n         AWS_OP_ERROR indicating the attempt raised an error code.\n              AWS_ERROR_INVALID_STATE will be raised for invalid usage.\n              AWS_ERROR_HTTP_STREAM_HAS_COMPLETED will be raised if the stream ended for reasons behind the scenes.\n\n Typical usage will be something like:\n options.http2_use_manual_data_writes = true;\n stream = aws_http_connection_make_request(connection, &options);\n aws_http_stream_activate(stream);\n ...\n struct aws_http2_stream_write_data_options write;\n aws_http2_stream_write_data(stream, &write);\n ...\n struct aws_http2_stream_write_data_options last_write;\n last_write.end_stream = true;\n aws_http2_stream_write_data(stream, &write);\n ...\n aws_http_stream_release(stream);"] pub fn aws_http2_stream_write_data (http2_stream : * mut aws_http_stream , options : * const aws_http2_stream_write_data_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add a list of headers to be added as trailing headers sent after the last chunk is sent.\n a \"Trailer\" header field which indicates the fields present in the trailer.\n\n Certain headers are forbidden in the trailer (e.g., Transfer-Encoding, Content-Length, Host). See RFC-7541\n Section 4.1.2 for more details.\n\n For client streams, activate() must be called before any chunks are submitted.\n\n For server streams, the response must be submitted before the trailer can be added\n\n aws_http1_stream_add_chunked_trailer must be called before the final size 0 chunk, and at the moment can only\n be called once, though this could change if need be.\n\n Returns AWS_OP_SUCCESS if the chunk has been submitted."] pub fn aws_http1_stream_add_chunked_trailer (http1_stream : * mut aws_http_stream , trailing_headers : * const aws_http_headers) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " This datastructure has more functions for inspecting and modifying headers than\n are available on the aws_http_message datastructure."] pub fn aws_http_message_get_headers (message : * const aws_http_message) -> * mut aws_http_headers ; } unsafe extern "C" { # [doc = " Get the message's const aws_http_headers."] pub fn aws_http_message_get_const_headers (message : * const aws_http_message) -> * const aws_http_headers ; } unsafe extern "C" { # [doc = " Get the number of headers."] pub fn aws_http_message_get_header_count (message : * const aws_http_message) -> usize ; } unsafe extern "C" { # [doc = " Get the header at the specified index.\n This function cannot fail if a valid index is provided.\n Otherwise, AWS_ERROR_INVALID_INDEX will be raised.\n\n The underlying strings are stored within the message."] pub fn aws_http_message_get_header (message : * const aws_http_message , out_header : * mut aws_http_header , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add a header to the end of the array.\n The message makes its own copy of the underlying strings."] pub fn aws_http_message_add_header (message : * mut aws_http_message , header : aws_http_header) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add an array of headers to the end of the header array.\n The message makes its own copy of the underlying strings.\n\n This is a helper function useful when it's easier to define headers as a stack array, rather than calling add_header\n repeatedly."] pub fn aws_http_message_add_header_array (message : * mut aws_http_message , headers : * const aws_http_header , num_headers : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Remove the header at the specified index.\n Headers after this index are all shifted back one position.\n\n This function cannot fail if a valid index is provided.\n Otherwise, AWS_ERROR_INVALID_INDEX will be raised."] pub fn aws_http_message_erase_header (message : * mut aws_http_message , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Create a stream, with a client connection sending a request.\n The request does not start sending automatically once the stream is created. You must call\n aws_http_stream_activate to begin execution of the request.\n\n The `options` are copied during this call.\n\n Tip for language bindings: Do not bind the `options` struct. Use something more natural for your language,\n such as Builder Pattern in Java, or Python's ability to take many optional arguments by name.\n\n Note: The header of the request will be sent as it is when the message to send protocol matches the protocol of the\n connection.\n  - No `user-agent` will be added.\n  - No security check will be enforced. eg: `referer` header privacy should be enforced by the user-agent who adds the\n      header\n  - When HTTP/1 message sent on HTTP/2 connection, `aws_http2_message_new_from_http1` will be applied under the hood.\n  - When HTTP/2 message sent on HTTP/1 connection, no change will be made."] pub fn aws_http_connection_make_request (client_connection : * mut aws_http_connection , options : * const aws_http_make_request_options) -> * mut aws_http_stream ; } unsafe extern "C" { # [doc = " Create a stream, with a server connection receiving and responding to a request.\n This function can only be called from the `aws_http_on_incoming_request_fn` callback.\n aws_http_stream_send_response() should be used to send a response."] pub fn aws_http_stream_new_server_request_handler (options : * const aws_http_request_handler_options) -> * mut aws_http_stream ; } unsafe extern "C" { # [doc = " Acquire refcount on the stream to prevent it from being cleaned up until it is released."] pub fn aws_http_stream_acquire (stream : * mut aws_http_stream) -> * mut aws_http_stream ; } unsafe extern "C" { # [doc = " Users must release the stream when they are done with it, or its memory will never be cleaned up.\n This will not cancel the stream, its callbacks will still fire if the stream is still in progress.\n\n Tips for language bindings:\n - Invoke this from the wrapper class's finalizer/destructor.\n - Do not let the wrapper class be destroyed until on_complete() has fired."] pub fn aws_http_stream_release (stream : * mut aws_http_stream) ; } unsafe extern "C" { # [doc = " Only used for client initiated streams (immediately following a call to aws_http_connection_make_request).\n\n Activates the request's outgoing stream processing."] pub fn aws_http_stream_activate (stream : * mut aws_http_stream) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http_stream_get_connection (stream : * const aws_http_stream) -> * mut aws_http_connection ; } unsafe extern "C" { pub fn aws_http_stream_get_incoming_response_status (stream : * const aws_http_stream , out_status : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http_stream_get_incoming_request_method (stream : * const aws_http_stream , out_method : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http_stream_get_incoming_request_uri (stream : * const aws_http_stream , out_uri : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Send response (only callable from \"request handler\" streams)\n The response object must stay alive at least until the stream's on_complete is called."] pub fn aws_http_stream_send_response (stream : * mut aws_http_stream , response : * mut aws_http_message) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Increment the stream's flow-control window to keep data flowing.\n\n If the connection was created with `manual_window_management` set true,\n the flow-control window of each stream will shrink as body data is received\n (headers, padding, and other metadata do not affect the window).\n The connection's `initial_window_size` determines the starting size of each stream's window.\n If a stream's flow-control window reaches 0, no further data will be received.\n\n If `manual_window_management` is false, this call will have no effect.\n The connection maintains its flow-control windows such that\n no back-pressure is applied and data arrives as fast as possible.\n\n For HTTP/2, the client control exactly when the WINDOW_UPDATE frame sent.\n And client will make sure the WINDOW_UPDATE frame to be valid.\n Check `stream_window_size_threshold_to_send_update` for details."] pub fn aws_http_stream_update_window (stream : * mut aws_http_stream , increment_size : usize) ; } unsafe extern "C" { # [doc = " Gets the HTTP/2 id associated with a stream.  Even h1 streams have an id (using the same allocation procedure\n as http/2) for easier tracking purposes. For client streams, this will only be non-zero after a successful call\n to aws_http_stream_activate()"] pub fn aws_http_stream_get_id (stream : * const aws_http_stream) -> u32 ; } unsafe extern "C" { # [doc = " Cancel the stream in flight.\n For HTTP/1.1 streams, it's equivalent to closing the connection.\n For HTTP/2 streams, it's equivalent to calling reset on the stream with `AWS_HTTP2_ERR_CANCEL`.\n\n the stream will complete with the error code provided, unless the stream is\n already completing for other reasons, or the stream is not activated,\n in which case this call will have no impact."] pub fn aws_http_stream_cancel (stream : * mut aws_http_stream , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " Reset the HTTP/2 stream (HTTP/2 only).\n Note that if the stream closes before this async call is fully processed, the RST_STREAM frame will not be sent.\n\n @param http2_stream HTTP/2 stream.\n @param http2_error aws_http2_error_code. Reason to reset the stream."] pub fn aws_http2_stream_reset (http2_stream : * mut aws_http_stream , http2_error : u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the error code received in rst_stream.\n Only valid if the stream has completed, and an RST_STREAM frame has received.\n\n @param http2_stream HTTP/2 stream.\n @param out_http2_error Gets to set to HTTP/2 error code received in rst_stream."] pub fn aws_http2_stream_get_received_reset_error_code (http2_stream : * mut aws_http_stream , out_http2_error : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the HTTP/2 error code sent in the RST_STREAM frame (HTTP/2 only).\n Only valid if the stream has completed, and has sent an RST_STREAM frame.\n\n @param http2_stream HTTP/2 stream.\n @param out_http2_error Gets to set to HTTP/2 error code sent in rst_stream."] pub fn aws_http2_stream_get_sent_reset_error_code (http2_stream : * mut aws_http_stream , out_http2_error : * mut u32) -> :: libc :: c_int ; } # [repr (i32)] # [non_exhaustive] # [doc = " Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n SPDX-License-Identifier: Apache-2.0."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_status_code { AWS_HTTP_STATUS_CODE_UNKNOWN = - 1 , AWS_HTTP_STATUS_CODE_100_CONTINUE = 100 , AWS_HTTP_STATUS_CODE_101_SWITCHING_PROTOCOLS = 101 , AWS_HTTP_STATUS_CODE_102_PROCESSING = 102 , AWS_HTTP_STATUS_CODE_103_EARLY_HINTS = 103 , AWS_HTTP_STATUS_CODE_200_OK = 200 , AWS_HTTP_STATUS_CODE_201_CREATED = 201 , AWS_HTTP_STATUS_CODE_202_ACCEPTED = 202 , AWS_HTTP_STATUS_CODE_203_NON_AUTHORITATIVE_INFORMATION = 203 , AWS_HTTP_STATUS_CODE_204_NO_CONTENT = 204 , AWS_HTTP_STATUS_CODE_205_RESET_CONTENT = 205 , AWS_HTTP_STATUS_CODE_206_PARTIAL_CONTENT = 206 , AWS_HTTP_STATUS_CODE_207_MULTI_STATUS = 207 , AWS_HTTP_STATUS_CODE_208_ALREADY_REPORTED = 208 , AWS_HTTP_STATUS_CODE_226_IM_USED = 226 , AWS_HTTP_STATUS_CODE_300_MULTIPLE_CHOICES = 300 , AWS_HTTP_STATUS_CODE_301_MOVED_PERMANENTLY = 301 , AWS_HTTP_STATUS_CODE_302_FOUND = 302 , AWS_HTTP_STATUS_CODE_303_SEE_OTHER = 303 , AWS_HTTP_STATUS_CODE_304_NOT_MODIFIED = 304 , AWS_HTTP_STATUS_CODE_305_USE_PROXY = 305 , AWS_HTTP_STATUS_CODE_307_TEMPORARY_REDIRECT = 307 , AWS_HTTP_STATUS_CODE_308_PERMANENT_REDIRECT = 308 , AWS_HTTP_STATUS_CODE_400_BAD_REQUEST = 400 , AWS_HTTP_STATUS_CODE_401_UNAUTHORIZED = 401 , AWS_HTTP_STATUS_CODE_402_PAYMENT_REQUIRED = 402 , AWS_HTTP_STATUS_CODE_403_FORBIDDEN = 403 , AWS_HTTP_STATUS_CODE_404_NOT_FOUND = 404 , AWS_HTTP_STATUS_CODE_405_METHOD_NOT_ALLOWED = 405 , AWS_HTTP_STATUS_CODE_406_NOT_ACCEPTABLE = 406 , AWS_HTTP_STATUS_CODE_407_PROXY_AUTHENTICATION_REQUIRED = 407 , AWS_HTTP_STATUS_CODE_408_REQUEST_TIMEOUT = 408 , AWS_HTTP_STATUS_CODE_409_CONFLICT = 409 , AWS_HTTP_STATUS_CODE_410_GONE = 410 , AWS_HTTP_STATUS_CODE_411_LENGTH_REQUIRED = 411 , AWS_HTTP_STATUS_CODE_412_PRECONDITION_FAILED = 412 , AWS_HTTP_STATUS_CODE_413_REQUEST_ENTITY_TOO_LARGE = 413 , AWS_HTTP_STATUS_CODE_414_REQUEST_URI_TOO_LONG = 414 , AWS_HTTP_STATUS_CODE_415_UNSUPPORTED_MEDIA_TYPE = 415 , AWS_HTTP_STATUS_CODE_416_REQUESTED_RANGE_NOT_SATISFIABLE = 416 , AWS_HTTP_STATUS_CODE_417_EXPECTATION_FAILED = 417 , AWS_HTTP_STATUS_CODE_421_MISDIRECTED_REQUEST = 421 , AWS_HTTP_STATUS_CODE_422_UNPROCESSABLE_ENTITY = 422 , AWS_HTTP_STATUS_CODE_423_LOCKED = 423 , AWS_HTTP_STATUS_CODE_424_FAILED_DEPENDENCY = 424 , AWS_HTTP_STATUS_CODE_425_TOO_EARLY = 425 , AWS_HTTP_STATUS_CODE_426_UPGRADE_REQUIRED = 426 , AWS_HTTP_STATUS_CODE_428_PRECONDITION_REQUIRED = 428 , AWS_HTTP_STATUS_CODE_429_TOO_MANY_REQUESTS = 429 , AWS_HTTP_STATUS_CODE_431_REQUEST_HEADER_FIELDS_TOO_LARGE = 431 , AWS_HTTP_STATUS_CODE_451_UNAVAILABLE_FOR_LEGAL_REASON = 451 , AWS_HTTP_STATUS_CODE_500_INTERNAL_SERVER_ERROR = 500 , AWS_HTTP_STATUS_CODE_501_NOT_IMPLEMENTED = 501 , AWS_HTTP_STATUS_CODE_502_BAD_GATEWAY = 502 , AWS_HTTP_STATUS_CODE_503_SERVICE_UNAVAILABLE = 503 , AWS_HTTP_STATUS_CODE_504_GATEWAY_TIMEOUT = 504 , AWS_HTTP_STATUS_CODE_505_HTTP_VERSION_NOT_SUPPORTED = 505 , AWS_HTTP_STATUS_CODE_506_VARIANT_ALSO_NEGOTIATES = 506 , AWS_HTTP_STATUS_CODE_507_INSUFFICIENT_STORAGE = 507 , AWS_HTTP_STATUS_CODE_508_LOOP_DETECTED = 508 , AWS_HTTP_STATUS_CODE_510_NOT_EXTENDED = 510 , AWS_HTTP_STATUS_CODE_511_NETWORK_AUTHENTICATION_REQUIRED = 511 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_proxy_config { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [doc = " @Deprecated - Supported proxy authentication modes.  Superceded by proxy strategy."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_proxy_authentication_type { AWS_HPAT_NONE = 0 , AWS_HPAT_BASIC = 1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_proxy_env_var_type { # [doc = " Default.\n Disable reading from environment variable for proxy."] AWS_HPEV_DISABLE = 0 , # [doc = " Enable get proxy URL from environment variable, when the manual proxy options of connection manager is not set.\n env HTTPS_PROXY/https_proxy will be checked when the main connection use tls.\n env HTTP_PROXY/http_proxy will be checked when the main connection NOT use tls.\n env NO_PROXY/no_proxy will be checked to bypass proxy if the host match the pattern.\n      Check `aws_http_host_matches_no_proxy` for detail. This function can also be used with a direct no_proxy\n parameter. The lower case version has precedence."] AWS_HPEV_ENABLE = 1 , } # [repr (u32)] # [non_exhaustive] # [doc = " Supported proxy connection types"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_proxy_connection_type { # [doc = " Deprecated, but 0-valued for backwards compatibility\n\n If tls options are provided (for the main connection) then treat the proxy as a tunneling proxy\n If tls options are not provided (for the main connection), then treat the proxy as a forwarding proxy"] AWS_HPCT_HTTP_LEGACY = 0 , # [doc = " Use the proxy to forward http requests.  Attempting to use both this mode and TLS on the tunnel destination\n is a configuration error."] AWS_HPCT_HTTP_FORWARD = 1 , # [doc = " Use the proxy to establish a connection to a remote endpoint via a CONNECT request through the proxy.\n Works for both plaintext and tls connections."] AWS_HPCT_HTTP_TUNNEL = 2 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct proxy_env_var_settings { pub env_var_type : aws_http_proxy_env_var_type , pub connection_type : aws_http_proxy_connection_type , pub tls_options : * const aws_tls_connection_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of proxy_env_var_settings"] [:: std :: mem :: size_of :: < proxy_env_var_settings > () - 16usize] ; ["Alignment of proxy_env_var_settings"] [:: std :: mem :: align_of :: < proxy_env_var_settings > () - 8usize] ; ["Offset of field: proxy_env_var_settings::env_var_type"] [:: std :: mem :: offset_of ! (proxy_env_var_settings , env_var_type) - 0usize] ; ["Offset of field: proxy_env_var_settings::connection_type"] [:: std :: mem :: offset_of ! (proxy_env_var_settings , connection_type) - 4usize] ; ["Offset of field: proxy_env_var_settings::tls_options"] [:: std :: mem :: offset_of ! (proxy_env_var_settings , tls_options) - 8usize] ; } ; impl Default for proxy_env_var_settings { 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 http proxy server usage"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_proxy_options { # [doc = " Type of proxy connection to make"] pub connection_type : aws_http_proxy_connection_type , # [doc = " Proxy host to connect to"] pub host : aws_byte_cursor , # [doc = " Port to make the proxy connection to"] pub port : u32 , # [doc = " Optional.\n TLS configuration for the Local <-> Proxy connection\n Must be distinct from the the TLS options in the parent aws_http_connection_options struct"] pub tls_options : * const aws_tls_connection_options , # [doc = " Optional\n Advanced option that allows the user to create a custom strategy that gives low-level control of\n certain logical flows within the proxy logic.\n\n For tunneling proxies it allows custom retry and adaptive negotiation of CONNECT requests.\n For forwarding proxies it allows custom request transformations."] pub proxy_strategy : * mut aws_http_proxy_strategy , # [doc = " @Deprecated - What type of proxy authentication to use, if any.\n Replaced by instantiating a proxy_strategy"] pub auth_type : aws_http_proxy_authentication_type , # [doc = " @Deprecated - Optional user name to use for basic authentication\n Replaced by instantiating a proxy_strategy via aws_http_proxy_strategy_new_basic_auth()"] pub auth_username : aws_byte_cursor , # [doc = " @Deprecated - Optional password to use for basic authentication\n Replaced by instantiating a proxy_strategy via aws_http_proxy_strategy_new_basic_auth()"] pub auth_password : aws_byte_cursor , # [doc = " Optional\n No proxy hosts - Comma seperated list of hosts for which not to use a proxy, if one is specified."] pub no_proxy_hosts : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_options"] [:: std :: mem :: size_of :: < aws_http_proxy_options > () - 104usize] ; ["Alignment of aws_http_proxy_options"] [:: std :: mem :: align_of :: < aws_http_proxy_options > () - 8usize] ; ["Offset of field: aws_http_proxy_options::connection_type"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , connection_type) - 0usize] ; ["Offset of field: aws_http_proxy_options::host"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , host) - 8usize] ; ["Offset of field: aws_http_proxy_options::port"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , port) - 24usize] ; ["Offset of field: aws_http_proxy_options::tls_options"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , tls_options) - 32usize] ; ["Offset of field: aws_http_proxy_options::proxy_strategy"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , proxy_strategy) - 40usize] ; ["Offset of field: aws_http_proxy_options::auth_type"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , auth_type) - 48usize] ; ["Offset of field: aws_http_proxy_options::auth_username"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , auth_username) - 56usize] ; ["Offset of field: aws_http_proxy_options::auth_password"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , auth_password) - 72usize] ; ["Offset of field: aws_http_proxy_options::no_proxy_hosts"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , no_proxy_hosts) - 88usize] ; } ; impl Default for aws_http_proxy_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 () } } } # [doc = " Synchronous (for now) callback function to fetch a token used in modifying CONNECT requests"] pub type aws_http_proxy_negotiation_get_token_sync_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void , out_error_code : * mut :: libc :: c_int) -> * mut aws_string > ; # [doc = " Synchronous (for now) callback function to fetch a token used in modifying CONNECT request.  Includes a (byte string)\n context intended to be used as part of a challenge-response flow."] pub type aws_http_proxy_negotiation_get_challenge_token_sync_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void , challenge_context : * const aws_byte_cursor , out_error_code : * mut :: libc :: c_int) -> * mut aws_string > ; # [doc = " Proxy negotiation logic must call this function to indicate an unsuccessful outcome"] pub type aws_http_proxy_negotiation_terminate_fn = :: std :: option :: Option < unsafe extern "C" fn (message : * mut aws_http_message , error_code : :: libc :: c_int , internal_proxy_user_data : * mut :: libc :: c_void) > ; # [doc = " Proxy negotiation logic must call this function to forward the potentially-mutated request back to the proxy\n connection logic."] pub type aws_http_proxy_negotiation_http_request_forward_fn = :: std :: option :: Option < unsafe extern "C" fn (message : * mut aws_http_message , internal_proxy_user_data : * mut :: libc :: c_void) > ; # [doc = " User-supplied transform callback which implements the proxy request flow and ultimately, across all execution\n pathways, invokes either the terminate function or the forward function appropriately.\n\n For tunneling proxy connections, this request flow transform only applies to the CONNECT stage of proxy\n connection establishment.\n\n For forwarding proxy connections, this request flow transform applies to every single http request that goes\n out on the connection.\n\n Forwarding proxy connections cannot yet support a truly async request transform without major surgery on http\n stream creation, so for now, we split into an async version (for tunneling proxies) and a separate\n synchronous version for forwarding proxies.  Also forwarding proxies are a kind of legacy dead-end in some\n sense.\n"] pub type aws_http_proxy_negotiation_http_request_transform_async_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , message : * mut aws_http_message , negotiation_termination_callback : aws_http_proxy_negotiation_terminate_fn , negotiation_http_request_forward_callback : aws_http_proxy_negotiation_http_request_forward_fn , internal_proxy_user_data : * mut :: libc :: c_void) > ; pub type aws_http_proxy_negotiation_http_request_transform_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , message : * mut aws_http_message) -> :: libc :: c_int > ; # [doc = " Tunneling proxy connections only.  A callback that lets the negotiator examine the headers in the\n response to the most recent CONNECT request as they arrive."] pub type aws_http_proxy_negotiation_connect_on_incoming_headers_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , header_block : aws_http_header_block , header_array : * const aws_http_header , num_headers : usize) -> :: libc :: c_int > ; # [doc = " Tunneling proxy connections only.  A callback that lets the negotiator examine the status code of the\n response to the most recent CONNECT request."] pub type aws_http_proxy_negotiator_connect_status_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , status_code : aws_http_status_code) -> :: libc :: c_int > ; # [doc = " Tunneling proxy connections only.  A callback that lets the negotiator examine the body of the response\n to the most recent CONNECT request."] pub type aws_http_proxy_negotiator_connect_on_incoming_body_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , data : * const aws_byte_cursor) -> :: libc :: c_int > ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_proxy_negotiation_retry_directive { AWS_HPNRD_STOP = 0 , AWS_HPNRD_NEW_CONNECTION = 1 , AWS_HPNRD_CURRENT_CONNECTION = 2 , } pub type aws_http_proxy_negotiator_get_retry_directive_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator) -> aws_http_proxy_negotiation_retry_directive > ; # [doc = " Vtable for forwarding-based proxy negotiators"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_proxy_negotiator_forwarding_vtable { pub forward_request_transform : aws_http_proxy_negotiation_http_request_transform_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_negotiator_forwarding_vtable"] [:: std :: mem :: size_of :: < aws_http_proxy_negotiator_forwarding_vtable > () - 8usize] ; ["Alignment of aws_http_proxy_negotiator_forwarding_vtable"] [:: std :: mem :: align_of :: < aws_http_proxy_negotiator_forwarding_vtable > () - 8usize] ; ["Offset of field: aws_http_proxy_negotiator_forwarding_vtable::forward_request_transform"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_forwarding_vtable , forward_request_transform) - 0usize] ; } ; # [doc = " Vtable for tunneling-based proxy negotiators"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_proxy_negotiator_tunnelling_vtable { pub connect_request_transform : aws_http_proxy_negotiation_http_request_transform_async_fn , pub on_incoming_headers_callback : aws_http_proxy_negotiation_connect_on_incoming_headers_fn , pub on_status_callback : aws_http_proxy_negotiator_connect_status_fn , pub on_incoming_body_callback : aws_http_proxy_negotiator_connect_on_incoming_body_fn , pub get_retry_directive : aws_http_proxy_negotiator_get_retry_directive_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_negotiator_tunnelling_vtable"] [:: std :: mem :: size_of :: < aws_http_proxy_negotiator_tunnelling_vtable > () - 40usize] ; ["Alignment of aws_http_proxy_negotiator_tunnelling_vtable"] [:: std :: mem :: align_of :: < aws_http_proxy_negotiator_tunnelling_vtable > () - 8usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::connect_request_transform"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , connect_request_transform) - 0usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::on_incoming_headers_callback"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , on_incoming_headers_callback) - 8usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::on_status_callback"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , on_status_callback) - 16usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::on_incoming_body_callback"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , on_incoming_body_callback) - 24usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::get_retry_directive"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , get_retry_directive) - 32usize] ; } ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_http_proxy_negotiator { pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , pub strategy_vtable : aws_http_proxy_negotiator__bindgen_ty_1 , } # [repr (C)] # [derive (Copy , Clone)] pub union aws_http_proxy_negotiator__bindgen_ty_1 { pub forwarding_vtable : * mut aws_http_proxy_negotiator_forwarding_vtable , pub tunnelling_vtable : * mut aws_http_proxy_negotiator_tunnelling_vtable , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_negotiator__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_http_proxy_negotiator__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_http_proxy_negotiator__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_http_proxy_negotiator__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_http_proxy_negotiator__bindgen_ty_1::forwarding_vtable"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator__bindgen_ty_1 , forwarding_vtable) - 0usize] ; ["Offset of field: aws_http_proxy_negotiator__bindgen_ty_1::tunnelling_vtable"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator__bindgen_ty_1 , tunnelling_vtable) - 0usize] ; } ; impl Default for aws_http_proxy_negotiator__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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_negotiator"] [:: std :: mem :: size_of :: < aws_http_proxy_negotiator > () - 40usize] ; ["Alignment of aws_http_proxy_negotiator"] [:: std :: mem :: align_of :: < aws_http_proxy_negotiator > () - 8usize] ; ["Offset of field: aws_http_proxy_negotiator::ref_count"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator , ref_count) - 0usize] ; ["Offset of field: aws_http_proxy_negotiator::impl_"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator , impl_) - 24usize] ; ["Offset of field: aws_http_proxy_negotiator::strategy_vtable"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator , strategy_vtable) - 32usize] ; } ; impl Default for aws_http_proxy_negotiator { 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_http_proxy_strategy_create_negotiator_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_strategy : * mut aws_http_proxy_strategy , allocator : * mut aws_allocator) -> * mut aws_http_proxy_negotiator > ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_proxy_strategy_vtable { pub create_negotiator : aws_http_proxy_strategy_create_negotiator_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_vtable"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_vtable > () - 8usize] ; ["Alignment of aws_http_proxy_strategy_vtable"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_vtable > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_vtable::create_negotiator"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_vtable , create_negotiator) - 0usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_proxy_strategy { pub ref_count : aws_ref_count , pub vtable : * mut aws_http_proxy_strategy_vtable , pub impl_ : * mut :: libc :: c_void , pub proxy_connection_type : aws_http_proxy_connection_type , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy > () - 48usize] ; ["Alignment of aws_http_proxy_strategy"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy::ref_count"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy , ref_count) - 0usize] ; ["Offset of field: aws_http_proxy_strategy::vtable"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy , vtable) - 24usize] ; ["Offset of field: aws_http_proxy_strategy::impl_"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy , impl_) - 32usize] ; ["Offset of field: aws_http_proxy_strategy::proxy_connection_type"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy , proxy_connection_type) - 40usize] ; } ; impl Default for aws_http_proxy_strategy { 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)] pub struct aws_http_proxy_strategy_basic_auth_options { pub proxy_connection_type : aws_http_proxy_connection_type , pub user_name : aws_byte_cursor , pub password : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_basic_auth_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_basic_auth_options > () - 40usize] ; ["Alignment of aws_http_proxy_strategy_basic_auth_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_basic_auth_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_basic_auth_options::proxy_connection_type"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_basic_auth_options , proxy_connection_type) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_basic_auth_options::user_name"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_basic_auth_options , user_name) - 8usize] ; ["Offset of field: aws_http_proxy_strategy_basic_auth_options::password"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_basic_auth_options , password) - 24usize] ; } ; impl Default for aws_http_proxy_strategy_basic_auth_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)] pub struct aws_http_proxy_strategy_tunneling_kerberos_options { pub get_token : aws_http_proxy_negotiation_get_token_sync_fn , pub get_token_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_tunneling_kerberos_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_tunneling_kerberos_options > () - 16usize] ; ["Alignment of aws_http_proxy_strategy_tunneling_kerberos_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_tunneling_kerberos_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_kerberos_options::get_token"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_kerberos_options , get_token) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_kerberos_options::get_token_user_data"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_kerberos_options , get_token_user_data) - 8usize] ; } ; impl Default for aws_http_proxy_strategy_tunneling_kerberos_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)] pub struct aws_http_proxy_strategy_tunneling_ntlm_options { pub get_token : aws_http_proxy_negotiation_get_token_sync_fn , pub get_challenge_token : aws_http_proxy_negotiation_get_challenge_token_sync_fn , pub get_challenge_token_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_tunneling_ntlm_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_tunneling_ntlm_options > () - 24usize] ; ["Alignment of aws_http_proxy_strategy_tunneling_ntlm_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_tunneling_ntlm_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_ntlm_options::get_token"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_ntlm_options , get_token) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_ntlm_options::get_challenge_token"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_ntlm_options , get_challenge_token) - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_ntlm_options::get_challenge_token_user_data"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_ntlm_options , get_challenge_token_user_data) - 16usize] ; } ; impl Default for aws_http_proxy_strategy_tunneling_ntlm_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)] pub struct aws_http_proxy_strategy_tunneling_adaptive_options { pub kerberos_options : * mut aws_http_proxy_strategy_tunneling_kerberos_options , pub ntlm_options : * mut aws_http_proxy_strategy_tunneling_ntlm_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_tunneling_adaptive_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_tunneling_adaptive_options > () - 16usize] ; ["Alignment of aws_http_proxy_strategy_tunneling_adaptive_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_tunneling_adaptive_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_adaptive_options::kerberos_options"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_adaptive_options , kerberos_options) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_adaptive_options::ntlm_options"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_adaptive_options , ntlm_options) - 8usize] ; } ; impl Default for aws_http_proxy_strategy_tunneling_adaptive_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)] pub struct aws_http_proxy_strategy_tunneling_sequence_options { pub strategies : * mut * mut aws_http_proxy_strategy , pub strategy_count : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_tunneling_sequence_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_tunneling_sequence_options > () - 16usize] ; ["Alignment of aws_http_proxy_strategy_tunneling_sequence_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_tunneling_sequence_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_sequence_options::strategies"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_sequence_options , strategies) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_sequence_options::strategy_count"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_sequence_options , strategy_count) - 8usize] ; } ; impl Default for aws_http_proxy_strategy_tunneling_sequence_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 () } } } unsafe extern "C" { # [doc = " Take a reference to an http proxy negotiator\n @param proxy_negotiator negotiator to take a reference to\n @return the strategy"] pub fn aws_http_proxy_negotiator_acquire (proxy_negotiator : * mut aws_http_proxy_negotiator) -> * mut aws_http_proxy_negotiator ; } unsafe extern "C" { # [doc = " Release a reference to an http proxy negotiator\n @param proxy_negotiator negotiator to release a reference to"] pub fn aws_http_proxy_negotiator_release (proxy_negotiator : * mut aws_http_proxy_negotiator) ; } unsafe extern "C" { # [doc = " Creates a new proxy negotiator from a proxy strategy\n @param allocator memory allocator to use\n @param strategy strategy to creation a new negotiator for\n @return a new proxy negotiator if successful, otherwise NULL"] pub fn aws_http_proxy_strategy_create_negotiator (strategy : * mut aws_http_proxy_strategy , allocator : * mut aws_allocator) -> * mut aws_http_proxy_negotiator ; } unsafe extern "C" { # [doc = " Take a reference to an http proxy strategy\n @param proxy_strategy strategy to take a reference to\n @return the strategy"] pub fn aws_http_proxy_strategy_acquire (proxy_strategy : * mut aws_http_proxy_strategy) -> * mut aws_http_proxy_strategy ; } unsafe extern "C" { # [doc = " Release a reference to an http proxy strategy\n @param proxy_strategy strategy to release a reference to"] pub fn aws_http_proxy_strategy_release (proxy_strategy : * mut aws_http_proxy_strategy) ; } unsafe extern "C" { # [doc = " A constructor for a proxy strategy that performs basic authentication by adding the appropriate\n header and header value to requests or CONNECT requests.\n\n @param allocator memory allocator to use\n @param config basic authentication configuration info\n @return a new proxy strategy if successfully constructed, otherwise NULL"] pub fn aws_http_proxy_strategy_new_basic_auth (allocator : * mut aws_allocator , config : * mut aws_http_proxy_strategy_basic_auth_options) -> * mut aws_http_proxy_strategy ; } unsafe extern "C" { # [doc = " Constructor for an adaptive tunneling proxy strategy.  This strategy attempts a vanilla CONNECT and if that\n fails it may make followup CONNECT attempts using kerberos or ntlm tokens, based on configuration and proxy\n response properties.\n\n @param allocator memory allocator to use\n @param config configuration options for the strategy\n @return a new proxy strategy if successfully constructed, otherwise NULL"] pub fn aws_http_proxy_strategy_new_tunneling_adaptive (allocator : * mut aws_allocator , config : * mut aws_http_proxy_strategy_tunneling_adaptive_options) -> * mut aws_http_proxy_strategy ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from http connection options\n @param allocator memory allocator to use\n @param options http connection options to source proxy configuration from\n @return"] pub fn aws_http_proxy_config_new_from_connection_options (allocator : * mut aws_allocator , options : * const aws_http_client_connection_options) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from http connection manager options\n @param allocator memory allocator to use\n @param options http connection manager options to source proxy configuration from\n @return"] pub fn aws_http_proxy_config_new_from_manager_options (allocator : * mut aws_allocator , options : * const aws_http_connection_manager_options) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from non-persistent proxy options.  The resulting\n proxy configuration assumes a tunneling connection type.\n\n @param allocator memory allocator to use\n @param options http proxy options to source proxy configuration from\n @return"] pub fn aws_http_proxy_config_new_tunneling_from_proxy_options (allocator : * mut aws_allocator , options : * const aws_http_proxy_options) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from non-persistent proxy options.\n Legacy connection type of proxy options will be rejected.\n\n @param allocator memory allocator to use\n @param options http proxy options to source proxy configuration from\n @return"] pub fn aws_http_proxy_config_new_from_proxy_options (allocator : * mut aws_allocator , options : * const aws_http_proxy_options) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from non-persistent proxy options.\n\n @param allocator memory allocator to use\n @param options http proxy options to source proxy configuration from\n @param is_tls_connection tls connection info of the main connection to determine connection_type\n                          when the connection_type is legacy.\n @return"] pub fn aws_http_proxy_config_new_from_proxy_options_with_tls_info (allocator : * mut aws_allocator , proxy_options : * const aws_http_proxy_options , is_tls_connection : bool) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Clones an existing proxy configuration.  A refactor could remove this (do a \"move\" between the old and new user\n data in the one spot it's used) but that should wait until we have better test cases for the logic where this\n gets invoked (ntlm/kerberos chains).\n\n @param allocator memory allocator to use\n @param proxy_config http proxy configuration to clone\n @return"] pub fn aws_http_proxy_config_new_clone (allocator : * mut aws_allocator , proxy_config : * const aws_http_proxy_config) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Destroys an http proxy configuration\n @param config http proxy configuration to destroy"] pub fn aws_http_proxy_config_destroy (config : * mut aws_http_proxy_config) ; } unsafe extern "C" { # [doc = " Initializes non-persistent http proxy options from a persistent http proxy configuration\n @param options http proxy options to initialize\n @param config the http proxy config to use as an initialization source"] pub fn aws_http_proxy_options_init_from_config (options : * mut aws_http_proxy_options , config : * const aws_http_proxy_config) ; } unsafe extern "C" { # [doc = " Establish an arbitrary protocol connection through an http proxy via tunneling CONNECT.  Alpn is\n not required for this connection process to succeed, but we encourage its use if available.\n\n @param channel_options configuration options for the socket level connection\n @param proxy_options configuration options for the proxy connection\n\n @return AWS_OP_SUCCESS if the asynchronous channel kickoff succeeded, AWS_OP_ERR otherwise"] pub fn aws_http_proxy_new_socket_channel (channel_options : * mut aws_socket_channel_bootstrap_options , proxy_options : * const aws_http_proxy_options) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_auth_http_system_vtable { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_ecc_key_pair { _unused : [u8 ; 0] , } unsafe extern "C" { pub static aws_sts_assume_role_default_duration_secs : u16 ; } pub type aws_on_get_credentials_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (credentials : * mut aws_credentials , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_credentials_provider_get_credentials_fn = :: std :: option :: Option < unsafe extern "C" fn (provider : * mut aws_credentials_provider , callback : aws_on_get_credentials_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; pub type aws_credentials_provider_destroy_fn = :: std :: option :: Option < unsafe extern "C" fn (provider : * mut aws_credentials_provider) > ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_credentials_provider_vtable { pub get_credentials : aws_credentials_provider_get_credentials_fn , pub destroy : aws_credentials_provider_destroy_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_vtable"] [:: std :: mem :: size_of :: < aws_credentials_provider_vtable > () - 16usize] ; ["Alignment of aws_credentials_provider_vtable"] [:: std :: mem :: align_of :: < aws_credentials_provider_vtable > () - 8usize] ; ["Offset of field: aws_credentials_provider_vtable::get_credentials"] [:: std :: mem :: offset_of ! (aws_credentials_provider_vtable , get_credentials) - 0usize] ; ["Offset of field: aws_credentials_provider_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_credentials_provider_vtable , destroy) - 8usize] ; } ; pub type aws_credentials_provider_shutdown_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_shutdown_options { pub shutdown_callback : aws_credentials_provider_shutdown_completed_fn , pub shutdown_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_shutdown_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_shutdown_options > () - 16usize] ; ["Alignment of aws_credentials_provider_shutdown_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_shutdown_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_shutdown_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_credentials_provider_shutdown_options , shutdown_callback) - 0usize] ; ["Offset of field: aws_credentials_provider_shutdown_options::shutdown_user_data"] [:: std :: mem :: offset_of ! (aws_credentials_provider_shutdown_options , shutdown_user_data) - 8usize] ; } ; impl Default for aws_credentials_provider_shutdown_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 () } } } # [doc = " A baseclass for credentials providers.  A credentials provider is an object that has an asynchronous\n query function for retrieving AWS credentials.\n\n Ref-counted.  Thread-safe."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider { pub vtable : * mut aws_credentials_provider_vtable , pub allocator : * mut aws_allocator , pub shutdown_options : aws_credentials_provider_shutdown_options , pub impl_ : * mut :: libc :: c_void , pub ref_count : aws_atomic_var , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider"] [:: std :: mem :: size_of :: < aws_credentials_provider > () - 48usize] ; ["Alignment of aws_credentials_provider"] [:: std :: mem :: align_of :: < aws_credentials_provider > () - 8usize] ; ["Offset of field: aws_credentials_provider::vtable"] [:: std :: mem :: offset_of ! (aws_credentials_provider , vtable) - 0usize] ; ["Offset of field: aws_credentials_provider::allocator"] [:: std :: mem :: offset_of ! (aws_credentials_provider , allocator) - 8usize] ; ["Offset of field: aws_credentials_provider::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider , shutdown_options) - 16usize] ; ["Offset of field: aws_credentials_provider::impl_"] [:: std :: mem :: offset_of ! (aws_credentials_provider , impl_) - 32usize] ; ["Offset of field: aws_credentials_provider::ref_count"] [:: std :: mem :: offset_of ! (aws_credentials_provider , ref_count) - 40usize] ; } ; impl Default for aws_credentials_provider { 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 = " Configuration options for a provider that returns a fixed set of credentials"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_static_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub access_key_id : aws_byte_cursor , pub secret_access_key : aws_byte_cursor , pub session_token : aws_byte_cursor , pub account_id : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_static_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_static_options > () - 80usize] ; ["Alignment of aws_credentials_provider_static_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_static_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_static_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_static_options::access_key_id"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , access_key_id) - 16usize] ; ["Offset of field: aws_credentials_provider_static_options::secret_access_key"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , secret_access_key) - 32usize] ; ["Offset of field: aws_credentials_provider_static_options::session_token"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , session_token) - 48usize] ; ["Offset of field: aws_credentials_provider_static_options::account_id"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , account_id) - 64usize] ; } ; impl Default for aws_credentials_provider_static_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 () } } } # [doc = " Configuration options for a provider that returns credentials based on environment variable values"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_environment_options { pub shutdown_options : aws_credentials_provider_shutdown_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_environment_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_environment_options > () - 16usize] ; ["Alignment of aws_credentials_provider_environment_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_environment_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_environment_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_environment_options , shutdown_options) - 0usize] ; } ; impl Default for aws_credentials_provider_environment_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 () } } } # [doc = " Configuration options for a provider that sources credentials from the aws config and credentials files\n (by default ~/.aws/config and ~/.aws/credentials)"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_profile_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub profile_name_override : aws_byte_cursor , pub config_file_name_override : aws_byte_cursor , pub credentials_file_name_override : aws_byte_cursor , # [doc = " (Optional)\n Use a cached merged profile collection. A merge collection has both config file\n (~/.aws/config) and credentials file based profile collection (~/.aws/credentials) using\n `aws_profile_collection_new_from_merge`.\n If this option is provided, `config_file_name_override` and `credentials_file_name_override` will be ignored."] pub profile_collection_cached : * mut aws_profile_collection , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub function_table : * mut aws_auth_http_system_vtable , pub proxy_ev_settings : * mut proxy_env_var_settings , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_profile_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_profile_options > () - 104usize] ; ["Alignment of aws_credentials_provider_profile_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_profile_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_profile_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_profile_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , profile_name_override) - 16usize] ; ["Offset of field: aws_credentials_provider_profile_options::config_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , config_file_name_override) - 32usize] ; ["Offset of field: aws_credentials_provider_profile_options::credentials_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , credentials_file_name_override) - 48usize] ; ["Offset of field: aws_credentials_provider_profile_options::profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , profile_collection_cached) - 64usize] ; ["Offset of field: aws_credentials_provider_profile_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , bootstrap) - 72usize] ; ["Offset of field: aws_credentials_provider_profile_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , tls_ctx) - 80usize] ; ["Offset of field: aws_credentials_provider_profile_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , function_table) - 88usize] ; ["Offset of field: aws_credentials_provider_profile_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , proxy_ev_settings) - 96usize] ; } ; impl Default for aws_credentials_provider_profile_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 () } } } # [doc = " Configuration options for a provider that functions as a caching decorator.  Credentials sourced through this\n provider will be cached within it until their expiration time.  When the cached credentials expire, new\n credentials will be fetched when next queried."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_cached_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub source : * mut aws_credentials_provider , pub refresh_time_in_milliseconds : u64 , pub high_res_clock_fn : aws_io_clock_fn , pub system_clock_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_cached_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_cached_options > () - 48usize] ; ["Alignment of aws_credentials_provider_cached_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_cached_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_cached_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_cached_options::source"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , source) - 16usize] ; ["Offset of field: aws_credentials_provider_cached_options::refresh_time_in_milliseconds"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , refresh_time_in_milliseconds) - 24usize] ; ["Offset of field: aws_credentials_provider_cached_options::high_res_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , high_res_clock_fn) - 32usize] ; ["Offset of field: aws_credentials_provider_cached_options::system_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , system_clock_fn) - 40usize] ; } ; impl Default for aws_credentials_provider_cached_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 () } } } # [doc = " Configuration options for a provider that queries, in order, a list of providers.  This provider uses the\n first set of credentials successfully queried.  Providers are queried one at a time; a provider is not queried\n until the preceding provider has failed to source credentials."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_chain_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub providers : * mut * mut aws_credentials_provider , pub provider_count : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_chain_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_chain_options > () - 32usize] ; ["Alignment of aws_credentials_provider_chain_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_chain_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_chain_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_chain_options::providers"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_options , providers) - 16usize] ; ["Offset of field: aws_credentials_provider_chain_options::provider_count"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_options , provider_count) - 24usize] ; } ; impl Default for aws_credentials_provider_chain_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 (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_imds_protocol_version { # [doc = " Defaults to IMDS_PROTOCOL_V2. It can be set to either one and IMDS Client\n will figure out (by looking at response code) which protocol an instance\n is using. But a more clear setting will reduce unnecessary network request."] IMDS_PROTOCOL_V2 = 0 , # [doc = " Defaults to IMDS_PROTOCOL_V2. It can be set to either one and IMDS Client\n will figure out (by looking at response code) which protocol an instance\n is using. But a more clear setting will reduce unnecessary network request."] IMDS_PROTOCOL_V1 = 1 , } # [doc = " Configuration options for the provider that sources credentials from ec2 instance metadata"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_imds_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub imds_version : aws_imds_protocol_version , pub ec2_metadata_v1_disabled : bool , pub function_table : * mut aws_auth_http_system_vtable , pub proxy_ev_settings : * const proxy_env_var_settings , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_imds_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_imds_options > () - 48usize] ; ["Alignment of aws_credentials_provider_imds_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_imds_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_imds_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_imds_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_imds_options::imds_version"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , imds_version) - 24usize] ; ["Offset of field: aws_credentials_provider_imds_options::ec2_metadata_v1_disabled"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , ec2_metadata_v1_disabled) - 28usize] ; ["Offset of field: aws_credentials_provider_imds_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , function_table) - 32usize] ; ["Offset of field: aws_credentials_provider_imds_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , proxy_ev_settings) - 40usize] ; } ; impl Default for aws_credentials_provider_imds_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)] pub struct aws_credentials_provider_ecs_environment_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_ecs_environment_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_ecs_environment_options > () - 48usize] ; ["Alignment of aws_credentials_provider_ecs_environment_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_ecs_environment_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , tls_ctx) - 24usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , proxy_ev_settings) - 32usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , function_table) - 40usize] ; } ; impl Default for aws_credentials_provider_ecs_environment_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)] pub struct aws_credentials_provider_ecs_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub host : aws_byte_cursor , pub path_and_query : aws_byte_cursor , pub auth_token_file_path : aws_byte_cursor , pub auth_token : aws_byte_cursor , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , pub port : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_ecs_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_ecs_options > () - 120usize] ; ["Alignment of aws_credentials_provider_ecs_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_ecs_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_ecs_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_ecs_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_ecs_options::host"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , host) - 24usize] ; ["Offset of field: aws_credentials_provider_ecs_options::path_and_query"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , path_and_query) - 40usize] ; ["Offset of field: aws_credentials_provider_ecs_options::auth_token_file_path"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , auth_token_file_path) - 56usize] ; ["Offset of field: aws_credentials_provider_ecs_options::auth_token"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , auth_token) - 72usize] ; ["Offset of field: aws_credentials_provider_ecs_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , tls_ctx) - 88usize] ; ["Offset of field: aws_credentials_provider_ecs_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , proxy_ev_settings) - 96usize] ; ["Offset of field: aws_credentials_provider_ecs_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , function_table) - 104usize] ; ["Offset of field: aws_credentials_provider_ecs_options::port"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , port) - 112usize] ; } ; impl Default for aws_credentials_provider_ecs_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 () } } } # [doc = " Configuration options for the X509 credentials provider\n\n The x509 credentials provider sources temporary credentials from AWS IoT Core using TLS mutual authentication.\n See details: https://docs.aws.amazon.com/iot/latest/developerguide/authorizing-direct-aws.html\n An end to end demo with detailed steps can be found here:\n https://aws.amazon.com/blogs/security/how-to-eliminate-the-need-for-hardcoded-aws-credentials-in-devices-by-using-the-aws-iot-credentials-provider/"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_x509_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub tls_connection_options : * const aws_tls_connection_options , pub thing_name : aws_byte_cursor , pub role_alias : aws_byte_cursor , # [doc = " Per-account X509 credentials sourcing endpoint."] pub endpoint : aws_byte_cursor , # [doc = " (Optional) Http proxy configuration for the http request that fetches credentials"] pub proxy_options : * const aws_http_proxy_options , # [doc = " (Optional) Settings propagated down to http connection manager to choose proxy options from environment. Read\n aws_http_credentials_provider.h for more information."] pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_x509_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_x509_options > () - 104usize] ; ["Alignment of aws_credentials_provider_x509_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_x509_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_x509_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_x509_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_x509_options::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , tls_connection_options) - 24usize] ; ["Offset of field: aws_credentials_provider_x509_options::thing_name"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , thing_name) - 32usize] ; ["Offset of field: aws_credentials_provider_x509_options::role_alias"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , role_alias) - 48usize] ; ["Offset of field: aws_credentials_provider_x509_options::endpoint"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , endpoint) - 64usize] ; ["Offset of field: aws_credentials_provider_x509_options::proxy_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , proxy_options) - 80usize] ; ["Offset of field: aws_credentials_provider_x509_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , proxy_ev_settings) - 88usize] ; ["Offset of field: aws_credentials_provider_x509_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , function_table) - 96usize] ; } ; impl Default for aws_credentials_provider_x509_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 () } } } # [doc = " Configuration options for the STS web identity provider\n\n Sts with web identity credentials provider sources a set of temporary security credentials for users who have been\n authenticated in a mobile or web application with a web identity provider.\n Example providers include Amazon Cognito, Login with Amazon, Facebook, Google, or any OpenID Connect-compatible\n identity provider like Elastic Kubernetes Service\n https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoleWithWebIdentity.html\n The required parameters used in the request (region, roleArn, sessionName, tokenFilePath) are automatically resolved\n by SDK from envrionment variables or config file if not set.\n---------------------------------------------------------------------------------\n| Parameter           | Environment Variable Name    | Config File Property Name |\n----------------------------------------------------------------------------------\n| region              | AWS_REGION/AWS_DEFAULT_REGION| region                    |\n| role_arn            | AWS_ROLE_ARN                 | role_arn                  |\n| role_session_name   | AWS_ROLE_SESSION_NAME        | role_session_name         |\n| token_file_path     | AWS_WEB_IDENTITY_TOKEN_FILE  | web_identity_token_file   |\n|--------------------------------------------------------------------------------|\n The order of resolution is the following\n 1. Parameters\n 2. Environment Variables (in case of region, the AWS_REGION is preferred over the AWS_DEFAULT_REGION)\n 3. Config File"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_sts_web_identity_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , # [doc = " (Optional)\n Use a cached config profile collection. You can also pass a merged collection."] pub config_profile_collection_cached : * mut aws_profile_collection , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , pub profile_name_override : aws_byte_cursor , pub region : aws_byte_cursor , pub role_arn : aws_byte_cursor , pub role_session_name : aws_byte_cursor , pub token_file_path : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_sts_web_identity_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_sts_web_identity_options > () - 136usize] ; ["Alignment of aws_credentials_provider_sts_web_identity_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_sts_web_identity_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::config_profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , config_profile_collection_cached) - 24usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , tls_ctx) - 32usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , proxy_ev_settings) - 40usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , function_table) - 48usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , profile_name_override) - 56usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::region"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , region) - 72usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::role_arn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , role_arn) - 88usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::role_session_name"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , role_session_name) - 104usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::token_file_path"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , token_file_path) - 120usize] ; } ; impl Default for aws_credentials_provider_sts_web_identity_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)] pub struct aws_credentials_provider_sso_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub profile_name_override : aws_byte_cursor , pub config_file_name_override : aws_byte_cursor , # [doc = " (Optional)\n Use a cached config profile collection. You can also pass a merged collection.\n config_file_name_override will be ignored if this option is provided."] pub config_file_cached : * mut aws_profile_collection , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , pub system_clock_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_sso_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_sso_options > () - 96usize] ; ["Alignment of aws_credentials_provider_sso_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_sso_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_sso_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_sso_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , profile_name_override) - 16usize] ; ["Offset of field: aws_credentials_provider_sso_options::config_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , config_file_name_override) - 32usize] ; ["Offset of field: aws_credentials_provider_sso_options::config_file_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , config_file_cached) - 48usize] ; ["Offset of field: aws_credentials_provider_sso_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , bootstrap) - 56usize] ; ["Offset of field: aws_credentials_provider_sso_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , tls_ctx) - 64usize] ; ["Offset of field: aws_credentials_provider_sso_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , proxy_ev_settings) - 72usize] ; ["Offset of field: aws_credentials_provider_sso_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , function_table) - 80usize] ; ["Offset of field: aws_credentials_provider_sso_options::system_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , system_clock_fn) - 88usize] ; } ; impl Default for aws_credentials_provider_sso_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 () } } } # [doc = " Configuration options for the STS credentials provider.\n STS Credentials Provider will try to automatically resolve the region and use a regional STS endpoint if successful.\n The region resolution order is the following:\n 1. AWS_REGION environment variable\n 2. AWS_DEFAULT_REGION environment variable\n 3. The region property in the config file."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_sts_options { pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub creds_provider : * mut aws_credentials_provider , pub role_arn : aws_byte_cursor , pub session_name : aws_byte_cursor , pub external_id : aws_byte_cursor , pub duration_seconds : u16 , # [doc = " (Optional) Http proxy configuration for the AssumeRole http request that fetches credentials"] pub http_proxy_options : * const aws_http_proxy_options , # [doc = " (Optional) Settings propagated down to http connection manager to choose proxy options from environment. Read\n aws_http_credentials_provider.h for more information."] pub proxy_ev_settings : * const proxy_env_var_settings , # [doc = " (Optional)\n Uses a cached config file profile collection (~/.aws/config). You can also pass a merged profile collection,\n which contains both a config file and a credentials file.\n If provided, config_file_name_override is ignored."] pub profile_collection_cached : * mut aws_profile_collection , pub profile_name_override : aws_byte_cursor , pub config_file_name_override : aws_byte_cursor , pub shutdown_options : aws_credentials_provider_shutdown_options , pub function_table : * mut aws_auth_http_system_vtable , pub system_clock_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_sts_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_sts_options > () - 168usize] ; ["Alignment of aws_credentials_provider_sts_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_sts_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_sts_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , bootstrap) - 0usize] ; ["Offset of field: aws_credentials_provider_sts_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , tls_ctx) - 8usize] ; ["Offset of field: aws_credentials_provider_sts_options::creds_provider"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , creds_provider) - 16usize] ; ["Offset of field: aws_credentials_provider_sts_options::role_arn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , role_arn) - 24usize] ; ["Offset of field: aws_credentials_provider_sts_options::session_name"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , session_name) - 40usize] ; ["Offset of field: aws_credentials_provider_sts_options::external_id"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , external_id) - 56usize] ; ["Offset of field: aws_credentials_provider_sts_options::duration_seconds"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , duration_seconds) - 72usize] ; ["Offset of field: aws_credentials_provider_sts_options::http_proxy_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , http_proxy_options) - 80usize] ; ["Offset of field: aws_credentials_provider_sts_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , proxy_ev_settings) - 88usize] ; ["Offset of field: aws_credentials_provider_sts_options::profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , profile_collection_cached) - 96usize] ; ["Offset of field: aws_credentials_provider_sts_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , profile_name_override) - 104usize] ; ["Offset of field: aws_credentials_provider_sts_options::config_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , config_file_name_override) - 120usize] ; ["Offset of field: aws_credentials_provider_sts_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , shutdown_options) - 136usize] ; ["Offset of field: aws_credentials_provider_sts_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , function_table) - 152usize] ; ["Offset of field: aws_credentials_provider_sts_options::system_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , system_clock_fn) - 160usize] ; } ; impl Default for aws_credentials_provider_sts_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 () } } } # [doc = " Configuration options for the process credentials provider\n\n The process credentials provider sources credentials from running a command or process.\n The command to run is sourced from a profile in the AWS config file, using the standard\n profile selection rules. The profile key the command is read from is \"credential_process.\"\n E.g.:\n  [default]\n  credential_process=/opt/amazon/bin/my-credential-fetcher --argsA=abc\n On successfully running the command, the output should be a json data with the following\n format:\n {\n\"Version\": 1,\n\"AccessKeyId\": \"accesskey\",\n\"SecretAccessKey\": \"secretAccessKey\"\n\"SessionToken\": \"....\",\n\"Expiration\": \"2019-05-29T00:21:43Z\"\n}\n Version here identifies the command output format version."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_process_options { pub shutdown_options : aws_credentials_provider_shutdown_options , # [doc = " In which profile name to look for credential_process,\n if not provided, we will try environment variable: AWS_PROFILE."] pub profile_to_use : aws_byte_cursor , # [doc = " (Optional)\n Use a cached config profile collection. You can also pass a merged collection."] pub config_profile_collection_cached : * mut aws_profile_collection , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_process_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_process_options > () - 40usize] ; ["Alignment of aws_credentials_provider_process_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_process_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_process_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_process_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_process_options::profile_to_use"] [:: std :: mem :: offset_of ! (aws_credentials_provider_process_options , profile_to_use) - 16usize] ; ["Offset of field: aws_credentials_provider_process_options::config_profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_process_options , config_profile_collection_cached) - 32usize] ; } ; impl Default for aws_credentials_provider_process_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 () } } } # [doc = " Configuration options for the default credentials provider chain."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_chain_default_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , # [doc = " (Optional)\n Use a cached merged profile collection. A merge collection has both config file\n (~/.aws/config) and credentials file based profile collection (~/.aws/credentials) using\n `aws_profile_collection_new_from_merge`."] pub profile_collection_cached : * mut aws_profile_collection , pub profile_name_override : aws_byte_cursor , pub skip_environment_credentials_provider : bool , pub proxy_ev_settings : * const proxy_env_var_settings , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_chain_default_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_chain_default_options > () - 72usize] ; ["Alignment of aws_credentials_provider_chain_default_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_chain_default_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , tls_ctx) - 24usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , profile_collection_cached) - 32usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , profile_name_override) - 40usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::skip_environment_credentials_provider"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , skip_environment_credentials_provider) - 56usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , proxy_ev_settings) - 64usize] ; } ; impl Default for aws_credentials_provider_chain_default_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_credentials_provider_delegate_get_credentials_fn = :: std :: option :: Option < unsafe extern "C" fn (delegate_user_data : * mut :: libc :: c_void , callback : aws_on_get_credentials_callback_fn , callback_user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Configuration options for the delegate credentials provider."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_delegate_options { pub shutdown_options : aws_credentials_provider_shutdown_options , # [doc = " Delegated get_credentials() callback."] pub get_credentials : aws_credentials_provider_delegate_get_credentials_fn , # [doc = " User data for delegated callbacks."] pub delegate_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_delegate_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_delegate_options > () - 32usize] ; ["Alignment of aws_credentials_provider_delegate_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_delegate_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_delegate_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_delegate_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_delegate_options::get_credentials"] [:: std :: mem :: offset_of ! (aws_credentials_provider_delegate_options , get_credentials) - 16usize] ; ["Offset of field: aws_credentials_provider_delegate_options::delegate_user_data"] [:: std :: mem :: offset_of ! (aws_credentials_provider_delegate_options , delegate_user_data) - 24usize] ; } ; impl Default for aws_credentials_provider_delegate_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 () } } } # [doc = " A (string) pair defining an identity provider and a valid login token sourced from it."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_cognito_identity_provider_token_pair { # [doc = " Name of an identity provider"] pub identity_provider_name : aws_byte_cursor , # [doc = " Valid login token source from the identity provider"] pub identity_provider_token : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_cognito_identity_provider_token_pair"] [:: std :: mem :: size_of :: < aws_cognito_identity_provider_token_pair > () - 32usize] ; ["Alignment of aws_cognito_identity_provider_token_pair"] [:: std :: mem :: align_of :: < aws_cognito_identity_provider_token_pair > () - 8usize] ; ["Offset of field: aws_cognito_identity_provider_token_pair::identity_provider_name"] [:: std :: mem :: offset_of ! (aws_cognito_identity_provider_token_pair , identity_provider_name) - 0usize] ; ["Offset of field: aws_cognito_identity_provider_token_pair::identity_provider_token"] [:: std :: mem :: offset_of ! (aws_cognito_identity_provider_token_pair , identity_provider_token) - 16usize] ; } ; impl Default for aws_cognito_identity_provider_token_pair { 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_credentials_provider_cognito_get_token_pairs_completion_fn = :: std :: option :: Option < unsafe extern "C" fn (logins : * mut aws_cognito_identity_provider_token_pair , login_count : usize , error_code : :: libc :: c_int , completion_user_data : * mut :: libc :: c_void) > ; pub type aws_credentials_provider_cognito_get_token_pairs_async_fn = :: std :: option :: Option < unsafe extern "C" fn (get_token_pairs_user_data : * mut :: libc :: c_void , completion_callback : aws_credentials_provider_cognito_get_token_pairs_completion_fn , completion_user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Configuration options needed to create a Cognito-based Credentials Provider"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_cognito_options { pub shutdown_options : aws_credentials_provider_shutdown_options , # [doc = " Cognito service regional endpoint to source credentials from."] pub endpoint : aws_byte_cursor , # [doc = " Cognito identity to fetch credentials relative to."] pub identity : aws_byte_cursor , # [doc = " Optional set of identity provider token pairs to allow for authenticated identity access."] pub logins : * mut aws_cognito_identity_provider_token_pair , pub login_count : usize , # [doc = " Optional ARN of the role to be assumed when multiple roles were received in the token from the identity provider."] pub custom_role_arn : * mut aws_byte_cursor , # [doc = " Connection bootstrap to use for network connections made while sourcing credentials"] pub bootstrap : * mut aws_client_bootstrap , # [doc = " Client TLS context to use when querying cognito credentials.\n Required."] pub tls_ctx : * mut aws_tls_ctx , # [doc = " (Optional) Http proxy configuration for the http request that fetches credentials"] pub http_proxy_options : * const aws_http_proxy_options , # [doc = " (Optional) Settings propagated down to http connection manager to choose proxy options from environment. Read\n aws_http_credentials_provider.h for more information."] pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , # [doc = " Optional async function to allow for dynamic augmentation of the token pair set on a per-request basis."] pub get_token_pairs : aws_credentials_provider_cognito_get_token_pairs_async_fn , # [doc = " User data that should be passed in to the get_token_pairs function as the first parameter.  In practice, this\n will be a reference to a CRT binding object."] pub get_token_pairs_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_cognito_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_cognito_options > () - 128usize] ; ["Alignment of aws_credentials_provider_cognito_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_cognito_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_cognito_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_cognito_options::endpoint"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , endpoint) - 16usize] ; ["Offset of field: aws_credentials_provider_cognito_options::identity"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , identity) - 32usize] ; ["Offset of field: aws_credentials_provider_cognito_options::logins"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , logins) - 48usize] ; ["Offset of field: aws_credentials_provider_cognito_options::login_count"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , login_count) - 56usize] ; ["Offset of field: aws_credentials_provider_cognito_options::custom_role_arn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , custom_role_arn) - 64usize] ; ["Offset of field: aws_credentials_provider_cognito_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , bootstrap) - 72usize] ; ["Offset of field: aws_credentials_provider_cognito_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , tls_ctx) - 80usize] ; ["Offset of field: aws_credentials_provider_cognito_options::http_proxy_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , http_proxy_options) - 88usize] ; ["Offset of field: aws_credentials_provider_cognito_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , proxy_ev_settings) - 96usize] ; ["Offset of field: aws_credentials_provider_cognito_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , function_table) - 104usize] ; ["Offset of field: aws_credentials_provider_cognito_options::get_token_pairs"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , get_token_pairs) - 112usize] ; ["Offset of field: aws_credentials_provider_cognito_options::get_token_pairs_user_data"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , get_token_pairs_user_data) - 120usize] ; } ; impl Default for aws_credentials_provider_cognito_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)] pub struct aws_credentials_provider_login_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub login_session : aws_byte_cursor , pub login_region : aws_byte_cursor , pub login_cache_directory_override : aws_byte_cursor , pub profile_name_override : aws_byte_cursor , pub config_file_name_override : aws_byte_cursor , pub config_file_cached : * mut aws_profile_collection , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , pub system_clock_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_login_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_login_options > () - 144usize] ; ["Alignment of aws_credentials_provider_login_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_login_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_login_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_login_options::login_session"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , login_session) - 16usize] ; ["Offset of field: aws_credentials_provider_login_options::login_region"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , login_region) - 32usize] ; ["Offset of field: aws_credentials_provider_login_options::login_cache_directory_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , login_cache_directory_override) - 48usize] ; ["Offset of field: aws_credentials_provider_login_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , profile_name_override) - 64usize] ; ["Offset of field: aws_credentials_provider_login_options::config_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , config_file_name_override) - 80usize] ; ["Offset of field: aws_credentials_provider_login_options::config_file_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , config_file_cached) - 96usize] ; ["Offset of field: aws_credentials_provider_login_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , bootstrap) - 104usize] ; ["Offset of field: aws_credentials_provider_login_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , tls_ctx) - 112usize] ; ["Offset of field: aws_credentials_provider_login_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , proxy_ev_settings) - 120usize] ; ["Offset of field: aws_credentials_provider_login_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , function_table) - 128usize] ; ["Offset of field: aws_credentials_provider_login_options::system_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , system_clock_fn) - 136usize] ; } ; impl Default for aws_credentials_provider_login_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 () } } } # [doc = " Configuration options for `aws_credentials_new_with_options`"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_options { pub access_key_id_cursor : aws_byte_cursor , pub secret_access_key_cursor : aws_byte_cursor , pub session_token_cursor : aws_byte_cursor , pub account_id_cursor : aws_byte_cursor , pub expiration_timepoint_seconds : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_options"] [:: std :: mem :: size_of :: < aws_credentials_options > () - 72usize] ; ["Alignment of aws_credentials_options"] [:: std :: mem :: align_of :: < aws_credentials_options > () - 8usize] ; ["Offset of field: aws_credentials_options::access_key_id_cursor"] [:: std :: mem :: offset_of ! (aws_credentials_options , access_key_id_cursor) - 0usize] ; ["Offset of field: aws_credentials_options::secret_access_key_cursor"] [:: std :: mem :: offset_of ! (aws_credentials_options , secret_access_key_cursor) - 16usize] ; ["Offset of field: aws_credentials_options::session_token_cursor"] [:: std :: mem :: offset_of ! (aws_credentials_options , session_token_cursor) - 32usize] ; ["Offset of field: aws_credentials_options::account_id_cursor"] [:: std :: mem :: offset_of ! (aws_credentials_options , account_id_cursor) - 48usize] ; ["Offset of field: aws_credentials_options::expiration_timepoint_seconds"] [:: std :: mem :: offset_of ! (aws_credentials_options , expiration_timepoint_seconds) - 64usize] ; } ; impl Default for aws_credentials_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 () } } } unsafe extern "C" { # [doc = " Creates a new set of aws credentials\n\n @param allocator memory allocator to use\n @param access_key_id_cursor value for the aws access key id field\n @param secret_access_key_cursor value for the secret access key field\n @param session_token_cursor (optional) security token associated with the credentials\n @param expiration_timepoint_seconds timepoint, in seconds since epoch, that the credentials will no longer\n be valid past.  For credentials that do not expire, use UINT64_MAX\n\n @return a valid credentials object, or NULL"] pub fn aws_credentials_new (allocator : * mut aws_allocator , access_key_id_cursor : aws_byte_cursor , secret_access_key_cursor : aws_byte_cursor , session_token_cursor : aws_byte_cursor , expiration_timepoint_seconds : u64) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Creates a new set of aws credentials with account_id\n\n @param allocator memory allocator to use\n @param access_key_id_cursor value for the aws access key id field\n @param secret_access_key_cursor value for the secret access key field\n @param session_token_cursor (optional) security token associated with the credentials\n @param account_id (optional) value for the account_id field\n @param expiration_timepoint_seconds timepoint, in seconds since epoch, that the credentials will no longer\n be valid past.  For credentials that do not expire, use UINT64_MAX\n\n @return a valid credentials object, or NULL"] pub fn aws_credentials_new_with_options (allocator : * mut aws_allocator , options : * const aws_credentials_options) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Creates a new set of aws anonymous credentials.\n Use Anonymous credentials, when you want to skip the signing process.\n\n @param allocator memory allocator to use\n\n @return a valid credentials object, or NULL"] pub fn aws_credentials_new_anonymous (allocator : * mut aws_allocator) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Creates a new set of AWS credentials\n\n @param allocator memory allocator to use\n @param access_key_id  value for the aws access key id field\n @param secret_access_key value for the secret access key field\n @param session_token (optional) security token associated with the credentials\n @param expiration_timepoint_seconds timepoint, in seconds since epoch, that the credentials will no longer\n be valid past.  For credentials that do not expire, use UINT64_MAX\n\n @return a valid credentials object, or NULL"] pub fn aws_credentials_new_from_string (allocator : * mut aws_allocator , access_key_id : * const aws_string , secret_access_key : * const aws_string , session_token : * const aws_string , expiration_timepoint_seconds : u64) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Creates a set of AWS credentials that includes an ECC key pair.  These credentials do not have a value for\n the secret access key; the ecc key takes over that field's role in sigv4a signing.\n\n @param allocator memory allocator to use for all memory allocations\n @param access_key_id access key id for the credential set\n @param ecc_key ecc key to use during signing when using these credentials\n @param session_token (optional) session token associated with the credentials\n @param expiration_timepoint_in_seconds (optional) if session-based, time at which these credentials expire\n @return a new pair of AWS credentials, or NULL"] pub fn aws_credentials_new_ecc (allocator : * mut aws_allocator , access_key_id : aws_byte_cursor , ecc_key : * mut aws_ecc_key_pair , session_token : aws_byte_cursor , expiration_timepoint_in_seconds : u64) -> * mut aws_credentials ; } unsafe extern "C" { pub fn aws_credentials_new_ecc_from_aws_credentials (allocator : * mut aws_allocator , credentials : * const aws_credentials) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Add a reference to some credentials\n\n @param credentials credentials to increment the ref count on"] pub fn aws_credentials_acquire (credentials : * const aws_credentials) ; } unsafe extern "C" { # [doc = " Remove a reference to some credentials\n\n @param credentials credentials to decrement the ref count on"] pub fn aws_credentials_release (credentials : * const aws_credentials) ; } unsafe extern "C" { # [doc = " Get the AWS access key id from a set of credentials\n\n @param credentials credentials to get the access key id from\n @return a byte cursor to the access key id"] pub fn aws_credentials_get_access_key_id (credentials : * const aws_credentials) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the AWS secret access key from a set of credentials\n\n @param credentials credentials to get the secret access key from\n @return a byte cursor to the secret access key"] pub fn aws_credentials_get_secret_access_key (credentials : * const aws_credentials) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the AWS session token from a set of credentials\n\n @param credentials credentials to get the session token from\n @return a byte cursor to the session token or an empty byte cursor if there is no session token"] pub fn aws_credentials_get_session_token (credentials : * const aws_credentials) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the AWS account id from a set of credentials\n\n @param credentials to get the account id from\n @return a byte cursor to the account id or an empty byte cursor if there is no account id"] pub fn aws_credentials_get_account_id (credentials : * const aws_credentials) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the expiration timepoint (in seconds since epoch) associated with a set of credentials\n\n @param credentials credentials to get the expiration timepoint for\n @return the time, in seconds since epoch, the credentials will expire; UINT64_MAX for credentials\n without a specific expiration time"] pub fn aws_credentials_get_expiration_timepoint_seconds (credentials : * const aws_credentials) -> u64 ; } unsafe extern "C" { # [doc = " Get the elliptic curve key associated with this set of credentials\n @param credentials credentials to get the the elliptic curve key for\n @return the elliptic curve key associated with the credentials, or NULL if no key is associated with\n these credentials"] pub fn aws_credentials_get_ecc_key_pair (credentials : * const aws_credentials) -> * mut aws_ecc_key_pair ; } unsafe extern "C" { # [doc = " If credentials are anonymous, then the signing process is skipped.\n\n @param credentials credentials to check\n\n @return true if the credentials are anonymous; false otherwise."] pub fn aws_credentials_is_anonymous (credentials : * const aws_credentials) -> bool ; } unsafe extern "C" { # [doc = " Derives an ecc key pair (based on the nist P256 curve) from the access key id and secret access key components\n of a set of AWS credentials using an internal key derivation specification.  Used to perform sigv4a signing in\n the hybrid mode based on AWS credentials.\n\n @param allocator memory allocator to use for all memory allocations\n @param credentials AWS credentials to derive the ECC key from using the AWS sigv4a key derivation specification\n @return a new ecc key pair or NULL on failure"] pub fn aws_ecc_key_pair_new_ecdsa_p256_key_from_aws_credentials (allocator : * mut aws_allocator , credentials : * const aws_credentials) -> * mut aws_ecc_key_pair ; } unsafe extern "C" { # [doc = " Release a reference to a credentials provider\n\n @param provider provider to decrement the ref count on"] pub fn aws_credentials_provider_release (provider : * mut aws_credentials_provider) -> * mut aws_credentials_provider ; } unsafe extern "C" { pub fn aws_credentials_provider_acquire (provider : * mut aws_credentials_provider) -> * mut aws_credentials_provider ; } unsafe extern "C" { pub fn aws_credentials_provider_get_credentials (provider : * mut aws_credentials_provider , callback : aws_on_get_credentials_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Creates a simple provider that just returns a fixed set of credentials\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_static (allocator : * mut aws_allocator , options : * const aws_credentials_provider_static_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a simple anonymous credentials provider\n\n @param allocator memory allocator to use for all memory allocation\n @param shutdown_options an optional shutdown callback that gets\n invoked when the resources used by the provider are no longer in use.\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_anonymous (allocator : * mut aws_allocator , shutdown_options : * const aws_credentials_provider_shutdown_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that returns credentials sourced from the environment variables:\n\n AWS_ACCESS_KEY_ID\n AWS_SECRET_ACCESS_KEY\n AWS_SESSION_TOKEN\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_environment (allocator : * mut aws_allocator , options : * const aws_credentials_provider_environment_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that functions as a caching decorating of another provider.\n\n For example, the default chain is implemented as:\n\n CachedProvider -> ProviderChain(EnvironmentProvider -> ProfileProvider -> ECS/EC2IMD etc...)\n\n A reference is taken on the target provider\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_cached (allocator : * mut aws_allocator , options : * const aws_credentials_provider_cached_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from key-value profiles loaded from the aws credentials\n file (\"~/.aws/credentials\" by default) and the aws config file (\"~/.aws/config\" by\n default)\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_profile (allocator : * mut aws_allocator , options : * const aws_credentials_provider_profile_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that assumes an IAM role via. STS AssumeRole() API. This provider will fetch new credentials\n upon each call to aws_credentials_provider_get_credentials().\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_sts (allocator : * mut aws_allocator , options : * const aws_credentials_provider_sts_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from an ordered sequence of providers, with the overall result\n being from the first provider to return a valid set of credentials\n\n References are taken on all supplied providers\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_chain (allocator : * mut aws_allocator , options : * const aws_credentials_provider_chain_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from the ec2 instance metadata service\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_imds (allocator : * mut aws_allocator , options : * const aws_credentials_provider_imds_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from the ecs role credentials service and reads the required params from\n environment variables\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_ecs_from_environment (allocator : * mut aws_allocator , options : * const aws_credentials_provider_ecs_environment_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from the ecs role credentials service\n This function doesn't read anything from the environment and requires everything to be explicitly passed in.\n If you need to read properties from the environment, use the `aws_credentials_provider_new_ecs_from_environment`.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_ecs (allocator : * mut aws_allocator , options : * const aws_credentials_provider_ecs_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from IoT Core\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_x509 (allocator : * mut aws_allocator , options : * const aws_credentials_provider_x509_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from STS using AssumeRoleWithWebIdentity\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_sts_web_identity (allocator : * mut aws_allocator , options : * const aws_credentials_provider_sts_web_identity_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from SSO using a SSOToken.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_sso (allocator : * mut aws_allocator , options : * const aws_credentials_provider_sso_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { pub fn aws_credentials_provider_new_process (allocator : * mut aws_allocator , options : * const aws_credentials_provider_process_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Create a credentials provider depends on provided vtable to fetch the credentials.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_delegate (allocator : * mut aws_allocator , options : * const aws_credentials_provider_delegate_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from the Cognito-Identity service via an\n invocation of the GetCredentialsForIdentity API call.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_cognito (allocator : * mut aws_allocator , options : * const aws_credentials_provider_cognito_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a cognito-based provider that has a caching layer wrapped around it\n\n @param allocator memory allocator to use for all memory allocation\n @param options cognito-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_cognito_caching (allocator : * mut aws_allocator , options : * const aws_credentials_provider_cognito_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from AWS Login.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_login (allocator : * mut aws_allocator , options : * const aws_credentials_provider_login_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates the default provider chain used by most AWS SDKs.\n\n Generally:\n\n (1) Environment\n (2) Profile\n    - STSCredentialsProvider\n    - ProcessCredentialsProvider\n    - ProfileCredentialsProvider\n (3) STS web identity\n (4) (conditional, off by default) ECS\n (5) (conditional, on by default) EC2 Instance Metadata\n\n Support for environmental control of the default provider chain is not yet\n implemented.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_chain_default (allocator : * mut aws_allocator , options : * const aws_credentials_provider_chain_default_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { pub static mut g_aws_credentials_provider_http_function_table : * const aws_auth_http_system_vtable ; } pub const AWS_DATE_TIME_STR_MAX_LEN : _bindgen_ty_21 = _bindgen_ty_21 :: AWS_DATE_TIME_STR_MAX_LEN ; pub const AWS_DATE_TIME_STR_MAX_BASIC_LEN : _bindgen_ty_21 = _bindgen_ty_21 :: AWS_DATE_TIME_STR_MAX_BASIC_LEN ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_21 { AWS_DATE_TIME_STR_MAX_LEN = 100 , AWS_DATE_TIME_STR_MAX_BASIC_LEN = 20 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_date_format { AWS_DATE_FORMAT_RFC822 = 0 , AWS_DATE_FORMAT_ISO_8601 = 1 , AWS_DATE_FORMAT_ISO_8601_BASIC = 2 , AWS_DATE_FORMAT_AUTO_DETECT = 3 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_date_month { AWS_DATE_MONTH_JANUARY = 0 , AWS_DATE_MONTH_FEBRUARY = 1 , AWS_DATE_MONTH_MARCH = 2 , AWS_DATE_MONTH_APRIL = 3 , AWS_DATE_MONTH_MAY = 4 , AWS_DATE_MONTH_JUNE = 5 , AWS_DATE_MONTH_JULY = 6 , AWS_DATE_MONTH_AUGUST = 7 , AWS_DATE_MONTH_SEPTEMBER = 8 , AWS_DATE_MONTH_OCTOBER = 9 , AWS_DATE_MONTH_NOVEMBER = 10 , AWS_DATE_MONTH_DECEMBER = 11 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_date_day_of_week { AWS_DATE_DAY_OF_WEEK_SUNDAY = 0 , AWS_DATE_DAY_OF_WEEK_MONDAY = 1 , AWS_DATE_DAY_OF_WEEK_TUESDAY = 2 , AWS_DATE_DAY_OF_WEEK_WEDNESDAY = 3 , AWS_DATE_DAY_OF_WEEK_THURSDAY = 4 , AWS_DATE_DAY_OF_WEEK_FRIDAY = 5 , AWS_DATE_DAY_OF_WEEK_SATURDAY = 6 , } # [repr (C)] pub struct aws_date_time { pub timestamp : time_t , pub milliseconds : u16 , pub tz : [:: libc :: c_char ; 6usize] , pub gmt_time : tm , pub local_time : tm , pub utc_assumed : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_date_time"] [:: std :: mem :: size_of :: < aws_date_time > () - 136usize] ; ["Alignment of aws_date_time"] [:: std :: mem :: align_of :: < aws_date_time > () - 8usize] ; ["Offset of field: aws_date_time::timestamp"] [:: std :: mem :: offset_of ! (aws_date_time , timestamp) - 0usize] ; ["Offset of field: aws_date_time::milliseconds"] [:: std :: mem :: offset_of ! (aws_date_time , milliseconds) - 8usize] ; ["Offset of field: aws_date_time::tz"] [:: std :: mem :: offset_of ! (aws_date_time , tz) - 10usize] ; ["Offset of field: aws_date_time::gmt_time"] [:: std :: mem :: offset_of ! (aws_date_time , gmt_time) - 16usize] ; ["Offset of field: aws_date_time::local_time"] [:: std :: mem :: offset_of ! (aws_date_time , local_time) - 72usize] ; ["Offset of field: aws_date_time::utc_assumed"] [:: std :: mem :: offset_of ! (aws_date_time , utc_assumed) - 128usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Initializes dt to be the current system time."] pub fn aws_date_time_init_now (dt : * mut aws_date_time) ; } unsafe 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) ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Initializes dt to be the time represented by date_str in format 'fmt'. Returns AWS_OP_SUCCESS if the\n string was successfully parsed, returns  AWS_OP_ERR if parsing failed.\n\n The parser is lenient regarding AWS_DATE_FORMAT_ISO_8601 vs AWS_DATE_FORMAT_ISO_8601_BASIC.\n Regardless of which you pass in, both \"2002-10-02T08:05:09Z\" and \"20021002T080509Z\" would be accepted.\n\n Notes for AWS_DATE_FORMAT_RFC822:\n If no time zone information is provided, it is assumed to be local time (please don't do this).\n\n Only time zones indicating Universal Time (e.g. Z, UT, UTC, or GMT),\n or offsets from UTC (e.g. +0100, -0700), are accepted.\n\n 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) -> :: libc :: c_int ; } unsafe 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) -> :: libc :: c_int ; } unsafe 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\n return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not\n 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) -> :: libc :: c_int ; } unsafe 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\n return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not\n 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) -> :: libc :: c_int ; } unsafe 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\n will return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not\n 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) -> :: libc :: c_int ; } unsafe 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\n return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not\n 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) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_date_time_as_epoch_secs (dt : * const aws_date_time) -> f64 ; } unsafe extern "C" { pub fn aws_date_time_as_nanos (dt : * const aws_date_time) -> u64 ; } unsafe extern "C" { pub fn aws_date_time_as_millis (dt : * const aws_date_time) -> u64 ; } unsafe extern "C" { pub fn aws_date_time_year (dt : * const aws_date_time , local_time : bool) -> u16 ; } unsafe extern "C" { pub fn aws_date_time_month (dt : * const aws_date_time , local_time : bool) -> aws_date_month ; } unsafe extern "C" { pub fn aws_date_time_month_day (dt : * const aws_date_time , local_time : bool) -> u8 ; } unsafe extern "C" { pub fn aws_date_time_day_of_week (dt : * const aws_date_time , local_time : bool) -> aws_date_day_of_week ; } unsafe extern "C" { pub fn aws_date_time_hour (dt : * const aws_date_time , local_time : bool) -> u8 ; } unsafe extern "C" { pub fn aws_date_time_minute (dt : * const aws_date_time , local_time : bool) -> u8 ; } unsafe extern "C" { pub fn aws_date_time_second (dt : * const aws_date_time , local_time : bool) -> u8 ; } unsafe extern "C" { pub fn aws_date_time_dst (dt : * const aws_date_time , local_time : bool) -> bool ; } unsafe 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 ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_connection_manager { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_socket_options { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_tls_connection_options { _unused : [u8 ; 0] , } pub type aws_http_connection_manager_on_connection_setup_fn = :: std :: option :: Option < unsafe extern "C" fn (connection : * mut aws_http_connection , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_http_connection_manager_shutdown_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " Metrics for logging and debugging purpose."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_manager_metrics { # [doc = " The number of additional concurrent requests that can be supported by the HTTP manager without needing to\n establish additional connections to the target server.\n\n For connection manager, it equals to connections that's idle.\n For stream manager, it equals to the number of streams that are possible to be made without creating new\n connection, although the implementation can create new connection without fully filling it."] pub available_concurrency : usize , pub pending_concurrency_acquires : usize , pub leased_concurrency : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_manager_metrics"] [:: std :: mem :: size_of :: < aws_http_manager_metrics > () - 24usize] ; ["Alignment of aws_http_manager_metrics"] [:: std :: mem :: align_of :: < aws_http_manager_metrics > () - 8usize] ; ["Offset of field: aws_http_manager_metrics::available_concurrency"] [:: std :: mem :: offset_of ! (aws_http_manager_metrics , available_concurrency) - 0usize] ; ["Offset of field: aws_http_manager_metrics::pending_concurrency_acquires"] [:: std :: mem :: offset_of ! (aws_http_manager_metrics , pending_concurrency_acquires) - 8usize] ; ["Offset of field: aws_http_manager_metrics::leased_concurrency"] [:: std :: mem :: offset_of ! (aws_http_manager_metrics , leased_concurrency) - 16usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_connection_manager_options { pub bootstrap : * mut aws_client_bootstrap , pub initial_window_size : usize , pub socket_options : * const aws_socket_options , # [doc = " Optional (ignored if 0).\n After a request is fully sent, if the server does not begin responding within N milliseconds,\n then fail with AWS_ERROR_HTTP_RESPONSE_FIRST_BYTE_TIMEOUT.\n This can be overridden per-request by aws_http_make_request_options.response_first_byte_timeout_ms.\n TODO: Only supported in HTTP/1.1 now, support it in HTTP/2"] pub response_first_byte_timeout_ms : u64 , # [doc = " Options to create secure (HTTPS) connections.\n For secure connections, set \"h2\" in the ALPN string for HTTP/2, otherwise HTTP/1.1 is used.\n\n Leave NULL to create cleartext (HTTP) connections.\n For cleartext connections, use `http2_prior_knowledge` (RFC-7540 3.4)\n to control whether that are treated as HTTP/1.1 or HTTP/2."] pub tls_connection_options : * const aws_tls_connection_options , # [doc = " Specify whether you have prior knowledge that cleartext (HTTP) connections are HTTP/2 (RFC-7540 3.4).\n If false, then cleartext connections are treated as HTTP/1.1.\n It is illegal to set this true when secure connections are being used.\n Note that upgrading from HTTP/1.1 to HTTP/2 is not supported (RFC-7540 3.2)."] pub http2_prior_knowledge : bool , pub monitoring_options : * const aws_http_connection_monitoring_options , pub host : aws_byte_cursor , pub port : u32 , # [doc = " Optional.\n HTTP/2 specific configuration. Check `struct aws_http2_connection_options` for details of each config"] pub initial_settings_array : * const aws_http2_setting , pub num_initial_settings : usize , pub max_closed_streams : usize , pub http2_conn_manual_window_management : bool , pub proxy_options : * const aws_http_proxy_options , pub proxy_ev_settings : * const proxy_env_var_settings , pub max_connections : usize , pub shutdown_complete_user_data : * mut :: libc :: c_void , pub shutdown_complete_callback : aws_http_connection_manager_shutdown_complete_fn , # [doc = " If set to true, the read back pressure mechanism will be enabled."] pub enable_read_back_pressure : bool , # [doc = " If set to a non-zero value, then connections that stay in the pool longer than the specified\n timeout will be closed automatically."] pub max_connection_idle_in_milliseconds : u64 , # [doc = " If set to a non-zero value, aws_http_connection_manager_acquire_connection() calls\n will give up after waiting this long for a connection from the pool,\n failing with error AWS_ERROR_HTTP_CONNECTION_MANAGER_ACQUISITION_TIMEOUT."] pub connection_acquisition_timeout_ms : u64 , pub max_pending_connection_acquisitions : u64 , # [doc = " THIS IS AN EXPERIMENTAL AND UNSTABLE API\n (Optional)\n An array of network interface names. The manager will distribute the\n connections across network interface names provided in this array. If any interface name is invalid, goes down,\n or has any issues like network access, you will see connection failures. If\n `socket_options.network_interface_name` is also set, an `AWS_ERROR_INVALID_ARGUMENT` error will be raised.\n\n This option is only supported on Linux, MacOS, and platforms that have either SO_BINDTODEVICE or IP_BOUND_IF. It\n is not supported on Windows. `AWS_ERROR_PLATFORM_NOT_SUPPORTED` will be raised on unsupported platforms."] pub network_interface_names_array : * const aws_byte_cursor , pub num_network_interface_names : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_connection_manager_options"] [:: std :: mem :: size_of :: < aws_http_connection_manager_options > () - 200usize] ; ["Alignment of aws_http_connection_manager_options"] [:: std :: mem :: align_of :: < aws_http_connection_manager_options > () - 8usize] ; ["Offset of field: aws_http_connection_manager_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , bootstrap) - 0usize] ; ["Offset of field: aws_http_connection_manager_options::initial_window_size"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , initial_window_size) - 8usize] ; ["Offset of field: aws_http_connection_manager_options::socket_options"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , socket_options) - 16usize] ; ["Offset of field: aws_http_connection_manager_options::response_first_byte_timeout_ms"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , response_first_byte_timeout_ms) - 24usize] ; ["Offset of field: aws_http_connection_manager_options::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , tls_connection_options) - 32usize] ; ["Offset of field: aws_http_connection_manager_options::http2_prior_knowledge"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , http2_prior_knowledge) - 40usize] ; ["Offset of field: aws_http_connection_manager_options::monitoring_options"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , monitoring_options) - 48usize] ; ["Offset of field: aws_http_connection_manager_options::host"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , host) - 56usize] ; ["Offset of field: aws_http_connection_manager_options::port"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , port) - 72usize] ; ["Offset of field: aws_http_connection_manager_options::initial_settings_array"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , initial_settings_array) - 80usize] ; ["Offset of field: aws_http_connection_manager_options::num_initial_settings"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , num_initial_settings) - 88usize] ; ["Offset of field: aws_http_connection_manager_options::max_closed_streams"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , max_closed_streams) - 96usize] ; ["Offset of field: aws_http_connection_manager_options::http2_conn_manual_window_management"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , http2_conn_manual_window_management) - 104usize] ; ["Offset of field: aws_http_connection_manager_options::proxy_options"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , proxy_options) - 112usize] ; ["Offset of field: aws_http_connection_manager_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , proxy_ev_settings) - 120usize] ; ["Offset of field: aws_http_connection_manager_options::max_connections"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , max_connections) - 128usize] ; ["Offset of field: aws_http_connection_manager_options::shutdown_complete_user_data"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , shutdown_complete_user_data) - 136usize] ; ["Offset of field: aws_http_connection_manager_options::shutdown_complete_callback"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , shutdown_complete_callback) - 144usize] ; ["Offset of field: aws_http_connection_manager_options::enable_read_back_pressure"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , enable_read_back_pressure) - 152usize] ; ["Offset of field: aws_http_connection_manager_options::max_connection_idle_in_milliseconds"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , max_connection_idle_in_milliseconds) - 160usize] ; ["Offset of field: aws_http_connection_manager_options::connection_acquisition_timeout_ms"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , connection_acquisition_timeout_ms) - 168usize] ; ["Offset of field: aws_http_connection_manager_options::max_pending_connection_acquisitions"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , max_pending_connection_acquisitions) - 176usize] ; ["Offset of field: aws_http_connection_manager_options::network_interface_names_array"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , network_interface_names_array) - 184usize] ; ["Offset of field: aws_http_connection_manager_options::num_network_interface_names"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , num_network_interface_names) - 192usize] ; } ; impl Default for aws_http_connection_manager_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 () } } } unsafe extern "C" { pub fn aws_http_connection_manager_acquire (manager : * mut aws_http_connection_manager) ; } unsafe extern "C" { pub fn aws_http_connection_manager_release (manager : * mut aws_http_connection_manager) ; } unsafe extern "C" { pub fn aws_http_connection_manager_new (allocator : * mut aws_allocator , options : * const aws_http_connection_manager_options) -> * mut aws_http_connection_manager ; } unsafe extern "C" { pub fn aws_http_connection_manager_acquire_connection (manager : * mut aws_http_connection_manager , callback : aws_http_connection_manager_on_connection_setup_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_http_connection_manager_release_connection (manager : * mut aws_http_connection_manager , connection : * mut aws_http_connection) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Fetch the current manager metrics from connection manager."] pub fn aws_http_connection_manager_fetch_metrics (manager : * const aws_http_connection_manager , out_metrics : * mut aws_http_manager_metrics) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop_group { _unused : [u8 ; 0] , } # [doc = " Invoked upon the acquisition, or failure to acquire a retry token. This function will always be invoked if and only\n if aws_retry_strategy_acquire_retry_token() returns AWS_OP_SUCCESS. It will never be invoked synchronously from\n aws_retry_strategy_acquire_retry_token(). Token will always be NULL if error_code is non-zero, and vice-versa. If\n token is non-null, it will have a reference count of 1, and you must call aws_retry_token_release() on it later. See\n the comments for aws_retry_strategy_on_retry_ready_fn for more info."] pub type aws_retry_strategy_on_retry_token_acquired_fn = :: std :: option :: Option < unsafe extern "C" fn (retry_strategy : * mut aws_retry_strategy , error_code : :: libc :: c_int , token : * mut aws_retry_token , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked after a successful call to aws_retry_strategy_schedule_retry(). This function will always be invoked if and\n only if aws_retry_strategy_schedule_retry() returns AWS_OP_SUCCESS. It will never be invoked synchronously from\n aws_retry_strategy_schedule_retry(). After attempting the operation, either call aws_retry_strategy_schedule_retry()\n with an aws_retry_error_type or call aws_retry_token_record_success() and then release the token via.\n aws_retry_token_release()."] pub type aws_retry_strategy_on_retry_ready_fn = :: std :: option :: Option < unsafe extern "C" fn (token : * mut aws_retry_token , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Optional function to supply your own generate random implementation"] pub type aws_generate_random_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) -> u64 > ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_retry_error_type { # [doc = " This is a connection level error such as a socket timeout, socket connect error, tls negotiation timeout etc...\n Typically these should never be applied for non-idempotent request types since in this scenario, it's impossible\n to know whether the operation had a side effect on the server."] AWS_RETRY_ERROR_TYPE_TRANSIENT = 0 , # [doc = " This is an error where the server explicitly told the client to back off, such as a 429 or 503 Http error."] AWS_RETRY_ERROR_TYPE_THROTTLING = 1 , # [doc = " This is a server error that isn't explicitly throttling but is considered by the client\n to be something that should be retried."] AWS_RETRY_ERROR_TYPE_SERVER_ERROR = 2 , # [doc = " Doesn't count against any budgets. This could be something like a 401 challenge in Http."] AWS_RETRY_ERROR_TYPE_CLIENT_ERROR = 3 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_retry_strategy_vtable { pub destroy : :: std :: option :: Option < unsafe extern "C" fn (retry_strategy : * mut aws_retry_strategy) > , pub acquire_token : :: std :: option :: Option < unsafe extern "C" fn (retry_strategy : * mut aws_retry_strategy , partition_id : * const aws_byte_cursor , on_acquired : aws_retry_strategy_on_retry_token_acquired_fn , user_data : * mut :: libc :: c_void , timeout_ms : u64) -> :: libc :: c_int > , pub schedule_retry : :: std :: option :: Option < unsafe extern "C" fn (token : * mut aws_retry_token , error_type : aws_retry_error_type , retry_ready : aws_retry_strategy_on_retry_ready_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > , pub record_success : :: std :: option :: Option < unsafe extern "C" fn (token : * mut aws_retry_token) -> :: libc :: c_int > , pub release_token : :: std :: option :: Option < unsafe extern "C" fn (token : * mut aws_retry_token) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_retry_strategy_vtable"] [:: std :: mem :: size_of :: < aws_retry_strategy_vtable > () - 40usize] ; ["Alignment of aws_retry_strategy_vtable"] [:: std :: mem :: align_of :: < aws_retry_strategy_vtable > () - 8usize] ; ["Offset of field: aws_retry_strategy_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , destroy) - 0usize] ; ["Offset of field: aws_retry_strategy_vtable::acquire_token"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , acquire_token) - 8usize] ; ["Offset of field: aws_retry_strategy_vtable::schedule_retry"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , schedule_retry) - 16usize] ; ["Offset of field: aws_retry_strategy_vtable::record_success"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , record_success) - 24usize] ; ["Offset of field: aws_retry_strategy_vtable::release_token"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , release_token) - 32usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_retry_strategy { pub allocator : * mut aws_allocator , pub vtable : * mut aws_retry_strategy_vtable , pub ref_count : aws_atomic_var , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_retry_strategy"] [:: std :: mem :: size_of :: < aws_retry_strategy > () - 32usize] ; ["Alignment of aws_retry_strategy"] [:: std :: mem :: align_of :: < aws_retry_strategy > () - 8usize] ; ["Offset of field: aws_retry_strategy::allocator"] [:: std :: mem :: offset_of ! (aws_retry_strategy , allocator) - 0usize] ; ["Offset of field: aws_retry_strategy::vtable"] [:: std :: mem :: offset_of ! (aws_retry_strategy , vtable) - 8usize] ; ["Offset of field: aws_retry_strategy::ref_count"] [:: std :: mem :: offset_of ! (aws_retry_strategy , ref_count) - 16usize] ; ["Offset of field: aws_retry_strategy::impl_"] [:: std :: mem :: offset_of ! (aws_retry_strategy , impl_) - 24usize] ; } ; impl Default for aws_retry_strategy { 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)] pub struct aws_retry_token { pub allocator : * mut aws_allocator , pub retry_strategy : * mut aws_retry_strategy , pub ref_count : aws_atomic_var , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_retry_token"] [:: std :: mem :: size_of :: < aws_retry_token > () - 32usize] ; ["Alignment of aws_retry_token"] [:: std :: mem :: align_of :: < aws_retry_token > () - 8usize] ; ["Offset of field: aws_retry_token::allocator"] [:: std :: mem :: offset_of ! (aws_retry_token , allocator) - 0usize] ; ["Offset of field: aws_retry_token::retry_strategy"] [:: std :: mem :: offset_of ! (aws_retry_token , retry_strategy) - 8usize] ; ["Offset of field: aws_retry_token::ref_count"] [:: std :: mem :: offset_of ! (aws_retry_token , ref_count) - 16usize] ; ["Offset of field: aws_retry_token::impl_"] [:: std :: mem :: offset_of ! (aws_retry_token , impl_) - 24usize] ; } ; impl Default for aws_retry_token { 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 (u32)] # [non_exhaustive] # [doc = " Jitter mode for exponential backoff.\n\n For a great writeup on these options see:\n https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_exponential_backoff_jitter_mode { AWS_EXPONENTIAL_BACKOFF_JITTER_DEFAULT = 0 , AWS_EXPONENTIAL_BACKOFF_JITTER_NONE = 1 , AWS_EXPONENTIAL_BACKOFF_JITTER_FULL = 2 , AWS_EXPONENTIAL_BACKOFF_JITTER_DECORRELATED = 3 , } # [doc = " Options for exponential backoff retry strategy. el_group must be set, any other option, if set to 0 will signify\n \"use defaults\""] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_exponential_backoff_retry_options { pub el_group : * mut aws_event_loop_group , pub max_retries : usize , pub backoff_scale_factor_ms : u32 , pub max_backoff_secs : u32 , # [doc = " Jitter mode to use, see comments for aws_exponential_backoff_jitter_mode.\n Default is AWS_EXPONENTIAL_BACKOFF_JITTER_DEFAULT"] pub jitter_mode : aws_exponential_backoff_jitter_mode , # [doc = " Deprecated. Use generate_random_impl instead\n By default this will be set to use aws_device_random. If you want something else, set it here."] pub generate_random : :: std :: option :: Option < unsafe extern "C" fn () -> u64 > , pub generate_random_impl : aws_generate_random_fn , # [doc = " Optional user data for the generate random generate_random_impl."] pub generate_random_user_data : * mut :: libc :: c_void , # [doc = " Optional shutdown callback that gets invoked, with appropriate user data,\n when the resources used by the retry_strategy are no longer in use."] pub shutdown_options : * const aws_shutdown_callback_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_exponential_backoff_retry_options"] [:: std :: mem :: size_of :: < aws_exponential_backoff_retry_options > () - 64usize] ; ["Alignment of aws_exponential_backoff_retry_options"] [:: std :: mem :: align_of :: < aws_exponential_backoff_retry_options > () - 8usize] ; ["Offset of field: aws_exponential_backoff_retry_options::el_group"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , el_group) - 0usize] ; ["Offset of field: aws_exponential_backoff_retry_options::max_retries"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , max_retries) - 8usize] ; ["Offset of field: aws_exponential_backoff_retry_options::backoff_scale_factor_ms"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , backoff_scale_factor_ms) - 16usize] ; ["Offset of field: aws_exponential_backoff_retry_options::max_backoff_secs"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , max_backoff_secs) - 20usize] ; ["Offset of field: aws_exponential_backoff_retry_options::jitter_mode"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , jitter_mode) - 24usize] ; ["Offset of field: aws_exponential_backoff_retry_options::generate_random"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , generate_random) - 32usize] ; ["Offset of field: aws_exponential_backoff_retry_options::generate_random_impl"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , generate_random_impl) - 40usize] ; ["Offset of field: aws_exponential_backoff_retry_options::generate_random_user_data"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , generate_random_user_data) - 48usize] ; ["Offset of field: aws_exponential_backoff_retry_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , shutdown_options) - 56usize] ; } ; impl Default for aws_exponential_backoff_retry_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)] pub struct aws_no_retry_options { # [doc = " Optional shutdown callback that gets invoked, with appropriate user data,\n when the resources used by the retry_strategy are no longer in use."] pub shutdown_options : * const aws_shutdown_callback_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_no_retry_options"] [:: std :: mem :: size_of :: < aws_no_retry_options > () - 8usize] ; ["Alignment of aws_no_retry_options"] [:: std :: mem :: align_of :: < aws_no_retry_options > () - 8usize] ; ["Offset of field: aws_no_retry_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_no_retry_options , shutdown_options) - 0usize] ; } ; impl Default for aws_no_retry_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)] pub struct aws_standard_retry_options { pub backoff_retry_options : aws_exponential_backoff_retry_options , # [doc = " capacity for partitions. Defaults to 500"] pub initial_bucket_capacity : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_standard_retry_options"] [:: std :: mem :: size_of :: < aws_standard_retry_options > () - 72usize] ; ["Alignment of aws_standard_retry_options"] [:: std :: mem :: align_of :: < aws_standard_retry_options > () - 8usize] ; ["Offset of field: aws_standard_retry_options::backoff_retry_options"] [:: std :: mem :: offset_of ! (aws_standard_retry_options , backoff_retry_options) - 0usize] ; ["Offset of field: aws_standard_retry_options::initial_bucket_capacity"] [:: std :: mem :: offset_of ! (aws_standard_retry_options , initial_bucket_capacity) - 64usize] ; } ; impl Default for aws_standard_retry_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 () } } } unsafe extern "C" { # [doc = " Acquire a reference count on retry_strategy."] pub fn aws_retry_strategy_acquire (retry_strategy : * mut aws_retry_strategy) ; } unsafe extern "C" { # [doc = " Releases a reference count on retry_strategy."] pub fn aws_retry_strategy_release (retry_strategy : * mut aws_retry_strategy) ; } unsafe extern "C" { # [doc = " Attempts to acquire a retry token for use with retries. On success, on_acquired will be invoked when a token is\n available, or an error will be returned if the timeout expires. partition_id identifies operations that should be\n grouped together. This allows for more sophisticated strategies such as AIMD and circuit breaker patterns. Pass NULL\n to use the global partition."] pub fn aws_retry_strategy_acquire_retry_token (retry_strategy : * mut aws_retry_strategy , partition_id : * const aws_byte_cursor , on_acquired : aws_retry_strategy_on_retry_token_acquired_fn , user_data : * mut :: libc :: c_void , timeout_ms : u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Schedules a retry based on the backoff and token based strategies. retry_ready is invoked when the retry is either\n ready for execution or if it has been canceled due to application shutdown.\n\n This function can return an error to reject the retry attempt if, for example, a circuit breaker has opened. If this\n occurs users should fail their calls back to their callers.\n\n error_type is used for book keeping. See the comments above for aws_retry_error_type."] pub fn aws_retry_strategy_schedule_retry (token : * mut aws_retry_token , error_type : aws_retry_error_type , retry_ready : aws_retry_strategy_on_retry_ready_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Records a successful retry. This is used for making future decisions to open up token buckets, AIMD breakers etc...\n some strategies such as exponential backoff will ignore this, but you should always call it after a successful\n operation or your system will never recover during an outage."] pub fn aws_retry_token_record_success (token : * mut aws_retry_token) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Increments reference count for token. This should be called any time you seat the token to a pointer you own."] pub fn aws_retry_token_acquire (token : * mut aws_retry_token) ; } unsafe extern "C" { # [doc = " Releases the reference count for token. This should always be invoked after either calling\n aws_retry_strategy_schedule_retry() and failing, or after calling aws_retry_token_record_success()."] pub fn aws_retry_token_release (token : * mut aws_retry_token) ; } unsafe extern "C" { # [doc = " Creates a retry strategy using exponential backoff. This strategy does not perform any bookkeeping on error types and\n success. There is no circuit breaker functionality in here. See the comments above for\n aws_exponential_backoff_retry_options."] pub fn aws_retry_strategy_new_exponential_backoff (allocator : * mut aws_allocator , config : * const aws_exponential_backoff_retry_options) -> * mut aws_retry_strategy ; } unsafe extern "C" { # [doc = " This is a retry implementation that cuts off traffic if it's\n detected that an endpoint partition is having availability\n problems. This is necessary to keep from making outages worse\n by scheduling work that's unlikely to succeed yet increases\n load on an already ailing system.\n\n We do this by creating a bucket for each partition. A partition\n is an arbitrary specifier. It can be anything: a region, a service,\n a combination of region and service, a literal dns name.... doesn't matter.\n\n Each bucket has a budget for maximum allowed retries. Different types of events\n carry different weights. Things that indicate an unhealthy partition such as\n transient errors (timeouts, unhealthy connection etc...) cost more.\n A retry for any other reason (service sending a 5xx response code) cost a bit less.\n When a retry is attempted this capacity is leased out to the retry. On success it is\n released back to the capacity pool. On failure, it remains leased.\n Operations that succeed without a retry slowly restore the capacity pool.\n\n If a partition runs out of capacity it is assumed unhealthy and retries will be blocked\n until capacity returns to the pool. To prevent a partition from staying unhealthy after\n an outage has recovered, new requests that succeed without a retry will increase the capacity\n slowly ( a new request gets a payback lease of 1, but the lease is never actually deducted from the capacity pool)."] pub fn aws_retry_strategy_new_standard (allocator : * mut aws_allocator , config : * const aws_standard_retry_options) -> * mut aws_retry_strategy ; } unsafe extern "C" { # [doc = " This retry strategy is used to disable retries. Passed config can be null.\n Calling `aws_retry_strategy_acquire_retry_token` will raise error `AWS_IO_RETRY_PERMISSION_DENIED`.\n Calling any function apart from the `aws_retry_strategy_acquire_retry_token` and `aws_retry_strategy_release` will\n result in a fatal error."] pub fn aws_retry_strategy_new_no_retry (allocator : * mut aws_allocator , config : * const aws_no_retry_options) -> * mut aws_retry_strategy ; } pub type aws_imds_client_shutdown_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " Optional callback and user data to be invoked when an imds client has fully shut down"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_imds_client_shutdown_options { pub shutdown_callback : aws_imds_client_shutdown_completed_fn , pub shutdown_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_imds_client_shutdown_options"] [:: std :: mem :: size_of :: < aws_imds_client_shutdown_options > () - 16usize] ; ["Alignment of aws_imds_client_shutdown_options"] [:: std :: mem :: align_of :: < aws_imds_client_shutdown_options > () - 8usize] ; ["Offset of field: aws_imds_client_shutdown_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_imds_client_shutdown_options , shutdown_callback) - 0usize] ; ["Offset of field: aws_imds_client_shutdown_options::shutdown_user_data"] [:: std :: mem :: offset_of ! (aws_imds_client_shutdown_options , shutdown_user_data) - 8usize] ; } ; impl Default for aws_imds_client_shutdown_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 () } } } # [doc = " Configuration options when creating an imds client"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_imds_client_options { pub shutdown_options : aws_imds_client_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub retry_strategy : * mut aws_retry_strategy , pub proxy_ev_settings : * const proxy_env_var_settings , pub imds_version : aws_imds_protocol_version , pub ec2_metadata_v1_disabled : bool , pub function_table : * mut aws_auth_http_system_vtable , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_imds_client_options"] [:: std :: mem :: size_of :: < aws_imds_client_options > () - 56usize] ; ["Alignment of aws_imds_client_options"] [:: std :: mem :: align_of :: < aws_imds_client_options > () - 8usize] ; ["Offset of field: aws_imds_client_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_imds_client_options , shutdown_options) - 0usize] ; ["Offset of field: aws_imds_client_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_imds_client_options , bootstrap) - 16usize] ; ["Offset of field: aws_imds_client_options::retry_strategy"] [:: std :: mem :: offset_of ! (aws_imds_client_options , retry_strategy) - 24usize] ; ["Offset of field: aws_imds_client_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_imds_client_options , proxy_ev_settings) - 32usize] ; ["Offset of field: aws_imds_client_options::imds_version"] [:: std :: mem :: offset_of ! (aws_imds_client_options , imds_version) - 40usize] ; ["Offset of field: aws_imds_client_options::ec2_metadata_v1_disabled"] [:: std :: mem :: offset_of ! (aws_imds_client_options , ec2_metadata_v1_disabled) - 44usize] ; ["Offset of field: aws_imds_client_options::function_table"] [:: std :: mem :: offset_of ! (aws_imds_client_options , function_table) - 48usize] ; } ; impl Default for aws_imds_client_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_imds_client_on_get_resource_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (resource : * const aws_byte_buf , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-categories.html"] # [repr (C)] pub struct aws_imds_iam_profile { pub last_updated : aws_date_time , pub instance_profile_arn : aws_byte_cursor , pub instance_profile_id : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_imds_iam_profile"] [:: std :: mem :: size_of :: < aws_imds_iam_profile > () - 168usize] ; ["Alignment of aws_imds_iam_profile"] [:: std :: mem :: align_of :: < aws_imds_iam_profile > () - 8usize] ; ["Offset of field: aws_imds_iam_profile::last_updated"] [:: std :: mem :: offset_of ! (aws_imds_iam_profile , last_updated) - 0usize] ; ["Offset of field: aws_imds_iam_profile::instance_profile_arn"] [:: std :: mem :: offset_of ! (aws_imds_iam_profile , instance_profile_arn) - 136usize] ; ["Offset of field: aws_imds_iam_profile::instance_profile_id"] [:: std :: mem :: offset_of ! (aws_imds_iam_profile , instance_profile_id) - 152usize] ; } ; impl Default for aws_imds_iam_profile { 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 = " Block of per-instance EC2-specific data\n\n https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html"] # [repr (C)] pub struct aws_imds_instance_info { pub marketplace_product_codes : aws_array_list , pub availability_zone : aws_byte_cursor , pub private_ip : aws_byte_cursor , pub version : aws_byte_cursor , pub instance_id : aws_byte_cursor , pub billing_products : aws_array_list , pub instance_type : aws_byte_cursor , pub account_id : aws_byte_cursor , pub image_id : aws_byte_cursor , pub pending_time : aws_date_time , pub architecture : aws_byte_cursor , pub kernel_id : aws_byte_cursor , pub ramdisk_id : aws_byte_cursor , pub region : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_imds_instance_info"] [:: std :: mem :: size_of :: < aws_imds_instance_info > () - 392usize] ; ["Alignment of aws_imds_instance_info"] [:: std :: mem :: align_of :: < aws_imds_instance_info > () - 8usize] ; ["Offset of field: aws_imds_instance_info::marketplace_product_codes"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , marketplace_product_codes) - 0usize] ; ["Offset of field: aws_imds_instance_info::availability_zone"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , availability_zone) - 40usize] ; ["Offset of field: aws_imds_instance_info::private_ip"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , private_ip) - 56usize] ; ["Offset of field: aws_imds_instance_info::version"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , version) - 72usize] ; ["Offset of field: aws_imds_instance_info::instance_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , instance_id) - 88usize] ; ["Offset of field: aws_imds_instance_info::billing_products"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , billing_products) - 104usize] ; ["Offset of field: aws_imds_instance_info::instance_type"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , instance_type) - 144usize] ; ["Offset of field: aws_imds_instance_info::account_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , account_id) - 160usize] ; ["Offset of field: aws_imds_instance_info::image_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , image_id) - 176usize] ; ["Offset of field: aws_imds_instance_info::pending_time"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , pending_time) - 192usize] ; ["Offset of field: aws_imds_instance_info::architecture"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , architecture) - 328usize] ; ["Offset of field: aws_imds_instance_info::kernel_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , kernel_id) - 344usize] ; ["Offset of field: aws_imds_instance_info::ramdisk_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , ramdisk_id) - 360usize] ; ["Offset of field: aws_imds_instance_info::region"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , region) - 376usize] ; } ; impl Default for aws_imds_instance_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 () } } } pub type aws_imds_client_on_get_array_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (array : * const aws_array_list , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_imds_client_on_get_credentials_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (credentials : * const aws_credentials , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_imds_client_on_get_iam_profile_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (iam_profile_info : * const aws_imds_iam_profile , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_imds_client_on_get_instance_info_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (instance_info : * const aws_imds_instance_info , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " AWS EC2 Metadata Client is used to retrieve AWS EC2 Instance Metadata info."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_imds_client { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " Creates a new imds client\n\n @param allocator memory allocator to use for creation and queries\n @param options configuration options for the imds client\n\n @return a newly-constructed imds client, or NULL on failure"] pub fn aws_imds_client_new (allocator : * mut aws_allocator , options : * const aws_imds_client_options) -> * mut aws_imds_client ; } unsafe extern "C" { # [doc = " Increments the ref count on the client\n\n @param client imds client to acquire a reference to"] pub fn aws_imds_client_acquire (client : * mut aws_imds_client) ; } unsafe extern "C" { # [doc = " Decrements the ref count on the client\n\n @param client imds client to release a reference to"] pub fn aws_imds_client_release (client : * mut aws_imds_client) ; } unsafe extern "C" { # [doc = " Queries a generic resource (string) from the ec2 instance metadata document\n\n @param client imds client to use for the query\n @param resource_path path of the resource to query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_resource_async (client : * mut aws_imds_client , resource_path : aws_byte_cursor , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the ami id of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ami_id (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the ami launch index of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ami_launch_index (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the ami manifest path of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ami_manifest_path (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the list of ancestor ami ids of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ancestor_ami_ids (client : * mut aws_imds_client , callback : aws_imds_client_on_get_array_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the instance-action of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_action (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the instance id of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_id (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the instance type of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_type (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the mac address of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_mac_address (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the private ip address of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_private_ip_address (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the availability zone of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_availability_zone (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the product codes of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_product_codes (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the public key of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_public_key (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the ramdisk id of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ramdisk_id (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the reservation id of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_reservation_id (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the list of the security groups of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_security_groups (client : * mut aws_imds_client , callback : aws_imds_client_on_get_array_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the list of block device mappings of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_block_device_mapping (client : * mut aws_imds_client , callback : aws_imds_client_on_get_array_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the attached iam role of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_attached_iam_role (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets temporary credentials based on the attached iam role of the ec2 instance\n\n @param client imds client to use for the query\n @param iam_role_name iam role name to get temporary credentials through\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_credentials (client : * mut aws_imds_client , iam_role_name : aws_byte_cursor , callback : aws_imds_client_on_get_credentials_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the iam profile information of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_iam_profile (client : * mut aws_imds_client , callback : aws_imds_client_on_get_iam_profile_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the user data of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_user_data (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the signature of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_signature (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the instance information data block of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_info (client : * mut aws_imds_client , callback : aws_imds_client_on_get_instance_info_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_hash_vtable { pub alg_name : * const :: libc :: c_char , pub provider : * const :: libc :: c_char , pub destroy : :: std :: option :: Option < unsafe extern "C" fn (hash : * mut aws_hash) > , pub update : :: std :: option :: Option < unsafe extern "C" fn (hash : * mut aws_hash , buf : * const aws_byte_cursor) -> :: libc :: c_int > , pub finalize : :: std :: option :: Option < unsafe extern "C" fn (hash : * mut aws_hash , out : * mut aws_byte_buf) -> :: libc :: c_int > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash_vtable"] [:: std :: mem :: size_of :: < aws_hash_vtable > () - 40usize] ; ["Alignment of aws_hash_vtable"] [:: std :: mem :: align_of :: < aws_hash_vtable > () - 8usize] ; ["Offset of field: aws_hash_vtable::alg_name"] [:: std :: mem :: offset_of ! (aws_hash_vtable , alg_name) - 0usize] ; ["Offset of field: aws_hash_vtable::provider"] [:: std :: mem :: offset_of ! (aws_hash_vtable , provider) - 8usize] ; ["Offset of field: aws_hash_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_hash_vtable , destroy) - 16usize] ; ["Offset of field: aws_hash_vtable::update"] [:: std :: mem :: offset_of ! (aws_hash_vtable , update) - 24usize] ; ["Offset of field: aws_hash_vtable::finalize"] [:: std :: mem :: offset_of ! (aws_hash_vtable , finalize) - 32usize] ; } ; impl Default for aws_hash_vtable { 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)] pub struct aws_hash { pub allocator : * mut aws_allocator , pub vtable : * mut aws_hash_vtable , pub digest_size : usize , pub good : bool , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash"] [:: std :: mem :: size_of :: < aws_hash > () - 40usize] ; ["Alignment of aws_hash"] [:: std :: mem :: align_of :: < aws_hash > () - 8usize] ; ["Offset of field: aws_hash::allocator"] [:: std :: mem :: offset_of ! (aws_hash , allocator) - 0usize] ; ["Offset of field: aws_hash::vtable"] [:: std :: mem :: offset_of ! (aws_hash , vtable) - 8usize] ; ["Offset of field: aws_hash::digest_size"] [:: std :: mem :: offset_of ! (aws_hash , digest_size) - 16usize] ; ["Offset of field: aws_hash::good"] [:: std :: mem :: offset_of ! (aws_hash , good) - 24usize] ; ["Offset of field: aws_hash::impl_"] [:: std :: mem :: offset_of ! (aws_hash , impl_) - 32usize] ; } ; impl Default for aws_hash { 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_hash_new_fn = :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator) -> * mut aws_hash > ; unsafe extern "C" { # [doc = " Allocates and initializes a sha512 hash instance."] pub fn aws_sha512_new (allocator : * mut aws_allocator) -> * mut aws_hash ; } unsafe extern "C" { # [doc = " Allocates and initializes a sha256 hash instance."] pub fn aws_sha256_new (allocator : * mut aws_allocator) -> * mut aws_hash ; } unsafe extern "C" { # [doc = " Allocates and initializes a sha1 hash instance."] pub fn aws_sha1_new (allocator : * mut aws_allocator) -> * mut aws_hash ; } unsafe extern "C" { # [doc = " Allocates and initializes an md5 hash instance."] pub fn aws_md5_new (allocator : * mut aws_allocator) -> * mut aws_hash ; } unsafe extern "C" { # [doc = " Cleans up and deallocates hash."] pub fn aws_hash_destroy (hash : * mut aws_hash) ; } unsafe extern "C" { # [doc = " Updates the running hash with to_hash. this can be called multiple times."] pub fn aws_hash_update (hash : * mut aws_hash , to_hash : * const aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Completes the hash computation and writes the final digest to output.\n Allocation of output is the caller's responsibility. If you specify\n truncate_to to something other than 0, the output will be truncated to that\n number of bytes. For example, if you want a SHA256 digest as the first 16\n bytes, set truncate_to to 16. If you want the full digest size, just set this\n to 0."] pub fn aws_hash_finalize (hash : * mut aws_hash , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Computes the md5 hash over input and writes the digest output to 'output'.\n Use this if you don't need to stream the data you're hashing and you can load\n the entire input to hash into memory."] pub fn aws_md5_compute (allocator : * mut aws_allocator , input : * const aws_byte_cursor , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Computes the sha512 hash over input and writes the digest output to 'output'.\n Use this if you don't need to stream the data you're hashing and you can load\n the entire input to hash into memory. If you specify truncate_to to something\n other than 0, the output will be truncated to that number of bytes. For\n example, if you want a SHA512 digest as the first 16 bytes, set truncate_to\n to 16. If you want the full digest size, just set this to 0."] pub fn aws_sha512_compute (allocator : * mut aws_allocator , input : * const aws_byte_cursor , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Computes the sha256 hash over input and writes the digest output to 'output'.\n Use this if you don't need to stream the data you're hashing and you can load\n the entire input to hash into memory. If you specify truncate_to to something\n other than 0, the output will be truncated to that number of bytes. For\n example, if you want a SHA256 digest as the first 16 bytes, set truncate_to\n to 16. If you want the full digest size, just set this to 0."] pub fn aws_sha256_compute (allocator : * mut aws_allocator , input : * const aws_byte_cursor , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Computes the sha1 hash over input and writes the digest output to 'output'.\n Use this if you don't need to stream the data you're hashing and you can load\n the entire input to hash into memory. If you specify truncate_to to something\n other than 0, the output will be truncated to that number of bytes. For\n example, if you want a SHA1 digest as the first 16 bytes, set truncate_to\n to 16. If you want the full digest size, just set this to 0."] pub fn aws_sha1_compute (allocator : * mut aws_allocator , input : * const aws_byte_cursor , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set the implementation of md5 to use. If you compiled without BYO_CRYPTO,\n you do not need to call this. However, if use this, we will honor it,\n regardless of compile options. This may be useful for testing purposes. If\n you did set BYO_CRYPTO, and you do not call this function you will\n segfault."] pub fn aws_set_md5_new_fn (fn_ : aws_hash_new_fn) ; } unsafe extern "C" { # [doc = " Set the implementation of sha512 to use. If you compiled without\n BYO_CRYPTO, you do not need to call this. However, if use this, we will\n honor it, regardless of compile options. This may be useful for testing\n purposes. If you did set BYO_CRYPTO, and you do not call this function\n you will segfault."] pub fn aws_set_sha512_new_fn (fn_ : aws_hash_new_fn) ; } unsafe extern "C" { # [doc = " Set the implementation of sha256 to use. If you compiled without\n BYO_CRYPTO, you do not need to call this. However, if use this, we will\n honor it, regardless of compile options. This may be useful for testing\n purposes. If you did set BYO_CRYPTO, and you do not call this function\n you will segfault."] pub fn aws_set_sha256_new_fn (fn_ : aws_hash_new_fn) ; } unsafe extern "C" { # [doc = " Set the implementation of sha1 to use. If you compiled without\n BYO_CRYPTO, you do not need to call this. However, if use this, we will\n honor it, regardless of compile options. This may be useful for testing\n purposes. If you did set BYO_CRYPTO, and you do not call this function\n you will segfault."] pub fn aws_set_sha1_new_fn (fn_ : aws_hash_new_fn) ; } unsafe extern "C" { # [doc = " The entry point function to perform a CRC32 (Ethernet, gzip) computation.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc32 parameter as an initial value unless continuing\n to update a running crc in a subsequent call."] pub fn aws_checksums_crc32 (input : * const u8 , length : :: libc :: c_int , previous_crc32 : u32) -> u32 ; } unsafe extern "C" { # [doc = " The entry point function to perform a CRC32 (Ethernet, gzip) computation.\n Supports buffer lengths up to size_t max.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc32 parameter as an initial value unless continuing\n to update a running crc in a subsequent call."] pub fn aws_checksums_crc32_ex (input : * const u8 , length : usize , previous_crc32 : u32) -> u32 ; } unsafe extern "C" { # [doc = " The entry point function to perform a Castagnoli CRC32c (iSCSI) computation.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc32 parameter as an initial value unless continuing\n to update a running crc in a subsequent call."] pub fn aws_checksums_crc32c (input : * const u8 , length : :: libc :: c_int , previous_crc32c : u32) -> u32 ; } unsafe extern "C" { # [doc = " The entry point function to perform a Castagnoli CRC32c (iSCSI) computation.\n Supports buffer lengths up to size_t max.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc32 parameter as an initial value unless continuing\n to update a running crc in a subsequent call."] pub fn aws_checksums_crc32c_ex (input : * const u8 , length : usize , previous_crc32c : u32) -> u32 ; } unsafe extern "C" { # [doc = " The entry point function to perform a CRC64-NVME (a.k.a. CRC64-Rocksoft) computation.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc64 parameter as an initial value unless continuing\n to update a running crc in a subsequent call.\n There are many variants of CRC64 algorithms. This CRC64 variant is bit-reflected (based on\n the non bit-reflected polynomial 0xad93d23594c93659) and inverts the CRC input and output bits."] pub fn aws_checksums_crc64nvme (input : * const u8 , length : :: libc :: c_int , previous_crc64 : u64) -> u64 ; } unsafe extern "C" { # [doc = " The entry point function to perform a CRC64-NVME (a.k.a. CRC64-Rocksoft) computation.\n Supports buffer lengths up to size_t max.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc64 parameter as an initial value unless continuing\n to update a running crc in a subsequent call.\n There are many variants of CRC64 algorithms. This CRC64 variant is bit-reflected (based on\n the non bit-reflected polynomial 0xad93d23594c93659) and inverts the CRC input and output bits."] pub fn aws_checksums_crc64nvme_ex (input : * const u8 , length : usize , previous_crc64 : u64) -> u64 ; } unsafe extern "C" { # [doc = " Combines two CRC32 (Ethernet, gzip) checksums computed over separate data blocks.\n This is equivalent to computing the CRC32 of the concatenated data blocks without\n having to re-scan the data.\n\n Given:\n   crc1 = CRC32(data_block_A)\n   crc2 = CRC32(data_block_B)\n\n This function computes:\n   result = CRC32(data_block_A || data_block_B)\n\n @param crc1 The CRC32 checksum of the first data block\n @param crc2 The CRC32 checksum of the second data block\n @param len2 The length (in bytes) of the original data that produced crc2.\n             This is NOT the size of the checksum (which is always 4 bytes),\n             but rather the size of the data block that was checksummed.\n @return The combined CRC32 checksum as if computed over the concatenated data"] pub fn aws_checksums_crc32_combine (crc1 : u32 , crc2 : u32 , len2 : u64) -> u32 ; } unsafe extern "C" { # [doc = " Combines two CRC32C (Castagnoli, iSCSI) checksums computed over separate data blocks.\n This is equivalent to computing the CRC32C of the concatenated data blocks without\n having to re-scan the data.\n\n Given:\n   crc1 = CRC32C(data_block_A)\n   crc2 = CRC32C(data_block_B)\n\n This function computes:\n   result = CRC32C(data_block_A || data_block_B)\n\n @param crc1 The CRC32C checksum of the first data block\n @param crc2 The CRC32C checksum of the second data block\n @param len2 The length (in bytes) of the original data that produced crc2.\n             This is NOT the size of the checksum (which is always 4 bytes),\n             but rather the size of the data block that was checksummed.\n @return The combined CRC32C checksum as if computed over the concatenated data"] pub fn aws_checksums_crc32c_combine (crc1 : u32 , crc2 : u32 , len2 : u64) -> u32 ; } unsafe extern "C" { # [doc = " Combines two CRC64-NVME (CRC64-Rocksoft) checksums computed over separate data blocks.\n This is equivalent to computing the CRC64-NVME of the concatenated data blocks without\n having to re-scan the data.\n\n Given:\n   crc1 = CRC64_NVME(data_block_A)\n   crc2 = CRC64_NVME(data_block_B)\n\n This function computes:\n   result = CRC64_NVME(data_block_A || data_block_B)\n\n @param crc1 The CRC64-NVME checksum of the first data block\n @param crc2 The CRC64-NVME checksum of the second data block\n @param len2 The length (in bytes) of the original data that produced crc2.\n             This is NOT the size of the checksum (which is always 8 bytes),\n             but rather the size of the data block that was checksummed.\n @return The combined CRC64-NVME checksum as if computed over the concatenated data"] pub fn aws_checksums_crc64nvme_combine (crc1 : u64 , crc2 : u64 , len2 : u64) -> u64 ; } pub type aws_log_channel_send_fn = :: std :: option :: Option < unsafe extern "C" fn (channel : * mut aws_log_channel , output : * mut aws_string) -> :: libc :: 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)] pub struct aws_log_channel_vtable { pub send : aws_log_channel_send_fn , pub clean_up : aws_log_channel_clean_up_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_channel_vtable"] [:: std :: mem :: size_of :: < aws_log_channel_vtable > () - 16usize] ; ["Alignment of aws_log_channel_vtable"] [:: std :: mem :: align_of :: < aws_log_channel_vtable > () - 8usize] ; ["Offset of field: aws_log_channel_vtable::send"] [:: std :: mem :: offset_of ! (aws_log_channel_vtable , send) - 0usize] ; ["Offset of field: aws_log_channel_vtable::clean_up"] [:: std :: mem :: offset_of ! (aws_log_channel_vtable , clean_up) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] 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 :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_channel"] [:: std :: mem :: size_of :: < aws_log_channel > () - 32usize] ; ["Alignment of aws_log_channel"] [:: std :: mem :: align_of :: < aws_log_channel > () - 8usize] ; ["Offset of field: aws_log_channel::vtable"] [:: std :: mem :: offset_of ! (aws_log_channel , vtable) - 0usize] ; ["Offset of field: aws_log_channel::allocator"] [:: std :: mem :: offset_of ! (aws_log_channel , allocator) - 8usize] ; ["Offset of field: aws_log_channel::writer"] [:: std :: mem :: offset_of ! (aws_log_channel , writer) - 16usize] ; ["Offset of field: aws_log_channel::impl_"] [:: std :: mem :: offset_of ! (aws_log_channel , impl_) - 24usize] ; } ; 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 () } } } unsafe extern "C" { pub fn aws_log_channel_init_foreground (channel : * mut aws_log_channel , allocator : * mut aws_allocator , writer : * mut aws_log_writer) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_channel_init_background (channel : * mut aws_log_channel , allocator : * mut aws_allocator , writer : * mut aws_log_writer) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_channel_clean_up (channel : * mut aws_log_channel) ; } pub type aws_log_formatter_format_fn = :: std :: option :: Option < unsafe extern "C" fn (formatter : * mut aws_log_formatter , formatted_output : * mut * mut aws_string , level : aws_log_level :: Type , subject : aws_log_subject_t , format : * const :: libc :: c_char , args : * mut __va_list_tag) -> :: libc :: 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)] pub struct aws_log_formatter_vtable { pub format : aws_log_formatter_format_fn , pub clean_up : aws_log_formatter_clean_up_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_formatter_vtable"] [:: std :: mem :: size_of :: < aws_log_formatter_vtable > () - 16usize] ; ["Alignment of aws_log_formatter_vtable"] [:: std :: mem :: align_of :: < aws_log_formatter_vtable > () - 8usize] ; ["Offset of field: aws_log_formatter_vtable::format"] [:: std :: mem :: offset_of ! (aws_log_formatter_vtable , format) - 0usize] ; ["Offset of field: aws_log_formatter_vtable::clean_up"] [:: std :: mem :: offset_of ! (aws_log_formatter_vtable , clean_up) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_log_formatter { pub vtable : * mut aws_log_formatter_vtable , pub allocator : * mut aws_allocator , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_formatter"] [:: std :: mem :: size_of :: < aws_log_formatter > () - 24usize] ; ["Alignment of aws_log_formatter"] [:: std :: mem :: align_of :: < aws_log_formatter > () - 8usize] ; ["Offset of field: aws_log_formatter::vtable"] [:: std :: mem :: offset_of ! (aws_log_formatter , vtable) - 0usize] ; ["Offset of field: aws_log_formatter::allocator"] [:: std :: mem :: offset_of ! (aws_log_formatter , allocator) - 8usize] ; ["Offset of field: aws_log_formatter::impl_"] [:: std :: mem :: offset_of ! (aws_log_formatter , impl_) - 16usize] ; } ; 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)] pub struct aws_log_formatter_standard_options { pub date_format : aws_date_format , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_formatter_standard_options"] [:: std :: mem :: size_of :: < aws_log_formatter_standard_options > () - 4usize] ; ["Alignment of aws_log_formatter_standard_options"] [:: std :: mem :: align_of :: < aws_log_formatter_standard_options > () - 4usize] ; ["Offset of field: aws_log_formatter_standard_options::date_format"] [:: std :: mem :: offset_of ! (aws_log_formatter_standard_options , date_format) - 0usize] ; } ; 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)] pub struct aws_logging_standard_formatting_data { pub log_line_buffer : * mut :: libc :: c_char , pub total_length : usize , pub level : aws_log_level :: Type , pub subject_name : * const :: libc :: c_char , pub format : * const :: libc :: c_char , pub date_format : aws_date_format , pub allocator : * mut aws_allocator , pub amount_written : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logging_standard_formatting_data"] [:: std :: mem :: size_of :: < aws_logging_standard_formatting_data > () - 64usize] ; ["Alignment of aws_logging_standard_formatting_data"] [:: std :: mem :: align_of :: < aws_logging_standard_formatting_data > () - 8usize] ; ["Offset of field: aws_logging_standard_formatting_data::log_line_buffer"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , log_line_buffer) - 0usize] ; ["Offset of field: aws_logging_standard_formatting_data::total_length"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , total_length) - 8usize] ; ["Offset of field: aws_logging_standard_formatting_data::level"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , level) - 16usize] ; ["Offset of field: aws_logging_standard_formatting_data::subject_name"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , subject_name) - 24usize] ; ["Offset of field: aws_logging_standard_formatting_data::format"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , format) - 32usize] ; ["Offset of field: aws_logging_standard_formatting_data::date_format"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , date_format) - 40usize] ; ["Offset of field: aws_logging_standard_formatting_data::allocator"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , allocator) - 48usize] ; ["Offset of field: aws_logging_standard_formatting_data::amount_written"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , amount_written) - 56usize] ; } ; 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 () } } } unsafe 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) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_formatter_clean_up (formatter : * mut aws_log_formatter) ; } unsafe extern "C" { pub fn aws_format_standard_log_line (formatting_data : * mut aws_logging_standard_formatting_data , args : * mut __va_list_tag) -> :: libc :: 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) -> :: libc :: 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)] pub struct aws_log_writer_vtable { pub write : aws_log_writer_write_fn , pub clean_up : aws_log_writer_clean_up_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_writer_vtable"] [:: std :: mem :: size_of :: < aws_log_writer_vtable > () - 16usize] ; ["Alignment of aws_log_writer_vtable"] [:: std :: mem :: align_of :: < aws_log_writer_vtable > () - 8usize] ; ["Offset of field: aws_log_writer_vtable::write"] [:: std :: mem :: offset_of ! (aws_log_writer_vtable , write) - 0usize] ; ["Offset of field: aws_log_writer_vtable::clean_up"] [:: std :: mem :: offset_of ! (aws_log_writer_vtable , clean_up) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_log_writer { pub vtable : * mut aws_log_writer_vtable , pub allocator : * mut aws_allocator , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_writer"] [:: std :: mem :: size_of :: < aws_log_writer > () - 24usize] ; ["Alignment of aws_log_writer"] [:: std :: mem :: align_of :: < aws_log_writer > () - 8usize] ; ["Offset of field: aws_log_writer::vtable"] [:: std :: mem :: offset_of ! (aws_log_writer , vtable) - 0usize] ; ["Offset of field: aws_log_writer::allocator"] [:: std :: mem :: offset_of ! (aws_log_writer , allocator) - 8usize] ; ["Offset of field: aws_log_writer::impl_"] [:: std :: mem :: offset_of ! (aws_log_writer , impl_) - 16usize] ; } ; 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)] pub struct aws_log_writer_file_options { pub filename : * const :: libc :: c_char , pub file : * mut FILE , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_writer_file_options"] [:: std :: mem :: size_of :: < aws_log_writer_file_options > () - 16usize] ; ["Alignment of aws_log_writer_file_options"] [:: std :: mem :: align_of :: < aws_log_writer_file_options > () - 8usize] ; ["Offset of field: aws_log_writer_file_options::filename"] [:: std :: mem :: offset_of ! (aws_log_writer_file_options , filename) - 0usize] ; ["Offset of field: aws_log_writer_file_options::file"] [:: std :: mem :: offset_of ! (aws_log_writer_file_options , file) - 8usize] ; } ; 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 () } } } unsafe extern "C" { pub fn aws_log_writer_init_stdout (writer : * mut aws_log_writer , allocator : * mut aws_allocator) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_writer_init_stderr (writer : * mut aws_log_writer , allocator : * mut aws_allocator) -> :: libc :: c_int ; } unsafe 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) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_writer_clean_up (writer : * mut aws_log_writer) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_socket_endpoint { _unused : [u8 ; 0] , } # [doc = " Invoked when connect completes.\n\n If unsuccessful, error_code will be set, connection will be NULL,\n and the on_shutdown callback will never be invoked.\n\n If successful, error_code will be 0 and connection will be valid.\n The user is now responsible for the connection and must\n call aws_http_connection_release() when they are done with it.\n\n The connection uses one event-loop thread to do all its work.\n The thread invoking this callback will be the same thread that invokes all\n future callbacks for this connection and its streams."] pub type aws_http_on_client_connection_setup_fn = :: std :: option :: Option < unsafe extern "C" fn (connection : * mut aws_http_connection , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when the connection has finished shutting down.\n Never invoked if on_setup failed.\n This is always invoked on connection's event-loop thread.\n Note that the connection is not completely done until on_shutdown has been invoked\n AND aws_http_connection_release() has been called."] pub type aws_http_on_client_connection_shutdown_fn = :: std :: option :: Option < unsafe extern "C" fn (connection : * mut aws_http_connection , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when the HTTP/2 settings change is complete.\n If connection setup successfully this will always be invoked whether settings change successfully or unsuccessfully.\n If error_code is AWS_ERROR_SUCCESS (0), then the peer has acknowledged the settings and the change has been applied.\n If error_code is non-zero, then a connection error occurred before the settings could be fully acknowledged and\n applied. This is always invoked on the connection's event-loop thread."] pub type aws_http2_on_change_settings_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (http2_connection : * mut aws_http_connection , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when the HTTP/2 PING completes, whether peer has acknowledged it or not.\n If error_code is AWS_ERROR_SUCCESS (0), then the peer has acknowledged the PING and round_trip_time_ns will be the\n round trip time in nano seconds for the connection.\n If error_code is non-zero, then a connection error occurred before the PING get acknowledgment and round_trip_time_ns\n will be useless in this case."] pub type aws_http2_on_ping_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (http2_connection : * mut aws_http_connection , round_trip_time_ns : u64 , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when an HTTP/2 GOAWAY frame is received from peer.\n Implies that the peer has initiated shutdown, or encountered a serious error.\n Once a GOAWAY is received, no further streams may be created on this connection.\n\n @param http2_connection This HTTP/2 connection.\n @param last_stream_id ID of the last locally-initiated stream that peer will\n      process. Any locally-initiated streams with a higher ID are ignored by\n      peer, and are safe to retry on another connection.\n @param http2_error_code The HTTP/2 error code (RFC-7540 section 7) sent by peer.\n      `enum aws_http2_error_code` lists official codes.\n @param debug_data The debug data sent by peer. It can be empty. (NOTE: this data is only valid for the lifetime of\n      the callback. Make a deep copy if you wish to keep it longer.)\n @param user_data User-data passed to the callback."] pub type aws_http2_on_goaway_received_fn = :: std :: option :: Option < unsafe extern "C" fn (http2_connection : * mut aws_http_connection , last_stream_id : u32 , http2_error_code : u32 , debug_data : aws_byte_cursor , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when new HTTP/2 settings from peer have been applied.\n Settings_array is the array of aws_http2_settings that contains all the settings we just changed in the order we\n applied (the order settings arrived). Num_settings is the number of elements in that array."] pub type aws_http2_on_remote_settings_change_fn = :: std :: option :: Option < unsafe extern "C" fn (http2_connection : * mut aws_http_connection , settings_array : * const aws_http2_setting , num_settings : usize , user_data : * mut :: libc :: c_void) > ; # [doc = " Callback invoked on each statistics sample.\n\n connection_nonce is unique to each connection for disambiguation of each callback per connection."] pub type aws_http_statistics_observer_fn = :: std :: option :: Option < unsafe extern "C" fn (connection_nonce : usize , stats_list : * const aws_array_list , user_data : * mut :: libc :: c_void) > ; # [doc = " Configuration options for connection monitoring"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_connection_monitoring_options { # [doc = " minimum required throughput of the connection.  Throughput is only measured against the interval of time where\n there is actual io to perform.  Read and write throughput are measured and checked independently of one another."] pub minimum_throughput_bytes_per_second : u64 , pub allowable_throughput_failure_interval_seconds : u32 , # [doc = " invoked on each statistics publish by the underlying IO channel. Install this callback to receive the statistics\n for observation. This field is optional."] pub statistics_observer_fn : aws_http_statistics_observer_fn , # [doc = " user_data to be passed to statistics_observer_fn."] pub statistics_observer_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_connection_monitoring_options"] [:: std :: mem :: size_of :: < aws_http_connection_monitoring_options > () - 32usize] ; ["Alignment of aws_http_connection_monitoring_options"] [:: std :: mem :: align_of :: < aws_http_connection_monitoring_options > () - 8usize] ; ["Offset of field: aws_http_connection_monitoring_options::minimum_throughput_bytes_per_second"] [:: std :: mem :: offset_of ! (aws_http_connection_monitoring_options , minimum_throughput_bytes_per_second) - 0usize] ; ["Offset of field: aws_http_connection_monitoring_options::allowable_throughput_failure_interval_seconds"] [:: std :: mem :: offset_of ! (aws_http_connection_monitoring_options , allowable_throughput_failure_interval_seconds) - 8usize] ; ["Offset of field: aws_http_connection_monitoring_options::statistics_observer_fn"] [:: std :: mem :: offset_of ! (aws_http_connection_monitoring_options , statistics_observer_fn) - 16usize] ; ["Offset of field: aws_http_connection_monitoring_options::statistics_observer_user_data"] [:: std :: mem :: offset_of ! (aws_http_connection_monitoring_options , statistics_observer_user_data) - 24usize] ; } ; impl Default for aws_http_connection_monitoring_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 () } } } # [doc = " Options specific to HTTP/1.x connections."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http1_connection_options { # [doc = " Optional\n Capacity in bytes of the HTTP/1 connection's read buffer.\n The buffer grows if the flow-control window of the incoming HTTP-stream\n reaches zero. If the buffer reaches capacity, no further socket data is\n read until the HTTP-stream's window opens again, allowing data to resume flowing.\n\n Ignored if `manual_window_management` is false.\n If zero is specified (the default) then a default capacity is chosen.\n A capacity that is too small may hinder throughput.\n A capacity that is too big may waste memory without helping throughput."] pub read_buffer_capacity : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http1_connection_options"] [:: std :: mem :: size_of :: < aws_http1_connection_options > () - 8usize] ; ["Alignment of aws_http1_connection_options"] [:: std :: mem :: align_of :: < aws_http1_connection_options > () - 8usize] ; ["Offset of field: aws_http1_connection_options::read_buffer_capacity"] [:: std :: mem :: offset_of ! (aws_http1_connection_options , read_buffer_capacity) - 0usize] ; } ; # [doc = " Options specific to HTTP/2 connections."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http2_connection_options { # [doc = " Optional\n The data of settings to change for initial settings.\n Note: each setting has its boundary. If settings_array is not set, num_settings has to be 0 to send an empty\n SETTINGS frame."] pub initial_settings_array : * mut aws_http2_setting , # [doc = " Required\n The num of settings to change (Length of the initial_settings_array)."] pub num_initial_settings : usize , # [doc = " Optional.\n Invoked when the HTTP/2 initial settings change is complete.\n If failed to setup the connection, this will not be invoked.\n Otherwise, this will be invoked, whether settings change successfully or unsuccessfully.\n See `aws_http2_on_change_settings_complete_fn`."] pub on_initial_settings_completed : aws_http2_on_change_settings_complete_fn , # [doc = " Optional\n The max number of recently-closed streams to remember.\n Set it to zero to use the default setting, AWS_HTTP2_DEFAULT_MAX_CLOSED_STREAMS\n\n If the connection receives a frame for a closed stream,\n the frame will be ignored or cause a connection error,\n depending on the frame type and how the stream was closed.\n Remembering more streams reduces the chances that a late frame causes\n a connection error, but costs some memory."] pub max_closed_streams : usize , # [doc = " Optional.\n Invoked when a valid GOAWAY frame received.\n See `aws_http2_on_goaway_received_fn`."] pub on_goaway_received : aws_http2_on_goaway_received_fn , # [doc = " Optional.\n Invoked when new settings from peer have been applied.\n See `aws_http2_on_remote_settings_change_fn`."] pub on_remote_settings_change : aws_http2_on_remote_settings_change_fn , # [doc = " Optional.\n Set to true to manually manage the flow-control window of whole HTTP/2 connection.\n\n If false, the connection will maintain its flow-control windows such that\n no back-pressure is applied and data arrives as fast as possible.\n\n If true, the flow-control window of the whole connection will shrink as body data\n is received (headers, padding, and other metadata do not affect the window) for every streams\n created on this connection.\n The initial connection flow-control window is 65,535.\n Once the connection's flow-control window reaches to 0, all the streams on the connection stop receiving any\n further data.\n The user must call aws_http2_connection_update_window() to increment the connection's\n window and keep data flowing.\n Note: the padding of data frame counts to the flow-control window.\n But, the client will always automatically update the window for padding even for manual window update."] pub conn_manual_window_management : bool , # [doc = " Optional.\n The threshold to send out a window update frame for the connection.\n Ignored if `conn_manual_window_management` is false.\n When the window_size_self for the connection is larger than the threshold,\n client will batch the window update and not send it out until the window_size_self\n drops below the threshold.\n Default to half of the initial connection flow-control window size, which is 32767."] pub conn_window_size_threshold_to_send_update : u32 , # [doc = " Optional.\n The threshold to send out a window update frame for the streams.\n Ignored if `manual_window_management` is false.\n When the window_size_self for the stream is larger than the threshold,\n client will batch the window update and not send it out until the window_size_self\n drops below the threshold.\n Default to half of the `initial_window_size`."] pub stream_window_size_threshold_to_send_update : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http2_connection_options"] [:: std :: mem :: size_of :: < aws_http2_connection_options > () - 64usize] ; ["Alignment of aws_http2_connection_options"] [:: std :: mem :: align_of :: < aws_http2_connection_options > () - 8usize] ; ["Offset of field: aws_http2_connection_options::initial_settings_array"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , initial_settings_array) - 0usize] ; ["Offset of field: aws_http2_connection_options::num_initial_settings"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , num_initial_settings) - 8usize] ; ["Offset of field: aws_http2_connection_options::on_initial_settings_completed"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , on_initial_settings_completed) - 16usize] ; ["Offset of field: aws_http2_connection_options::max_closed_streams"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , max_closed_streams) - 24usize] ; ["Offset of field: aws_http2_connection_options::on_goaway_received"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , on_goaway_received) - 32usize] ; ["Offset of field: aws_http2_connection_options::on_remote_settings_change"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , on_remote_settings_change) - 40usize] ; ["Offset of field: aws_http2_connection_options::conn_manual_window_management"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , conn_manual_window_management) - 48usize] ; ["Offset of field: aws_http2_connection_options::conn_window_size_threshold_to_send_update"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , conn_window_size_threshold_to_send_update) - 52usize] ; ["Offset of field: aws_http2_connection_options::stream_window_size_threshold_to_send_update"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , stream_window_size_threshold_to_send_update) - 56usize] ; } ; impl Default for aws_http2_connection_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 () } } } # [doc = " Options for creating an HTTP client connection.\n Initialize with AWS_HTTP_CLIENT_CONNECTION_OPTIONS_INIT to set default values."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_client_connection_options { # [doc = " The sizeof() this struct, used for versioning.\n Set by AWS_HTTP_CLIENT_CONNECTION_OPTIONS_INIT."] pub self_size : usize , # [doc = " Required.\n Must outlive the connection."] pub allocator : * mut aws_allocator , # [doc = " Required.\n The connection keeps the bootstrap alive via ref-counting."] pub bootstrap : * mut aws_client_bootstrap , # [doc = " Required.\n aws_http_client_connect() makes a copy."] pub host_name : aws_byte_cursor , # [doc = " Required."] pub port : u32 , # [doc = " Required.\n aws_http_client_connect() makes a copy."] pub socket_options : * const aws_socket_options , # [doc = " Optional.\n aws_http_client_connect() deep-copies all contents,\n and keeps `aws_tls_ctx` alive via ref-counting."] pub tls_options : * const aws_tls_connection_options , # [doc = " Optional\n Configuration options related to http proxy usage.\n Relevant fields are copied internally."] pub proxy_options : * const aws_http_proxy_options , pub proxy_ev_settings : * const proxy_env_var_settings , # [doc = " Optional\n Configuration options related to connection health monitoring"] pub monitoring_options : * const aws_http_connection_monitoring_options , # [doc = " Optional (ignored if 0).\n After a request is fully sent, if the server does not begin responding within N milliseconds,\n then fail with AWS_ERROR_HTTP_RESPONSE_FIRST_BYTE_TIMEOUT.\n This can be overridden per-request by aws_http_make_request_options.response_first_byte_timeout_ms.\n TODO: Only supported in HTTP/1.1 now, support it in HTTP/2"] pub response_first_byte_timeout_ms : u64 , # [doc = " Set to true to manually manage the flow-control window of each stream.\n\n If false, the connection will maintain its flow-control windows such that\n no back-pressure is applied and data arrives as fast as possible.\n\n If true, the flow-control window of each stream will shrink as body data\n is received (headers, padding, and other metadata do not affect the window).\n `initial_window_size` determines the starting size of each stream's window.\n\n If a stream's flow-control window reaches 0, no further data will be received. The user must call\n aws_http_stream_update_window() to increment the stream's window and keep data flowing.\n\n If a HTTP/2 connection created, it will ONLY control the stream window management.\n Connection window management is controlled by `conn_manual_window_management`.\n `stream_window_size_threshold_to_send_update` controls when to send the WINDOW_UPDATE frame for the stream.\n Note: the padding of data frame counts to the flow-control window. But, the client will always automatically\n update the window for padding even for manual window update."] pub manual_window_management : bool , # [doc = " The starting size of each HTTP stream's flow-control window.\n Required if `manual_window_management` is true,\n ignored if `manual_window_management` is false.\n\n For HTTP/2 connection, this value will end up being one of the initial settings for the connection,\n `AWS_HTTP2_SETTINGS_INITIAL_WINDOW_SIZE`.\n The corresponding settings from `initial_settings_array` will override this value.\n Notes:\n  - the setting value has the limitation of 2^31-1, otherwise the connection will be failed to be established with\n      AWS_ERROR_INVALID_ARGUMENT.\n  - when this set to 0, the initial window size will be set to 0, when `manual_window_management` is true."] pub initial_window_size : usize , # [doc = " User data for callbacks\n Optional."] pub user_data : * mut :: libc :: c_void , # [doc = " Invoked when connect completes.\n Required.\n See `aws_http_on_client_connection_setup_fn`."] pub on_setup : aws_http_on_client_connection_setup_fn , # [doc = " Invoked when the connection has finished shutting down.\n Never invoked if setup failed.\n Optional.\n See `aws_http_on_client_connection_shutdown_fn`."] pub on_shutdown : aws_http_on_client_connection_shutdown_fn , # [doc = " Optional.\n When true, use prior knowledge to set up an HTTP/2 connection on a cleartext\n connection.\n When TLS is set and this is true, the connection will failed to be established,\n as prior knowledge only works for cleartext TLS.\n Refer to RFC7540 3.4"] pub prior_knowledge_http2 : bool , # [doc = " Optional.\n Pointer to the hash map containing the ALPN string to protocol to use.\n Hash from `struct aws_string *` to `enum aws_http_version`.\n If not set, only the predefined string `h2` and `http/1.1` will be recognized. Other negotiated ALPN string will\n result in a HTTP1/1 connection\n Note: Connection will keep a deep copy of the table and the strings."] pub alpn_string_map : * mut aws_hash_table , # [doc = " Options specific to HTTP/1.x connections.\n Optional.\n Ignored if connection is not HTTP/1.x.\n If connection is HTTP/1.x and options were not specified, default values are used."] pub http1_options : * const aws_http1_connection_options , # [doc = " Options specific to HTTP/2 connections.\n Optional.\n Ignored if connection is not HTTP/2.\n If connection is HTTP/2 and options were not specified, default values are used."] pub http2_options : * const aws_http2_connection_options , # [doc = " Optional.\n Requests the channel/connection be bound to a specific event loop rather than chosen sequentially from the\n event loop group associated with the client bootstrap."] pub requested_event_loop : * mut aws_event_loop , # [doc = " Optional\n Host resolution override that allows the user to override DNS behavior for this particular connection."] pub host_resolution_config : * const aws_host_resolution_config , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_client_connection_options"] [:: std :: mem :: size_of :: < aws_http_client_connection_options > () - 184usize] ; ["Alignment of aws_http_client_connection_options"] [:: std :: mem :: align_of :: < aws_http_client_connection_options > () - 8usize] ; ["Offset of field: aws_http_client_connection_options::self_size"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , self_size) - 0usize] ; ["Offset of field: aws_http_client_connection_options::allocator"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , allocator) - 8usize] ; ["Offset of field: aws_http_client_connection_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , bootstrap) - 16usize] ; ["Offset of field: aws_http_client_connection_options::host_name"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , host_name) - 24usize] ; ["Offset of field: aws_http_client_connection_options::port"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , port) - 40usize] ; ["Offset of field: aws_http_client_connection_options::socket_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , socket_options) - 48usize] ; ["Offset of field: aws_http_client_connection_options::tls_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , tls_options) - 56usize] ; ["Offset of field: aws_http_client_connection_options::proxy_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , proxy_options) - 64usize] ; ["Offset of field: aws_http_client_connection_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , proxy_ev_settings) - 72usize] ; ["Offset of field: aws_http_client_connection_options::monitoring_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , monitoring_options) - 80usize] ; ["Offset of field: aws_http_client_connection_options::response_first_byte_timeout_ms"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , response_first_byte_timeout_ms) - 88usize] ; ["Offset of field: aws_http_client_connection_options::manual_window_management"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , manual_window_management) - 96usize] ; ["Offset of field: aws_http_client_connection_options::initial_window_size"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , initial_window_size) - 104usize] ; ["Offset of field: aws_http_client_connection_options::user_data"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , user_data) - 112usize] ; ["Offset of field: aws_http_client_connection_options::on_setup"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , on_setup) - 120usize] ; ["Offset of field: aws_http_client_connection_options::on_shutdown"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , on_shutdown) - 128usize] ; ["Offset of field: aws_http_client_connection_options::prior_knowledge_http2"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , prior_knowledge_http2) - 136usize] ; ["Offset of field: aws_http_client_connection_options::alpn_string_map"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , alpn_string_map) - 144usize] ; ["Offset of field: aws_http_client_connection_options::http1_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , http1_options) - 152usize] ; ["Offset of field: aws_http_client_connection_options::http2_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , http2_options) - 160usize] ; ["Offset of field: aws_http_client_connection_options::requested_event_loop"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , requested_event_loop) - 168usize] ; ["Offset of field: aws_http_client_connection_options::host_resolution_config"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , host_resolution_config) - 176usize] ; } ; impl Default for aws_http_client_connection_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 () } } } impl aws_http2_settings_id { pub const AWS_HTTP2_SETTINGS_HEADER_TABLE_SIZE : aws_http2_settings_id = aws_http2_settings_id :: AWS_HTTP2_SETTINGS_BEGIN_RANGE ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http2_settings_id { AWS_HTTP2_SETTINGS_BEGIN_RANGE = 1 , AWS_HTTP2_SETTINGS_ENABLE_PUSH = 2 , AWS_HTTP2_SETTINGS_MAX_CONCURRENT_STREAMS = 3 , AWS_HTTP2_SETTINGS_INITIAL_WINDOW_SIZE = 4 , AWS_HTTP2_SETTINGS_MAX_FRAME_SIZE = 5 , AWS_HTTP2_SETTINGS_MAX_HEADER_LIST_SIZE = 6 , AWS_HTTP2_SETTINGS_END_RANGE = 7 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http2_setting { pub id : aws_http2_settings_id , pub value : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http2_setting"] [:: std :: mem :: size_of :: < aws_http2_setting > () - 8usize] ; ["Alignment of aws_http2_setting"] [:: std :: mem :: align_of :: < aws_http2_setting > () - 4usize] ; ["Offset of field: aws_http2_setting::id"] [:: std :: mem :: offset_of ! (aws_http2_setting , id) - 0usize] ; ["Offset of field: aws_http2_setting::value"] [:: std :: mem :: offset_of ! (aws_http2_setting , value) - 4usize] ; } ; impl Default for aws_http2_setting { 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 () } } } unsafe extern "C" { # [doc = " Asynchronously establish a client connection.\n The on_setup callback is invoked when the operation has created a connection or failed."] pub fn aws_http_client_connect (options : * const aws_http_client_connection_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Users must release the connection when they are done with it.\n The connection's memory cannot be reclaimed until this is done.\n If the connection was not already shutting down, it will be shut down.\n\n Users should always wait for the on_shutdown() callback to be called before releasing any data passed to the\n http_connection (Eg aws_tls_connection_options, aws_socket_options) otherwise there will be race conditions between\n http_connection shutdown tasks and memory release tasks, causing Segfaults."] pub fn aws_http_connection_release (connection : * mut aws_http_connection) ; } unsafe extern "C" { # [doc = " Begin shutdown sequence of the connection if it hasn't already started. This will schedule shutdown tasks on the\n EventLoop that may send HTTP/TLS/TCP shutdown messages to peers if necessary, and will eventually cause internal\n connection memory to stop being accessed and on_shutdown() callback to be called.\n\n It's safe to call this function regardless of the connection state as long as you hold a reference to the connection."] pub fn aws_http_connection_close (connection : * mut aws_http_connection) ; } unsafe extern "C" { # [doc = " Stop accepting new requests for the connection. It will NOT start the shutdown process for the connection. The\n requests that are already open can still wait to be completed, but new requests will fail to be created,"] pub fn aws_http_connection_stop_new_requests (connection : * mut aws_http_connection) ; } unsafe extern "C" { # [doc = " Returns true unless the connection is closed or closing."] pub fn aws_http_connection_is_open (connection : * const aws_http_connection) -> bool ; } unsafe extern "C" { # [doc = " Return whether the connection can make a new requests.\n If false, then a new connection must be established to make further requests."] pub fn aws_http_connection_new_requests_allowed (connection : * const aws_http_connection) -> bool ; } unsafe extern "C" { # [doc = " Returns true if this is a client connection."] pub fn aws_http_connection_is_client (connection : * const aws_http_connection) -> bool ; } unsafe extern "C" { pub fn aws_http_connection_get_version (connection : * const aws_http_connection) -> aws_http_version ; } unsafe extern "C" { # [doc = " Returns the channel hosting the HTTP connection.\n Do not expose this function to language bindings."] pub fn aws_http_connection_get_channel (connection : * mut aws_http_connection) -> * mut aws_channel ; } unsafe extern "C" { # [doc = " Returns the remote endpoint of the HTTP connection."] pub fn aws_http_connection_get_remote_endpoint (connection : * const aws_http_connection) -> * const aws_socket_endpoint ; } unsafe extern "C" { # [doc = " Initialize an map copied from the *src map, which maps `struct aws_string *` to `enum aws_http_version`."] pub fn aws_http_alpn_map_init_copy (allocator : * mut aws_allocator , dest : * mut aws_hash_table , src : * mut aws_hash_table) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initialize an empty hash-table that maps `struct aws_string *` to `enum aws_http_version`.\n This map can used in aws_http_client_connections_options.alpn_string_map."] pub fn aws_http_alpn_map_init (allocator : * mut aws_allocator , map : * mut aws_hash_table) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Checks http proxy options for correctness"] pub fn aws_http_options_validate_proxy_configuration (options : * const aws_http_client_connection_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Send a SETTINGS frame (HTTP/2 only).\n SETTINGS will be applied locally when SETTINGS ACK is received from peer.\n\n @param http2_connection HTTP/2 connection.\n @param settings_array The array of settings to change. Note: each setting has its boundary.\n @param num_settings The num of settings to change in settings_array.\n @param on_completed Optional callback, see `aws_http2_on_change_settings_complete_fn`.\n @param user_data User-data pass to on_completed callback."] pub fn aws_http2_connection_change_settings (http2_connection : * mut aws_http_connection , settings_array : * const aws_http2_setting , num_settings : usize , on_completed : aws_http2_on_change_settings_complete_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Send a PING frame (HTTP/2 only).\n Round-trip-time is calculated when PING ACK is received from peer.\n\n @param http2_connection HTTP/2 connection.\n @param optional_opaque_data Optional payload for PING frame.\n      Must be NULL, or exactly 8 bytes (AWS_HTTP2_PING_DATA_SIZE).\n      If NULL, the 8 byte payload will be all zeroes.\n @param on_completed Optional callback, invoked when PING ACK is received from peer,\n      or when a connection error prevents the PING ACK from being received.\n      Callback always fires on the connection's event-loop thread.\n @param user_data User-data pass to on_completed callback."] pub fn aws_http2_connection_ping (http2_connection : * mut aws_http_connection , optional_opaque_data : * const aws_byte_cursor , on_completed : aws_http2_on_ping_complete_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the local settings we are using to affect the decoding.\n\n @param http2_connection HTTP/2 connection.\n @param out_settings fixed size array of aws_http2_setting gets set to the local settings"] pub fn aws_http2_connection_get_local_settings (http2_connection : * const aws_http_connection , out_settings : * mut aws_http2_setting) ; } unsafe extern "C" { # [doc = " Get the settings received from remote peer, which we are using to restricts the message to send.\n\n @param http2_connection HTTP/2 connection.\n @param out_settings fixed size array of aws_http2_setting gets set to the remote settings"] pub fn aws_http2_connection_get_remote_settings (http2_connection : * const aws_http_connection , out_settings : * mut aws_http2_setting) ; } unsafe extern "C" { # [doc = " Send a custom GOAWAY frame (HTTP/2 only).\n\n Note that the connection automatically attempts to send a GOAWAY during\n shutdown (unless a GOAWAY with a valid Last-Stream-ID has already been sent).\n\n This call can be used to gracefully warn the peer of an impending shutdown\n (http2_error=0, allow_more_streams=true), or to customize the final GOAWAY\n frame that is sent by this connection.\n\n The other end may not receive the goaway, if the connection already closed.\n\n @param http2_connection HTTP/2 connection.\n @param http2_error The HTTP/2 error code (RFC-7540 section 7) to send.\n      `enum aws_http2_error_code` lists official codes.\n @param allow_more_streams If true, new peer-initiated streams will continue\n      to be acknowledged and the GOAWAY's Last-Stream-ID will be set to a max value.\n      If false, new peer-initiated streams will be ignored and the GOAWAY's\n      Last-Stream-ID will be set to the latest acknowledged stream.\n @param optional_debug_data Optional debug data to send. Size must not exceed 16KB."] pub fn aws_http2_connection_send_goaway (http2_connection : * mut aws_http_connection , http2_error : u32 , allow_more_streams : bool , optional_debug_data : * const aws_byte_cursor) ; } unsafe extern "C" { # [doc = " Get data about the latest GOAWAY frame sent to peer (HTTP/2 only).\n If no GOAWAY has been sent, AWS_ERROR_HTTP_DATA_NOT_AVAILABLE will be raised.\n Note that GOAWAY frames are typically sent automatically by the connection\n during shutdown.\n\n @param http2_connection HTTP/2 connection.\n @param out_http2_error Gets set to HTTP/2 error code sent in most recent GOAWAY.\n @param out_last_stream_id Gets set to Last-Stream-ID sent in most recent GOAWAY."] pub fn aws_http2_connection_get_sent_goaway (http2_connection : * mut aws_http_connection , out_http2_error : * mut u32 , out_last_stream_id : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get data about the latest GOAWAY frame received from peer (HTTP/2 only).\n If no GOAWAY has been received, or the GOAWAY payload is still in transmitting,\n AWS_ERROR_HTTP_DATA_NOT_AVAILABLE will be raised.\n\n @param http2_connection HTTP/2 connection.\n @param out_http2_error Gets set to HTTP/2 error code received in most recent GOAWAY.\n @param out_last_stream_id Gets set to Last-Stream-ID received in most recent GOAWAY."] pub fn aws_http2_connection_get_received_goaway (http2_connection : * mut aws_http_connection , out_http2_error : * mut u32 , out_last_stream_id : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Increment the connection's flow-control window to keep data flowing (HTTP/2 only).\n\n If the connection was created with `conn_manual_window_management` set true,\n the flow-control window of the connection will shrink as body data is received for all the streams created on it.\n (headers, padding, and other metadata do not affect the window).\n The initial connection flow-control window is 65,535.\n Once the connection's flow-control window reaches to 0, all the streams on the connection stop receiving any further\n data.\n\n If `conn_manual_window_management` is false, this call will have no effect.\n The connection maintains its flow-control windows such that\n no back-pressure is applied and data arrives as fast as possible.\n\n If you are not connected, this call will have no effect.\n\n Crashes when the connection is not http2 connection.\n The limit of the Maximum Size is 2**31 - 1.\n And client will make sure the WINDOW_UPDATE frame to be valid.\n\n The client control exactly when the WINDOW_UPDATE frame sent.\n Check `conn_window_size_threshold_to_send_update` for details.\n\n @param http2_connection HTTP/2 connection.\n @param increment_size The size to increment for the connection's flow control window"] pub fn aws_http2_connection_update_window (http2_connection : * mut aws_http_connection , increment_size : u32) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_async_input_stream { pub vtable : * const aws_async_input_stream_vtable , pub alloc : * mut aws_allocator , pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_async_input_stream"] [:: std :: mem :: size_of :: < aws_async_input_stream > () - 48usize] ; ["Alignment of aws_async_input_stream"] [:: std :: mem :: align_of :: < aws_async_input_stream > () - 8usize] ; ["Offset of field: aws_async_input_stream::vtable"] [:: std :: mem :: offset_of ! (aws_async_input_stream , vtable) - 0usize] ; ["Offset of field: aws_async_input_stream::alloc"] [:: std :: mem :: offset_of ! (aws_async_input_stream , alloc) - 8usize] ; ["Offset of field: aws_async_input_stream::ref_count"] [:: std :: mem :: offset_of ! (aws_async_input_stream , ref_count) - 16usize] ; ["Offset of field: aws_async_input_stream::impl_"] [:: std :: mem :: offset_of ! (aws_async_input_stream , impl_) - 40usize] ; } ; impl Default for aws_async_input_stream { 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)] pub struct aws_async_input_stream_vtable { # [doc = " Destroy the stream, its refcount has reached 0."] pub destroy : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_async_input_stream) > , # [doc = " Read once into the buffer.\n Complete the read when at least 1 byte is read, the buffer is full, or EOF is reached.\n Do not resize the buffer (do not use \"aws_byte_buf_xyz_dynamic()\" functions)\n Do not assume that buffer len starts at 0.\n You may assume that read() won't be called again until the current one completes.\n You may assume that the buffer has some space available.\n Return a future, which will contain an error code if something went wrong,\n or a result bool indicating whether EOF has been reached."] pub read : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_async_input_stream , dest : * mut aws_byte_buf) -> * mut aws_future_bool > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_async_input_stream_vtable"] [:: std :: mem :: size_of :: < aws_async_input_stream_vtable > () - 16usize] ; ["Alignment of aws_async_input_stream_vtable"] [:: std :: mem :: align_of :: < aws_async_input_stream_vtable > () - 8usize] ; ["Offset of field: aws_async_input_stream_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_async_input_stream_vtable , destroy) - 0usize] ; ["Offset of field: aws_async_input_stream_vtable::read"] [:: std :: mem :: offset_of ! (aws_async_input_stream_vtable , read) - 8usize] ; } ; unsafe extern "C" { # [doc = " Initialize aws_async_input_stream \"base class\""] pub fn aws_async_input_stream_init_base (stream : * mut aws_async_input_stream , alloc : * mut aws_allocator , vtable : * const aws_async_input_stream_vtable , impl_ : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Increment reference count.\n You may pass in NULL (has no effect).\n Returns whatever pointer was passed in."] pub fn aws_async_input_stream_acquire (stream : * mut aws_async_input_stream) -> * mut aws_async_input_stream ; } unsafe extern "C" { # [doc = " Decrement reference count.\n You may pass in NULL (has no effect).\n Always returns NULL."] pub fn aws_async_input_stream_release (stream : * mut aws_async_input_stream) -> * mut aws_async_input_stream ; } unsafe extern "C" { # [doc = " Read once from the async stream into the buffer.\n The read completes when at least 1 byte is read, the buffer is full, or EOF is reached.\n Depending on implementation, the read could complete at any time.\n It may complete synchronously. It may complete on another thread.\n Returns a future, which will contain an error code if something went wrong,\n or a result bool indicating whether EOF has been reached.\n\n WARNING: The buffer must have space available.\n WARNING: Do not read again until the previous read is complete."] pub fn aws_async_input_stream_read (stream : * mut aws_async_input_stream , dest : * mut aws_byte_buf) -> * mut aws_future_bool ; } unsafe extern "C" { # [doc = " Read repeatedly from the async stream until the buffer is full, or EOF is reached.\n Depending on implementation, this could complete at any time.\n It may complete synchronously. It may complete on another thread.\n Returns a future, which will contain an error code if something went wrong,\n or a result bool indicating whether EOF has been reached.\n\n WARNING: The buffer must have space available.\n WARNING: Do not read again until the previous read is complete."] pub fn aws_async_input_stream_read_to_fill (stream : * mut aws_async_input_stream , dest : * mut aws_byte_buf) -> * mut aws_future_bool ; } pub type aws_crt_statistics_category_t = u32 ; pub const AWS_CRT_STATISTICS_CATEGORY_STRIDE_BITS : _bindgen_ty_22 = _bindgen_ty_22 :: AWS_CRT_STATISTICS_CATEGORY_STRIDE_BITS ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_22 { AWS_CRT_STATISTICS_CATEGORY_STRIDE_BITS = 8 , } # [repr (u32)] # [non_exhaustive] # [doc = " The common-specific range of the aws_crt_statistics_category cross-library enum.\n\n This enum functions as an RTTI value that lets statistics handler's interpret (via cast) a\n specific statistics structure if the RTTI value is understood.\n\n Common doesn't have any statistics structures presently, so its range is essentially empty.\n"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_crt_common_statistics_category { AWSCRT_STAT_CAT_INVALID = 0 , } # [doc = " Pattern-struct that functions as a base \"class\" for all statistics structures.  To conform\n to the pattern, a statistics structure must have its first member be the category.  In that\n case it becomes \"safe\" to cast from aws_crt_statistics_base to the specific statistics structure\n based on the category value."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_crt_statistics_base { pub category : aws_crt_statistics_category_t , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_crt_statistics_base"] [:: std :: mem :: size_of :: < aws_crt_statistics_base > () - 4usize] ; ["Alignment of aws_crt_statistics_base"] [:: std :: mem :: align_of :: < aws_crt_statistics_base > () - 4usize] ; ["Offset of field: aws_crt_statistics_base::category"] [:: std :: mem :: offset_of ! (aws_crt_statistics_base , category) - 0usize] ; } ; # [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)] pub struct aws_crt_statistics_sample_interval { pub begin_time_ms : u64 , pub end_time_ms : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_crt_statistics_sample_interval"] [:: std :: mem :: size_of :: < aws_crt_statistics_sample_interval > () - 16usize] ; ["Alignment of aws_crt_statistics_sample_interval"] [:: std :: mem :: align_of :: < aws_crt_statistics_sample_interval > () - 8usize] ; ["Offset of field: aws_crt_statistics_sample_interval::begin_time_ms"] [:: std :: mem :: offset_of ! (aws_crt_statistics_sample_interval , begin_time_ms) - 0usize] ; ["Offset of field: aws_crt_statistics_sample_interval::end_time_ms"] [:: std :: mem :: offset_of ! (aws_crt_statistics_sample_interval , end_time_ms) - 8usize] ; } ; 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 :: libc :: 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_crt_statistics_handler_vtable"] [:: std :: mem :: size_of :: < aws_crt_statistics_handler_vtable > () - 24usize] ; ["Alignment of aws_crt_statistics_handler_vtable"] [:: std :: mem :: align_of :: < aws_crt_statistics_handler_vtable > () - 8usize] ; ["Offset of field: aws_crt_statistics_handler_vtable::process_statistics"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler_vtable , process_statistics) - 0usize] ; ["Offset of field: aws_crt_statistics_handler_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler_vtable , destroy) - 8usize] ; ["Offset of field: aws_crt_statistics_handler_vtable::get_report_interval_ms"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler_vtable , get_report_interval_ms) - 16usize] ; } ; # [doc = " Base structure for all statistics handler implementations.\n\n A statistics handler is an object that listens to a stream of polymorphic (via the category RTTI enum) statistics\n structures emitted from some arbitrary source.  In the initial implementation, statistics handlers are primarily\n attached to channels, where they monitor IO throughput and state data (from channel handlers) to determine a\n connection's health.\n\n Statistics handlers are a generalization of the timeout and bandwidth filters that are often associated with\n SDK network connections.  Configurable, default implementations are defined at the protocol level (http, etc...)\n where they can be attached at connection (channel) creation time."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_crt_statistics_handler { pub vtable : * mut aws_crt_statistics_handler_vtable , pub allocator : * mut aws_allocator , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_crt_statistics_handler"] [:: std :: mem :: size_of :: < aws_crt_statistics_handler > () - 24usize] ; ["Alignment of aws_crt_statistics_handler"] [:: std :: mem :: align_of :: < aws_crt_statistics_handler > () - 8usize] ; ["Offset of field: aws_crt_statistics_handler::vtable"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler , vtable) - 0usize] ; ["Offset of field: aws_crt_statistics_handler::allocator"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler , allocator) - 8usize] ; ["Offset of field: aws_crt_statistics_handler::impl_"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler , impl_) - 16usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Submits a list of statistics objects to a statistics handler for processing\n\n handler - the statistics handler that will process the statistics objects\n interval - time period over which the statistics were gathered\n stats - list of pointers to structures that can be case to aws_crt_statistics_base (i.e. have category as a first\n   member)\n 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 :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Queries the frequency (via an interval in milliseconds) which a statistics handler would like to be informed\n of statistics."] pub fn aws_crt_statistics_handler_get_report_interval_ms (handler : * mut aws_crt_statistics_handler) -> u64 ; } unsafe extern "C" { # [doc = " completely destroys a statistics handler.  The handler's cleanup function must clean up the impl portion completely\n (including its allocation, if done separately)."] pub fn aws_crt_statistics_handler_destroy (handler : * mut aws_crt_statistics_handler) ; } pub type aws_priority_queue_compare_fn = :: std :: option :: Option < unsafe extern "C" fn (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> :: libc :: c_int > ; # [repr (C)] # [derive (Debug , Copy , Clone)] 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\n the first call to aws_priority_queue_push_bp is made, and is subsequently maintained\n through any heap node manipulations.\n\n Each element is a struct aws_priority_queue_node *, pointing to a backpointer field\n owned by the calling code, or a NULL. The backpointer field is continually updated\n with information needed to locate and remove a specific node later on."] pub backpointers : aws_array_list , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_priority_queue"] [:: std :: mem :: size_of :: < aws_priority_queue > () - 88usize] ; ["Alignment of aws_priority_queue"] [:: std :: mem :: align_of :: < aws_priority_queue > () - 8usize] ; ["Offset of field: aws_priority_queue::pred"] [:: std :: mem :: offset_of ! (aws_priority_queue , pred) - 0usize] ; ["Offset of field: aws_priority_queue::container"] [:: std :: mem :: offset_of ! (aws_priority_queue , container) - 8usize] ; ["Offset of field: aws_priority_queue::backpointers"] [:: std :: mem :: offset_of ! (aws_priority_queue , backpointers) - 48usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_priority_queue_node"] [:: std :: mem :: size_of :: < aws_priority_queue_node > () - 8usize] ; ["Alignment of aws_priority_queue_node"] [:: std :: mem :: align_of :: < aws_priority_queue_node > () - 8usize] ; ["Offset of field: aws_priority_queue_node::current_index"] [:: std :: mem :: offset_of ! (aws_priority_queue_node , current_index) - 0usize] ; } ; unsafe extern "C" { # [doc = " Initializes a priority queue struct for use. This mode will grow memory automatically (exponential model)\n Default size is the inital size of the queue\n item_size is the size of each element in bytes. Mixing items types is not supported by this API.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes a priority queue struct for use. This mode will not allocate any additional memory. When the heap fills\n new enqueue operations will fail with AWS_ERROR_PRIORITY_QUEUE_FULL.\n\n Heaps initialized using this call do not support the aws_priority_queue_push_ref call with a non-NULL backpointer\n parameter.\n\n heap is the raw memory allocated for this priority_queue\n item_count is the maximum number of elements the raw heap can contain\n item_size is the size of each element in bytes. Mixing items types is not supported by this API.\n 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 :: libc :: c_void , item_count : usize , item_size : usize , pred : aws_priority_queue_compare_fn) ; } unsafe extern "C" { # [doc = " Checks that the backpointer at a specific index of the queue is\n 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 ; } unsafe extern "C" { # [doc = " Checks that the backpointers of the priority queue are either NULL\n or correctly allocated to point at aws_priority_queue_nodes. This\n check is O(n), as it accesses every backpointer in a loop, and thus\n shouldn't be used carelessly."] pub fn aws_priority_queue_backpointers_valid_deep (queue : * const aws_priority_queue) -> bool ; } unsafe extern "C" { # [doc = " Checks that the backpointers of the priority queue satisfy validity\n constraints."] pub fn aws_priority_queue_backpointers_valid (queue : * const aws_priority_queue) -> bool ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies item into the queue and places it in the proper priority order. Complexity: O(log(n)).\n\n If the backpointer parameter is non-null, the heap will continually update the pointed-to field\n with information needed to remove the node later on. *backpointer must remain valid until the node\n is removed from the heap, and may be updated on any mutating operation on the priority queue.\n\n If the node is removed, the backpointer will be set to a sentinel value that indicates that the\n node has already been removed. It is safe (and a no-op) to call aws_priority_queue_remove with\n such a sentinel value."] pub fn aws_priority_queue_push_ref (queue : * mut aws_priority_queue , item : * mut :: libc :: c_void , backpointer : * mut aws_priority_queue_node) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the element of the highest priority, and removes it from the queue.. Complexity: O(log(n)).\n 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 :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes a specific node from the priority queue. Complexity: O(log(n))\n After removing a node (using either _remove or _pop), the backpointer set at push_ref time is set\n to a sentinel value. If this sentinel value is passed to aws_priority_queue_remove,\n AWS_ERROR_PRIORITY_QUEUE_BAD_NODE will be raised. Note, however, that passing uninitialized\n 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 :: libc :: c_void , node : * const aws_priority_queue_node) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Obtains a pointer to the element of the highest priority. Complexity: constant time.\n 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 :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes all elements from the queue, but does not free internal memory."] pub fn aws_priority_queue_clear (queue : * mut aws_priority_queue) ; } unsafe extern "C" { # [doc = " Current number of elements in the queue"] pub fn aws_priority_queue_size (queue : * const aws_priority_queue) -> usize ; } unsafe extern "C" { # [doc = " Current allocated capacity for the queue, in dynamic mode this grows over time, in static mode, this will never\n change."] pub fn aws_priority_queue_capacity (queue : * const aws_priority_queue) -> usize ; } unsafe extern "C" { # [doc = " Initializes a queue node to a default value that indicates the node is not in the queue.\n\n @param node priority queue node to initialize with a default value"] pub fn aws_priority_queue_node_init (node : * mut aws_priority_queue_node) ; } unsafe extern "C" { # [doc = " Checks if a priority queue node is currently in a priority queue.\n\n @param node priority queue node to check usage for\n\n @return true if the node is in a queue, false otherwise"] pub fn aws_priority_queue_node_is_in_queue (node : * const aws_priority_queue_node) -> bool ; } impl aws_task_status { pub const AWS_TASK_STATUS_RUN_READY : aws_task_status = aws_task_status (0) ; pub const AWS_TASK_STATUS_CANCELED : aws_task_status = aws_task_status (1) ; } # [repr (transparent)] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub struct aws_task_status (pub :: libc :: c_uint) ; # [doc = " A scheduled function."] pub type aws_task_fn = :: std :: option :: Option < unsafe extern "C" fn (task : * mut aws_task , arg : * mut :: libc :: c_void , arg1 : aws_task_status) > ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_task { pub fn_ : aws_task_fn , pub arg : * mut :: libc :: c_void , pub timestamp : u64 , pub node : aws_linked_list_node , pub priority_queue_node : aws_priority_queue_node , pub type_tag : * const :: libc :: 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_task__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_task__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_task__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_task__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_task__bindgen_ty_1::scheduled"] [:: std :: mem :: offset_of ! (aws_task__bindgen_ty_1 , scheduled) - 0usize] ; ["Offset of field: aws_task__bindgen_ty_1::reserved"] [:: std :: mem :: offset_of ! (aws_task__bindgen_ty_1 , reserved) - 0usize] ; } ; 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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_task"] [:: std :: mem :: size_of :: < aws_task > () - 64usize] ; ["Alignment of aws_task"] [:: std :: mem :: align_of :: < aws_task > () - 8usize] ; ["Offset of field: aws_task::fn_"] [:: std :: mem :: offset_of ! (aws_task , fn_) - 0usize] ; ["Offset of field: aws_task::arg"] [:: std :: mem :: offset_of ! (aws_task , arg) - 8usize] ; ["Offset of field: aws_task::timestamp"] [:: std :: mem :: offset_of ! (aws_task , timestamp) - 16usize] ; ["Offset of field: aws_task::node"] [:: std :: mem :: offset_of ! (aws_task , node) - 24usize] ; ["Offset of field: aws_task::priority_queue_node"] [:: std :: mem :: offset_of ! (aws_task , priority_queue_node) - 40usize] ; ["Offset of field: aws_task::type_tag"] [:: std :: mem :: offset_of ! (aws_task , type_tag) - 48usize] ; ["Offset of field: aws_task::abi_extension"] [:: std :: mem :: offset_of ! (aws_task , abi_extension) - 56usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_task_scheduler"] [:: std :: mem :: size_of :: < aws_task_scheduler > () - 160usize] ; ["Alignment of aws_task_scheduler"] [:: std :: mem :: align_of :: < aws_task_scheduler > () - 8usize] ; ["Offset of field: aws_task_scheduler::alloc"] [:: std :: mem :: offset_of ! (aws_task_scheduler , alloc) - 0usize] ; ["Offset of field: aws_task_scheduler::timed_queue"] [:: std :: mem :: offset_of ! (aws_task_scheduler , timed_queue) - 8usize] ; ["Offset of field: aws_task_scheduler::timed_list"] [:: std :: mem :: offset_of ! (aws_task_scheduler , timed_list) - 96usize] ; ["Offset of field: aws_task_scheduler::asap_list"] [:: std :: mem :: offset_of ! (aws_task_scheduler , asap_list) - 128usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Init an aws_task"] pub fn aws_task_init (task : * mut aws_task , fn_ : aws_task_fn , arg : * mut :: libc :: c_void , type_tag : * const :: libc :: c_char) ; } unsafe extern "C" { pub fn aws_task_run (task : * mut aws_task , status : aws_task_status) ; } unsafe extern "C" { # [doc = " Initializes a task scheduler instance."] pub fn aws_task_scheduler_init (scheduler : * mut aws_task_scheduler , alloc : * mut aws_allocator) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Empties and executes all queued tasks, passing the AWS_TASK_STATUS_CANCELED status to the task function.\n 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) ; } unsafe extern "C" { pub fn aws_task_scheduler_is_valid (scheduler : * const aws_task_scheduler) -> bool ; } unsafe extern "C" { # [doc = " Returns whether the scheduler has any scheduled tasks.\n next_task_time (optional) will be set to time of the next task, note that 0 will be set if tasks were\n 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 ; } unsafe extern "C" { # [doc = " Schedules a task to run immediately.\n 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) ; } unsafe extern "C" { # [doc = " Schedules a task to run at time_to_run.\n 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) ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Sequentially execute all tasks scheduled to run at, or before current_time.\n AWS_TASK_STATUS_RUN_READY will be passed to the task function as the task status.\n\n 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) ; } unsafe 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 :: libc :: c_char ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_channel_direction { AWS_CHANNEL_DIR_READ = 0 , AWS_CHANNEL_DIR_WRITE = 1 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop_local_object { _unused : [u8 ; 0] , } pub type aws_channel_on_setup_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (channel : * mut aws_channel , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_channel_on_shutdown_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (channel : * mut aws_channel , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_channel_slot { pub alloc : * mut aws_allocator , pub channel : * mut aws_channel , pub adj_left : * mut aws_channel_slot , pub adj_right : * mut aws_channel_slot , pub handler : * mut aws_channel_handler , pub window_size : usize , pub upstream_message_overhead : usize , pub current_window_update_batch_size : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_slot"] [:: std :: mem :: size_of :: < aws_channel_slot > () - 64usize] ; ["Alignment of aws_channel_slot"] [:: std :: mem :: align_of :: < aws_channel_slot > () - 8usize] ; ["Offset of field: aws_channel_slot::alloc"] [:: std :: mem :: offset_of ! (aws_channel_slot , alloc) - 0usize] ; ["Offset of field: aws_channel_slot::channel"] [:: std :: mem :: offset_of ! (aws_channel_slot , channel) - 8usize] ; ["Offset of field: aws_channel_slot::adj_left"] [:: std :: mem :: offset_of ! (aws_channel_slot , adj_left) - 16usize] ; ["Offset of field: aws_channel_slot::adj_right"] [:: std :: mem :: offset_of ! (aws_channel_slot , adj_right) - 24usize] ; ["Offset of field: aws_channel_slot::handler"] [:: std :: mem :: offset_of ! (aws_channel_slot , handler) - 32usize] ; ["Offset of field: aws_channel_slot::window_size"] [:: std :: mem :: offset_of ! (aws_channel_slot , window_size) - 40usize] ; ["Offset of field: aws_channel_slot::upstream_message_overhead"] [:: std :: mem :: offset_of ! (aws_channel_slot , upstream_message_overhead) - 48usize] ; ["Offset of field: aws_channel_slot::current_window_update_batch_size"] [:: std :: mem :: offset_of ! (aws_channel_slot , current_window_update_batch_size) - 56usize] ; } ; impl Default for aws_channel_slot { 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_channel_task_fn = :: std :: option :: Option < unsafe extern "C" fn (channel_task : * mut aws_channel_task , arg : * mut :: libc :: c_void , status : aws_task_status) > ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_channel_task { pub wrapper_task : aws_task , pub task_fn : aws_channel_task_fn , pub arg : * mut :: libc :: c_void , pub type_tag : * const :: libc :: c_char , pub node : aws_linked_list_node , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_task"] [:: std :: mem :: size_of :: < aws_channel_task > () - 104usize] ; ["Alignment of aws_channel_task"] [:: std :: mem :: align_of :: < aws_channel_task > () - 8usize] ; ["Offset of field: aws_channel_task::wrapper_task"] [:: std :: mem :: offset_of ! (aws_channel_task , wrapper_task) - 0usize] ; ["Offset of field: aws_channel_task::task_fn"] [:: std :: mem :: offset_of ! (aws_channel_task , task_fn) - 64usize] ; ["Offset of field: aws_channel_task::arg"] [:: std :: mem :: offset_of ! (aws_channel_task , arg) - 72usize] ; ["Offset of field: aws_channel_task::type_tag"] [:: std :: mem :: offset_of ! (aws_channel_task , type_tag) - 80usize] ; ["Offset of field: aws_channel_task::node"] [:: std :: mem :: offset_of ! (aws_channel_task , node) - 88usize] ; } ; impl Default for aws_channel_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 , Default , Copy , Clone)] pub struct aws_channel_handler_vtable { # [doc = " Called by the channel when a message is available for processing in the read direction. It is your\n responsibility to call aws_mem_release(message->allocator, message); on message when you are finished with it.\n You must only call `aws_mem_release(message->allocator, message);` if the `process_read_message`\n returns AWS_OP_SUCCESS. In case of an error, you must not clean up the message and should just raise the error.\n\n Also keep in mind that your slot's internal window has been decremented. You'll want to call\n aws_channel_slot_increment_read_window() at some point in the future if you want to keep receiving data."] pub process_read_message : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , message : * mut aws_io_message) -> :: libc :: c_int > , # [doc = " Called by the channel when a message is available for processing in the write direction. It is your\n responsibility to call aws_mem_release(message->allocator, message); on message when you are finished with it.\n You must only call `aws_mem_release(message->allocator, message);` if the `process_read_message`\n returns AWS_OP_SUCCESS. In case of an error, you must not clean up the message and should just raise the error."] pub process_write_message : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , message : * mut aws_io_message) -> :: libc :: c_int > , # [doc = " Called by the channel when a downstream handler has issued a window increment. You'll want to update your\n internal state and likely propagate a window increment message of your own by calling\n 'aws_channel_slot_increment_read_window()'"] pub increment_read_window : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , size : usize) -> :: libc :: c_int > , # [doc = " The channel calls shutdown on all handlers twice, once to shut down reading, and once to shut down writing.\n Shutdown always begins with the left-most handler, and proceeds to the right with dir set to\n AWS_CHANNEL_DIR_READ. Then shutdown is called on handlers from right to left with dir set to\n AWS_CHANNEL_DIR_WRITE.\n\n The shutdown process does not need to complete immediately and may rely on scheduled tasks.\n The handler must call aws_channel_slot_on_handler_shutdown_complete() when it is finished,\n which propagates shutdown to the next handler.  If 'free_scarce_resources_immediately' is true,\n then resources vulnerable to denial-of-service attacks (such as sockets and file handles)\n must be closed immediately before the shutdown() call returns."] pub shutdown : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , dir : aws_channel_direction , error_code : :: libc :: c_int , free_scarce_resources_immediately : bool) -> :: libc :: c_int > , # [doc = " Called by the channel when the handler is added to a slot, to get the initial window size."] pub initial_window_size : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) -> usize > , # [doc = " Called by the channel anytime a handler is added or removed, provides a hint for downstream\n handlers to avoid message fragmentation due to message overhead."] pub message_overhead : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) -> usize > , # [doc = " Clean up any resources and deallocate yourself. The shutdown process will already be completed before this\n function is called."] pub destroy : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) > , # [doc = " Directs the channel handler to reset all of the internal statistics it tracks about itself."] pub reset_statistics : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) > , # [doc = " Adds a pointer to the handler's internal statistics (if they exist) to a list of statistics structures\n associated with the channel's handler chain."] pub gather_statistics : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , stats_list : * mut aws_array_list) > , pub trigger_read : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_handler_vtable"] [:: std :: mem :: size_of :: < aws_channel_handler_vtable > () - 80usize] ; ["Alignment of aws_channel_handler_vtable"] [:: std :: mem :: align_of :: < aws_channel_handler_vtable > () - 8usize] ; ["Offset of field: aws_channel_handler_vtable::process_read_message"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , process_read_message) - 0usize] ; ["Offset of field: aws_channel_handler_vtable::process_write_message"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , process_write_message) - 8usize] ; ["Offset of field: aws_channel_handler_vtable::increment_read_window"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , increment_read_window) - 16usize] ; ["Offset of field: aws_channel_handler_vtable::shutdown"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , shutdown) - 24usize] ; ["Offset of field: aws_channel_handler_vtable::initial_window_size"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , initial_window_size) - 32usize] ; ["Offset of field: aws_channel_handler_vtable::message_overhead"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , message_overhead) - 40usize] ; ["Offset of field: aws_channel_handler_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , destroy) - 48usize] ; ["Offset of field: aws_channel_handler_vtable::reset_statistics"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , reset_statistics) - 56usize] ; ["Offset of field: aws_channel_handler_vtable::gather_statistics"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , gather_statistics) - 64usize] ; ["Offset of field: aws_channel_handler_vtable::trigger_read"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , trigger_read) - 72usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_channel_handler { pub vtable : * mut aws_channel_handler_vtable , pub alloc : * mut aws_allocator , pub slot : * mut aws_channel_slot , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_handler"] [:: std :: mem :: size_of :: < aws_channel_handler > () - 32usize] ; ["Alignment of aws_channel_handler"] [:: std :: mem :: align_of :: < aws_channel_handler > () - 8usize] ; ["Offset of field: aws_channel_handler::vtable"] [:: std :: mem :: offset_of ! (aws_channel_handler , vtable) - 0usize] ; ["Offset of field: aws_channel_handler::alloc"] [:: std :: mem :: offset_of ! (aws_channel_handler , alloc) - 8usize] ; ["Offset of field: aws_channel_handler::slot"] [:: std :: mem :: offset_of ! (aws_channel_handler , slot) - 16usize] ; ["Offset of field: aws_channel_handler::impl_"] [:: std :: mem :: offset_of ! (aws_channel_handler , impl_) - 24usize] ; } ; impl Default for aws_channel_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 () } } } # [doc = " Args for creating a new channel.\n  event_loop to use for IO and tasks. on_setup_completed will be invoked when\n  the setup process is finished It will be executed in the event loop's thread.\n  on_shutdown_completed will be executed upon channel shutdown.\n\n  enable_read_back_pressure toggles whether or not back pressure will be applied in the channel.\n  Leave this option off unless you're using something like reactive-streams, since it is a slight throughput\n  penalty.\n\n  Unless otherwise\n  specified all functions for channels and channel slots must be executed within that channel's event-loop's thread."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_channel_options { pub event_loop : * mut aws_event_loop , pub on_setup_completed : aws_channel_on_setup_completed_fn , pub on_shutdown_completed : aws_channel_on_shutdown_completed_fn , pub setup_user_data : * mut :: libc :: c_void , pub shutdown_user_data : * mut :: libc :: c_void , pub enable_read_back_pressure : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_options"] [:: std :: mem :: size_of :: < aws_channel_options > () - 48usize] ; ["Alignment of aws_channel_options"] [:: std :: mem :: align_of :: < aws_channel_options > () - 8usize] ; ["Offset of field: aws_channel_options::event_loop"] [:: std :: mem :: offset_of ! (aws_channel_options , event_loop) - 0usize] ; ["Offset of field: aws_channel_options::on_setup_completed"] [:: std :: mem :: offset_of ! (aws_channel_options , on_setup_completed) - 8usize] ; ["Offset of field: aws_channel_options::on_shutdown_completed"] [:: std :: mem :: offset_of ! (aws_channel_options , on_shutdown_completed) - 16usize] ; ["Offset of field: aws_channel_options::setup_user_data"] [:: std :: mem :: offset_of ! (aws_channel_options , setup_user_data) - 24usize] ; ["Offset of field: aws_channel_options::shutdown_user_data"] [:: std :: mem :: offset_of ! (aws_channel_options , shutdown_user_data) - 32usize] ; ["Offset of field: aws_channel_options::enable_read_back_pressure"] [:: std :: mem :: offset_of ! (aws_channel_options , enable_read_back_pressure) - 40usize] ; } ; impl Default for aws_channel_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 () } } } unsafe extern "C" { pub static mut g_aws_channel_max_fragment_size : usize ; } unsafe extern "C" { # [doc = " Initializes channel_task for use."] pub fn aws_channel_task_init (channel_task : * mut aws_channel_task , task_fn : aws_channel_task_fn , arg : * mut :: libc :: c_void , type_tag : * const :: libc :: c_char) ; } unsafe extern "C" { # [doc = " Allocates new channel, Unless otherwise specified all functions for channels and channel slots must be executed\n within that channel's event-loop's thread. channel_options are copied."] pub fn aws_channel_new (allocator : * mut aws_allocator , creation_args : * const aws_channel_options) -> * mut aws_channel ; } unsafe extern "C" { # [doc = " Mark the channel, along with all slots and handlers, for destruction.\n Must be called after shutdown has completed.\n Can be called from any thread assuming 'aws_channel_shutdown()' has completed.\n Note that memory will not be freed until all users which acquired holds on the channel via\n aws_channel_acquire_hold(), release them via aws_channel_release_hold()."] pub fn aws_channel_destroy (channel : * mut aws_channel) ; } unsafe extern "C" { # [doc = " Initiates shutdown of the channel. Shutdown will begin with the left-most slot. Each handler will invoke\n 'aws_channel_slot_on_handler_shutdown_complete' once they've finished their shutdown process for the read direction.\n Once the right-most slot has shutdown in the read direction, the process will start shutting down starting on the\n right-most slot. Once the left-most slot has shutdown in the write direction, 'callbacks->shutdown_completed' will be\n invoked in the event loop's thread.\n\n This function can be called from any thread."] pub fn aws_channel_shutdown (channel : * mut aws_channel , error_code : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Prevent a channel's memory from being freed.\n Any number of users may acquire a hold to prevent a channel and its handlers from being unexpectedly freed.\n Any user which acquires a hold must release it via aws_channel_release_hold().\n Memory will be freed once all holds are released and aws_channel_destroy() has been called."] pub fn aws_channel_acquire_hold (channel : * mut aws_channel) ; } unsafe extern "C" { # [doc = " Release a hold on the channel's memory, allowing it to be freed.\n This may be called before or after aws_channel_destroy()."] pub fn aws_channel_release_hold (channel : * mut aws_channel) ; } unsafe extern "C" { # [doc = " Allocates and initializes a new slot for use with the channel. If this is the first slot in the channel, it will\n automatically be added to the channel as the first slot. For all subsequent calls on a given channel, the slot will\n need to be added to the channel via. the aws_channel_slot_insert_right(), aws_channel_slot_insert_end(), and\n aws_channel_slot_insert_left() APIs."] pub fn aws_channel_slot_new (channel : * mut aws_channel) -> * mut aws_channel_slot ; } unsafe extern "C" { # [doc = " Fetches the event loop the channel is a part of."] pub fn aws_channel_get_event_loop (channel : * mut aws_channel) -> * mut aws_event_loop ; } unsafe extern "C" { # [doc = " Fetches the current timestamp from the event-loop's clock, in nanoseconds."] pub fn aws_channel_current_clock_time (channel : * mut aws_channel , time_nanos : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Retrieves an object by key from the event loop's local storage."] pub fn aws_channel_fetch_local_object (channel : * mut aws_channel , key : * const :: libc :: c_void , obj : * mut aws_event_loop_local_object) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Stores an object by key in the event loop's local storage."] pub fn aws_channel_put_local_object (channel : * mut aws_channel , key : * const :: libc :: c_void , obj : * const aws_event_loop_local_object) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes an object by key from the event loop's local storage."] pub fn aws_channel_remove_local_object (channel : * mut aws_channel , key : * const :: libc :: c_void , removed_obj : * mut aws_event_loop_local_object) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Acquires a message from the event loop's message pool. size_hint is merely a hint, it may be smaller than you\n requested and you are responsible for checking the bounds of it. If the returned message is not large enough, you\n must send multiple messages. This cannot fail, it never returns NULL."] pub fn aws_channel_acquire_message_from_pool (channel : * mut aws_channel , message_type : aws_io_message_type , size_hint : usize) -> * mut aws_io_message ; } unsafe extern "C" { # [doc = " Schedules a task to run on the event loop as soon as possible.\n This is the ideal way to move a task into the correct thread. It's also handy for context switches.\n This function is safe to call from any thread.\n\n If called from the channel's event loop, the task will get directly added to the run-now list.\n If called from outside the channel's event loop, the task will go into a cross-thread task queue.\n\n If tasks must be serialized relative to some source synchronization, you may not want to use this API\n because tasks submitted from the event loop thread can \"jump ahead\" of tasks submitted from external threads\n due to this optimization.  If this is a problem, you can either refactor your submission logic or use\n the aws_channel_schedule_task_now_serialized variant which does not perform this optimization.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_channel_schedule_task_now (channel : * mut aws_channel , task : * mut aws_channel_task) ; } unsafe extern "C" { # [doc = " Schedules a task to run on the event loop as soon as possible.\n\n This variant always uses the cross thread queue rather than conditionally skipping it when already in\n the destination event loop.  While not \"optimal\", this allows us to serialize task execution no matter where\n the task was submitted from: if you are submitting tasks from a critical section, the serialized order that you\n submit is guaranteed to be the order that they execute on the event loop.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_channel_schedule_task_now_serialized (channel : * mut aws_channel , task : * mut aws_channel_task) ; } unsafe extern "C" { # [doc = " Schedules a task to run on the event loop at the specified time.\n This is the ideal way to move a task into the correct thread. It's also handy for context switches.\n Use aws_channel_current_clock_time() to get the current time in nanoseconds.\n This function is safe to call from any thread.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_channel_schedule_task_future (channel : * mut aws_channel , task : * mut aws_channel_task , run_at_nanos : u64) ; } unsafe extern "C" { # [doc = " Instrument a channel with a statistics handler.  While instrumented with a statistics handler, the channel\n will periodically report per-channel-handler-specific statistics about handler performance and state.\n\n Assigning a statistics handler to a channel is a transfer of ownership -- the channel will clean up\n the handler appropriately.  Statistics handlers may be changed dynamically (for example, the upgrade\n from a vanilla http channel to a websocket channel), but this function may only be called from the\n event loop thread that the channel is a part of.\n\n The first possible hook to set a statistics handler is the channel's creation callback."] pub fn aws_channel_set_statistics_handler (channel : * mut aws_channel , handler : * mut aws_crt_statistics_handler) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Returns true if the caller is on the event loop's thread. If false, you likely need to use\n aws_channel_schedule_task(). This function is safe to call from any thread."] pub fn aws_channel_thread_is_callers_thread (channel : * mut aws_channel) -> bool ; } unsafe extern "C" { # [doc = " Sets the handler for a slot, the slot will also call get_current_window_size() and propagate a window update\n upstream."] pub fn aws_channel_slot_set_handler (slot : * mut aws_channel_slot , handler : * mut aws_channel_handler) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes slot from the channel and deallocates the slot and its handler."] pub fn aws_channel_slot_remove (slot : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Replaces remove with new_slot. Deallocates remove and its handler."] pub fn aws_channel_slot_replace (remove : * mut aws_channel_slot , new_slot : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " inserts 'to_add' to the position immediately to the right of slot. Note that the first call to\n aws_channel_slot_new() adds it to the channel implicitly."] pub fn aws_channel_slot_insert_right (slot : * mut aws_channel_slot , to_add : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Inserts to 'to_add' the end of the channel. Note that the first call to\n aws_channel_slot_new() adds it to the channel implicitly."] pub fn aws_channel_slot_insert_end (channel : * mut aws_channel , to_add : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " inserts 'to_add' to the position immediately to the left of slot. Note that the first call to\n aws_channel_slot_new() adds it to the channel implicitly."] pub fn aws_channel_slot_insert_left (slot : * mut aws_channel_slot , to_add : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Sends a message to the adjacent slot in the channel based on dir. Also does window size checking.\n\n NOTE: if this function returns an error code, it is the caller's responsibility to release message\n back to the pool. If this function returns AWS_OP_SUCCESS, the recipient of the message has taken\n ownership of the message. So, for example, don't release a message to the pool and then return an error.\n If you encounter an error condition in this case, shutdown the channel with the appropriate error code."] pub fn aws_channel_slot_send_message (slot : * mut aws_channel_slot , message : * mut aws_io_message , dir : aws_channel_direction) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Convenience function that invokes aws_channel_acquire_message_from_pool(),\n asking for the largest reasonable DATA message that can be sent in the write direction,\n with upstream overhead accounted for. This cannot fail, it never returns NULL."] pub fn aws_channel_slot_acquire_max_message_for_write (slot : * mut aws_channel_slot) -> * mut aws_io_message ; } unsafe extern "C" { # [doc = " Issues a window update notification upstream (to the left.)"] pub fn aws_channel_slot_increment_read_window (slot : * mut aws_channel_slot , window : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Called by handlers once they have finished their shutdown in the 'dir' direction. Propagates the shutdown process\n to the next handler in the channel."] pub fn aws_channel_slot_on_handler_shutdown_complete (slot : * mut aws_channel_slot , dir : aws_channel_direction , err_code : :: libc :: c_int , free_scarce_resources_immediately : bool) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initiates shutdown on slot. callbacks->on_shutdown_completed will be called\n once the shutdown process is completed."] pub fn aws_channel_slot_shutdown (slot : * mut aws_channel_slot , dir : aws_channel_direction , err_code : :: libc :: c_int , free_scarce_resources_immediately : bool) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Fetches the downstream read window. This gives you the information necessary to honor the read window. If you call\n send_message() and it exceeds this window, the message will be rejected."] pub fn aws_channel_slot_downstream_read_window (slot : * mut aws_channel_slot) -> usize ; } unsafe extern "C" { # [doc = " Fetches the current overhead of upstream handlers. This provides a hint to avoid fragmentation if you care."] pub fn aws_channel_slot_upstream_message_overhead (slot : * mut aws_channel_slot) -> usize ; } unsafe extern "C" { # [doc = " Calls destroy on handler's vtable"] pub fn aws_channel_handler_destroy (handler : * mut aws_channel_handler) ; } unsafe extern "C" { # [doc = " Calls process_read_message on handler's vtable"] pub fn aws_channel_handler_process_read_message (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , message : * mut aws_io_message) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Calls process_write_message on handler's vtable."] pub fn aws_channel_handler_process_write_message (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , message : * mut aws_io_message) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Calls on_window_update on handler's vtable."] pub fn aws_channel_handler_increment_read_window (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , size : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " calls shutdown_direction on handler's vtable."] pub fn aws_channel_handler_shutdown (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , dir : aws_channel_direction , error_code : :: libc :: c_int , free_scarce_resources_immediately : bool) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Calls initial_window_size on handler's vtable."] pub fn aws_channel_handler_initial_window_size (handler : * mut aws_channel_handler) -> usize ; } unsafe extern "C" { pub fn aws_channel_get_first_slot (channel : * mut aws_channel) -> * mut aws_channel_slot ; } unsafe extern "C" { # [doc = " A way for external processes to force a read by the data-source channel handler.  Necessary in certain cases, like\n when a server channel finishes setting up its initial handlers, a read may have already been triggered on the\n socket (the client's CLIENT_HELLO tls payload, for example) and absent further data/notifications, this data\n would never get processed."] pub fn aws_channel_trigger_read (channel : * mut aws_channel) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_address_record_type { AWS_ADDRESS_RECORD_TYPE_A = 0 , AWS_ADDRESS_RECORD_TYPE_AAAA = 1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_get_host_address_flags { AWS_GET_HOST_ADDRESS_COUNT_RECORD_TYPE_A = 1 , AWS_GET_HOST_ADDRESS_COUNT_RECORD_TYPE_AAAA = 2 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_host_address { pub allocator : * mut aws_allocator , pub host : * const aws_string , pub address : * const aws_string , pub record_type : aws_address_record_type , pub expiry : u64 , pub use_count : usize , pub connection_failure_count : usize , pub weight : u8 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_address"] [:: std :: mem :: size_of :: < aws_host_address > () - 64usize] ; ["Alignment of aws_host_address"] [:: std :: mem :: align_of :: < aws_host_address > () - 8usize] ; ["Offset of field: aws_host_address::allocator"] [:: std :: mem :: offset_of ! (aws_host_address , allocator) - 0usize] ; ["Offset of field: aws_host_address::host"] [:: std :: mem :: offset_of ! (aws_host_address , host) - 8usize] ; ["Offset of field: aws_host_address::address"] [:: std :: mem :: offset_of ! (aws_host_address , address) - 16usize] ; ["Offset of field: aws_host_address::record_type"] [:: std :: mem :: offset_of ! (aws_host_address , record_type) - 24usize] ; ["Offset of field: aws_host_address::expiry"] [:: std :: mem :: offset_of ! (aws_host_address , expiry) - 32usize] ; ["Offset of field: aws_host_address::use_count"] [:: std :: mem :: offset_of ! (aws_host_address , use_count) - 40usize] ; ["Offset of field: aws_host_address::connection_failure_count"] [:: std :: mem :: offset_of ! (aws_host_address , connection_failure_count) - 48usize] ; ["Offset of field: aws_host_address::weight"] [:: std :: mem :: offset_of ! (aws_host_address , weight) - 56usize] ; } ; impl Default for aws_host_address { 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 once an address has been resolved for host. The type in host_addresses is struct aws_host_address (by-value).\n The caller does not own this memory and you must copy the host address before returning from this function if you\n plan to use it later. For convenience, we've provided the aws_host_address_copy() and aws_host_address_clean_up()\n functions."] pub type aws_on_host_resolved_result_fn = :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , host_name : * const aws_string , err_code : :: libc :: c_int , host_addresses : * const aws_array_list , user_data : * mut :: libc :: c_void) > ; # [doc = " Function signature for configuring your own resolver (the default just uses getaddrinfo()). The type in\n output_addresses is struct aws_host_address (by-value). We assume this function blocks, hence this absurdly\n complicated design."] pub type aws_resolve_host_implementation_fn = :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , host_name : * const aws_string , output_addresses : * mut aws_array_list , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_host_resolution_config { pub impl_ : aws_resolve_host_implementation_fn , pub max_ttl : usize , pub impl_data : * mut :: libc :: c_void , pub resolve_frequency_ns : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolution_config"] [:: std :: mem :: size_of :: < aws_host_resolution_config > () - 32usize] ; ["Alignment of aws_host_resolution_config"] [:: std :: mem :: align_of :: < aws_host_resolution_config > () - 8usize] ; ["Offset of field: aws_host_resolution_config::impl_"] [:: std :: mem :: offset_of ! (aws_host_resolution_config , impl_) - 0usize] ; ["Offset of field: aws_host_resolution_config::max_ttl"] [:: std :: mem :: offset_of ! (aws_host_resolution_config , max_ttl) - 8usize] ; ["Offset of field: aws_host_resolution_config::impl_data"] [:: std :: mem :: offset_of ! (aws_host_resolution_config , impl_data) - 16usize] ; ["Offset of field: aws_host_resolution_config::resolve_frequency_ns"] [:: std :: mem :: offset_of ! (aws_host_resolution_config , resolve_frequency_ns) - 24usize] ; } ; impl Default for aws_host_resolution_config { 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)] pub struct aws_host_resolver_purge_host_options { pub host : * const aws_string , pub on_host_purge_complete_callback : aws_simple_completion_callback , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolver_purge_host_options"] [:: std :: mem :: size_of :: < aws_host_resolver_purge_host_options > () - 24usize] ; ["Alignment of aws_host_resolver_purge_host_options"] [:: std :: mem :: align_of :: < aws_host_resolver_purge_host_options > () - 8usize] ; ["Offset of field: aws_host_resolver_purge_host_options::host"] [:: std :: mem :: offset_of ! (aws_host_resolver_purge_host_options , host) - 0usize] ; ["Offset of field: aws_host_resolver_purge_host_options::on_host_purge_complete_callback"] [:: std :: mem :: offset_of ! (aws_host_resolver_purge_host_options , on_host_purge_complete_callback) - 8usize] ; ["Offset of field: aws_host_resolver_purge_host_options::user_data"] [:: std :: mem :: offset_of ! (aws_host_resolver_purge_host_options , user_data) - 16usize] ; } ; impl Default for aws_host_resolver_purge_host_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 () } } } # [doc = " should you absolutely disdain the default implementation, feel free to implement your own."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_host_resolver_vtable { # [doc = " clean up everything you allocated, but not resolver itself."] pub destroy : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver) > , # [doc = " resolve the host by host_name, the user owns host_name, so it needs to be copied if you persist it,\n invoke res with the result. This function should never block."] pub resolve_host : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , host_name : * const aws_string , res : aws_on_host_resolved_result_fn , config : * const aws_host_resolution_config , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > , # [doc = " gives your implementation a hint that an address has some failed connections occuring. Do whatever you want (or\n nothing) about it."] pub record_connection_failure : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , address : * const aws_host_address) -> :: libc :: c_int > , # [doc = " @Deprecated Use purge_cache_with_callback instead\n wipe out anything you have cached."] pub purge_cache : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver) -> :: libc :: c_int > , # [doc = " wipe out anything you have cached."] pub purge_cache_with_callback : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , on_purge_cache_complete_callback : aws_simple_completion_callback , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > , # [doc = " wipe out anything cached for a specific host"] pub purge_host_cache : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , options : * const aws_host_resolver_purge_host_options) -> :: libc :: c_int > , # [doc = " get number of addresses for a given host."] pub get_host_address_count : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , host_name : * const aws_string , flags : u32) -> usize > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolver_vtable"] [:: std :: mem :: size_of :: < aws_host_resolver_vtable > () - 56usize] ; ["Alignment of aws_host_resolver_vtable"] [:: std :: mem :: align_of :: < aws_host_resolver_vtable > () - 8usize] ; ["Offset of field: aws_host_resolver_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , destroy) - 0usize] ; ["Offset of field: aws_host_resolver_vtable::resolve_host"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , resolve_host) - 8usize] ; ["Offset of field: aws_host_resolver_vtable::record_connection_failure"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , record_connection_failure) - 16usize] ; ["Offset of field: aws_host_resolver_vtable::purge_cache"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , purge_cache) - 24usize] ; ["Offset of field: aws_host_resolver_vtable::purge_cache_with_callback"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , purge_cache_with_callback) - 32usize] ; ["Offset of field: aws_host_resolver_vtable::purge_host_cache"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , purge_host_cache) - 40usize] ; ["Offset of field: aws_host_resolver_vtable::get_host_address_count"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , get_host_address_count) - 48usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_host_resolver { pub allocator : * mut aws_allocator , pub impl_ : * mut :: libc :: c_void , pub vtable : * mut aws_host_resolver_vtable , pub ref_count : aws_ref_count , pub shutdown_options : aws_shutdown_callback_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolver"] [:: std :: mem :: size_of :: < aws_host_resolver > () - 64usize] ; ["Alignment of aws_host_resolver"] [:: std :: mem :: align_of :: < aws_host_resolver > () - 8usize] ; ["Offset of field: aws_host_resolver::allocator"] [:: std :: mem :: offset_of ! (aws_host_resolver , allocator) - 0usize] ; ["Offset of field: aws_host_resolver::impl_"] [:: std :: mem :: offset_of ! (aws_host_resolver , impl_) - 8usize] ; ["Offset of field: aws_host_resolver::vtable"] [:: std :: mem :: offset_of ! (aws_host_resolver , vtable) - 16usize] ; ["Offset of field: aws_host_resolver::ref_count"] [:: std :: mem :: offset_of ! (aws_host_resolver , ref_count) - 24usize] ; ["Offset of field: aws_host_resolver::shutdown_options"] [:: std :: mem :: offset_of ! (aws_host_resolver , shutdown_options) - 48usize] ; } ; impl Default for aws_host_resolver { 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)] pub struct aws_host_resolver_default_options { pub max_entries : usize , pub el_group : * mut aws_event_loop_group , pub shutdown_options : * const aws_shutdown_callback_options , pub system_clock_override_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolver_default_options"] [:: std :: mem :: size_of :: < aws_host_resolver_default_options > () - 32usize] ; ["Alignment of aws_host_resolver_default_options"] [:: std :: mem :: align_of :: < aws_host_resolver_default_options > () - 8usize] ; ["Offset of field: aws_host_resolver_default_options::max_entries"] [:: std :: mem :: offset_of ! (aws_host_resolver_default_options , max_entries) - 0usize] ; ["Offset of field: aws_host_resolver_default_options::el_group"] [:: std :: mem :: offset_of ! (aws_host_resolver_default_options , el_group) - 8usize] ; ["Offset of field: aws_host_resolver_default_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_host_resolver_default_options , shutdown_options) - 16usize] ; ["Offset of field: aws_host_resolver_default_options::system_clock_override_fn"] [:: std :: mem :: offset_of ! (aws_host_resolver_default_options , system_clock_override_fn) - 24usize] ; } ; impl Default for aws_host_resolver_default_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 () } } } unsafe extern "C" { # [doc = " Copies `from` to `to`."] pub fn aws_host_address_copy (from : * const aws_host_address , to : * mut aws_host_address) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Moves `from` to `to`. After this call, from is no longer usable. Though, it could be resused for another\n move or copy operation."] pub fn aws_host_address_move (from : * mut aws_host_address , to : * mut aws_host_address) ; } unsafe extern "C" { # [doc = " Cleans up the memory for `address`"] pub fn aws_host_address_clean_up (address : * mut aws_host_address) ; } unsafe extern "C" { # [doc = " WARNING! do not call this function directly (getaddrinfo()): it blocks. Provide a pointer to this function for other\n resolution functions."] pub fn aws_default_dns_resolve (allocator : * mut aws_allocator , host_name : * const aws_string , output_addresses : * mut aws_array_list , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Creates a host resolver with the default behavior. Here's the behavior:\n\n Since there's not a reliable way to do non-blocking DNS without a ton of risky work that would need years of testing\n on every Unix system in existence, we work around it by doing a threaded implementation.\n\n When you request an address, it checks the cache. If the entry isn't in the cache it creates a new one.\n Each entry has a potentially short lived back-ground thread based on ttl for the records. Once we've populated the\n cache and you keep the resolver active, the resolution callback will be invoked immediately. When it's idle, it will\n take a little while in the background thread to fetch more, evaluate TTLs etc... In that case your callback will be\n invoked from the background thread.\n\n --------------------------------------------------------------------------------------------------------------------\n\n A few things to note about TTLs and connection failures.\n\n We attempt to honor your max ttl but will not honor it if dns queries are failing or all of your connections are\n marked as failed. Once we are able to query dns again, we will re-evaluate the TTLs.\n\n Upon notification connection failures, we move them to a separate list. Eventually we retry them when it's likely\n that the endpoint is healthy again or we don't really have another choice, but we try to keep them out of your\n hot path.\n\n ---------------------------------------------------------------------------------------------------------------------\n\n Finally, this entire design attempts to prevent problems where developers have to choose between large TTLs and thus\n sticky hosts or short TTLs and good fleet utilization but now higher latencies. In this design, we resolve every\n second in the background (only while you're actually using the record), but we do not expire the earlier resolved\n addresses until max ttl has passed.\n\n This for example, should enable you to hit thousands of hosts in the Amazon S3 fleet instead of just one or two."] pub fn aws_host_resolver_new_default (allocator : * mut aws_allocator , options : * const aws_host_resolver_default_options) -> * mut aws_host_resolver ; } unsafe extern "C" { # [doc = " Increments the reference count on the host resolver, allowing the caller to take a reference to it.\n\n Returns the same host resolver passed in."] pub fn aws_host_resolver_acquire (resolver : * mut aws_host_resolver) -> * mut aws_host_resolver ; } unsafe extern "C" { # [doc = " Decrements a host resolver's ref count.  When the ref count drops to zero, the resolver will be destroyed."] pub fn aws_host_resolver_release (resolver : * mut aws_host_resolver) ; } unsafe extern "C" { # [doc = " calls resolve_host on the vtable. config will be copied."] pub fn aws_host_resolver_resolve_host (resolver : * mut aws_host_resolver , host_name : * const aws_string , res : aws_on_host_resolved_result_fn , config : * const aws_host_resolution_config , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " calls record_connection_failure on the vtable."] pub fn aws_host_resolver_record_connection_failure (resolver : * mut aws_host_resolver , address : * const aws_host_address) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " @Deprecated Use purge_cache_with_callback instead\n calls purge_cache on the vtable."] pub fn aws_host_resolver_purge_cache (resolver : * mut aws_host_resolver) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Calls aws_host_resolver_purge_cache_with_callback on the vtable which will wipe out everything host resolver has\n cached."] pub fn aws_host_resolver_purge_cache_with_callback (resolver : * mut aws_host_resolver , on_purge_cache_complete_callback : aws_simple_completion_callback , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes the cache for a host asynchronously."] pub fn aws_host_resolver_purge_host_cache (resolver : * mut aws_host_resolver , options : * const aws_host_resolver_purge_host_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " get number of addresses for a given host."] pub fn aws_host_resolver_get_host_address_count (resolver : * mut aws_host_resolver , host_name : * const aws_string , flags : u32) -> usize ; } unsafe extern "C" { # [doc = " Returns the default host resolution config used internally if none specified.\n\n @return default host resolution config"] pub fn aws_host_resolver_init_default_resolution_config () -> aws_host_resolution_config ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_socket { _unused : [u8 ; 0] , } # [doc = " Generic event function for channel lifecycle events.\n\n Callbacks are provided for:\n   (1) Channel creation\n   (2) Channel setup - If TLS is being used, this function is called once the socket has connected, the channel has\n been initialized, and TLS has been successfully negotiated. A TLS handler has already been added to the channel. If\n TLS negotiation fails, this function will be called with the corresponding error code. If TLS is not being used, this\n function is called once the socket has connected and the channel has been initialized.\n   (3) Channel shutdown\n\n These callbacks are always invoked within the thread of the event-loop that the channel is assigned to.\n\n This function does NOT always imply \"success\" -- if error_code is AWS_OP_SUCCESS then everything was successful,\n otherwise an error condition occurred."] pub type aws_client_bootstrap_on_channel_event_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_client_bootstrap , error_code : :: libc :: c_int , channel : * mut aws_channel , user_data : * mut :: libc :: c_void) > ; # [doc = " If ALPN is being used this function will be invoked by the channel once an ALPN message is received. The returned\n channel_handler will be added to, and managed by, the channel."] pub type aws_channel_on_protocol_negotiated_fn = :: std :: option :: Option < unsafe extern "C" fn (new_slot : * mut aws_channel_slot , protocol : * mut aws_byte_buf , user_data : * mut :: libc :: c_void) -> * mut aws_channel_handler > ; # [doc = " Called after client bootstrap has been completely cleaned up, after its last refcount is released."] pub type aws_client_bootstrap_shutdown_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " aws_client_bootstrap handles creation and setup of channels that communicate via socket with a specific endpoint."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_client_bootstrap { pub allocator : * mut aws_allocator , pub event_loop_group : * mut aws_event_loop_group , pub host_resolver : * mut aws_host_resolver , pub host_resolver_config : aws_host_resolution_config , pub on_protocol_negotiated : aws_channel_on_protocol_negotiated_fn , pub ref_count : aws_ref_count , pub on_shutdown_complete : aws_client_bootstrap_shutdown_complete_fn , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_client_bootstrap"] [:: std :: mem :: size_of :: < aws_client_bootstrap > () - 104usize] ; ["Alignment of aws_client_bootstrap"] [:: std :: mem :: align_of :: < aws_client_bootstrap > () - 8usize] ; ["Offset of field: aws_client_bootstrap::allocator"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , allocator) - 0usize] ; ["Offset of field: aws_client_bootstrap::event_loop_group"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , event_loop_group) - 8usize] ; ["Offset of field: aws_client_bootstrap::host_resolver"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , host_resolver) - 16usize] ; ["Offset of field: aws_client_bootstrap::host_resolver_config"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , host_resolver_config) - 24usize] ; ["Offset of field: aws_client_bootstrap::on_protocol_negotiated"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , on_protocol_negotiated) - 56usize] ; ["Offset of field: aws_client_bootstrap::ref_count"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , ref_count) - 64usize] ; ["Offset of field: aws_client_bootstrap::on_shutdown_complete"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , on_shutdown_complete) - 88usize] ; ["Offset of field: aws_client_bootstrap::user_data"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , user_data) - 96usize] ; } ; impl Default for aws_client_bootstrap { 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 = " aws_client_bootstrap creation options."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_client_bootstrap_options { pub event_loop_group : * mut aws_event_loop_group , pub host_resolver : * mut aws_host_resolver , pub host_resolution_config : * const aws_host_resolution_config , pub on_shutdown_complete : aws_client_bootstrap_shutdown_complete_fn , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_client_bootstrap_options"] [:: std :: mem :: size_of :: < aws_client_bootstrap_options > () - 40usize] ; ["Alignment of aws_client_bootstrap_options"] [:: std :: mem :: align_of :: < aws_client_bootstrap_options > () - 8usize] ; ["Offset of field: aws_client_bootstrap_options::event_loop_group"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , event_loop_group) - 0usize] ; ["Offset of field: aws_client_bootstrap_options::host_resolver"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , host_resolver) - 8usize] ; ["Offset of field: aws_client_bootstrap_options::host_resolution_config"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , host_resolution_config) - 16usize] ; ["Offset of field: aws_client_bootstrap_options::on_shutdown_complete"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , on_shutdown_complete) - 24usize] ; ["Offset of field: aws_client_bootstrap_options::user_data"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , user_data) - 32usize] ; } ; impl Default for aws_client_bootstrap_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 () } } } # [doc = " If TLS is being used, this function is called once the socket has received an incoming connection, the channel has\n been initialized, and TLS has been successfully negotiated. A TLS handler has already been added to the channel. If\n TLS negotiation fails, this function will be called with the corresponding error code.\n\n If TLS is not being used, this function is called once the socket has received an incoming connection and the channel\n has been initialized.\n\n This function is always called within the thread of the event-loop that the new channel is assigned to upon success.\n\n On failure, the channel might not be assigned to an event loop yet, and will thus be invoked on the listener's\n event-loop thread.\n\n This function does NOT mean \"success\", if error_code is AWS_OP_SUCCESS then everything was successful, otherwise an\n error condition occurred.\n\n If an error occurred, you do not need to shutdown the channel. The `aws_channel_client_shutdown_callback` will be\n invoked once the channel has finished shutting down."] pub type aws_server_bootstrap_on_accept_channel_setup_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_server_bootstrap , error_code : :: libc :: c_int , channel : * mut aws_channel , user_data : * mut :: libc :: c_void) > ; # [doc = " Once the channel shuts down, this function will be invoked within the thread of\n the event-loop that the channel is assigned to.\n\n Note: this function is only invoked if the channel was successfully setup,\n e.g. aws_server_bootstrap_on_accept_channel_setup_fn() was invoked without an error code."] pub type aws_server_bootstrap_on_accept_channel_shutdown_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_server_bootstrap , error_code : :: libc :: c_int , channel : * mut aws_channel , user_data : * mut :: libc :: c_void) > ; # [doc = " This function is only used for async listener (Apple Network Framework in this case).\n Once the server listener socket is finished setup and starting listening, this fuction\n will be invoked."] pub type aws_server_bootstrap_on_listener_setup_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_server_bootstrap , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Once the server listener socket is finished destroying, and all the existing connections are closed, this fuction\n will be invoked."] pub type aws_server_bootstrap_on_server_listener_destroy_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_server_bootstrap , user_data : * mut :: libc :: c_void) > ; # [doc = " aws_server_bootstrap manages listening sockets, creating and setting up channels to handle each incoming connection."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_server_bootstrap { pub allocator : * mut aws_allocator , pub event_loop_group : * mut aws_event_loop_group , pub on_protocol_negotiated : aws_channel_on_protocol_negotiated_fn , pub ref_count : aws_ref_count , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_server_bootstrap"] [:: std :: mem :: size_of :: < aws_server_bootstrap > () - 48usize] ; ["Alignment of aws_server_bootstrap"] [:: std :: mem :: align_of :: < aws_server_bootstrap > () - 8usize] ; ["Offset of field: aws_server_bootstrap::allocator"] [:: std :: mem :: offset_of ! (aws_server_bootstrap , allocator) - 0usize] ; ["Offset of field: aws_server_bootstrap::event_loop_group"] [:: std :: mem :: offset_of ! (aws_server_bootstrap , event_loop_group) - 8usize] ; ["Offset of field: aws_server_bootstrap::on_protocol_negotiated"] [:: std :: mem :: offset_of ! (aws_server_bootstrap , on_protocol_negotiated) - 16usize] ; ["Offset of field: aws_server_bootstrap::ref_count"] [:: std :: mem :: offset_of ! (aws_server_bootstrap , ref_count) - 24usize] ; } ; impl Default for aws_server_bootstrap { 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 = " Socket-based channel creation options.\n\n bootstrap - configs name resolution and which event loop group the connection will be seated into\n host_name - host to connect to; if a dns address, will be resolved prior to connecting\n port - port to connect to\n socket_options - socket properties, including type (tcp vs. udp vs. unix domain) and connect timeout.  TLS\n   connections are currently restricted to tcp (AWS_SOCKET_STREAM) only.\n tls_options - (optional) tls context to apply after connection establishment.  If NULL, the connection will\n   not be protected by TLS.\n creation_callback - (optional) callback invoked when the channel is first created.  This is always right after\n   the connection was successfully established.  *Does NOT* get called if the initial connect failed.\n setup_callback - callback invoked once the channel is ready for use and TLS has been negotiated or if an error\n   is encountered\n shutdown_callback - callback invoked once the channel has shutdown.\n enable_read_back_pressure - controls whether or not back pressure will be applied in the channel\n user_data - arbitrary data to pass back to the various callbacks\n requested_event_loop - if set, the connection will be placed on the requested event loop rather than one\n  chosen internally from the bootstrap's associated event loop group.  It is an error to pass in an event loop\n  that is not associated with the bootstrap's event loop group.\n\n Immediately after the `shutdown_callback` returns, the channel is cleaned up automatically. All callbacks are invoked\n in the thread of the event-loop that the new channel is assigned to.\n"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_socket_channel_bootstrap_options { pub bootstrap : * mut aws_client_bootstrap , pub host_name : * const :: libc :: c_char , pub port : u32 , pub socket_options : * const aws_socket_options , pub tls_options : * const aws_tls_connection_options , pub creation_callback : aws_client_bootstrap_on_channel_event_fn , pub setup_callback : aws_client_bootstrap_on_channel_event_fn , pub shutdown_callback : aws_client_bootstrap_on_channel_event_fn , pub enable_read_back_pressure : bool , pub user_data : * mut :: libc :: c_void , pub requested_event_loop : * mut aws_event_loop , pub host_resolution_override_config : * const aws_host_resolution_config , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_socket_channel_bootstrap_options"] [:: std :: mem :: size_of :: < aws_socket_channel_bootstrap_options > () - 96usize] ; ["Alignment of aws_socket_channel_bootstrap_options"] [:: std :: mem :: align_of :: < aws_socket_channel_bootstrap_options > () - 8usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , bootstrap) - 0usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::host_name"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , host_name) - 8usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::port"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , port) - 16usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::socket_options"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , socket_options) - 24usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::tls_options"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , tls_options) - 32usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::creation_callback"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , creation_callback) - 40usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::setup_callback"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , setup_callback) - 48usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , shutdown_callback) - 56usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::enable_read_back_pressure"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , enable_read_back_pressure) - 64usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::user_data"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , user_data) - 72usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::requested_event_loop"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , requested_event_loop) - 80usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::host_resolution_override_config"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , host_resolution_override_config) - 88usize] ; } ; impl Default for aws_socket_channel_bootstrap_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 () } } } # [doc = " Arguments to setup a server socket listener which will also negotiate and configure TLS.\n This creates a socket listener bound to `host` and 'port' using socket options `options`, and TLS options\n `tls_options`. `incoming_callback` will be invoked once an incoming channel is ready for use and TLS is\n finished negotiating, or if an error is encountered. `shutdown_callback` will be invoked once the channel has\n shutdown. `destroy_callback` will be invoked after the server socket listener is destroyed, and all associated\n connections and channels have finished shutting down. Immediately after the `shutdown_callback` returns, the channel\n is cleaned up automatically. All callbacks are invoked in the thread of the event-loop that listener is assigned to.\n\n Upon shutdown of your application, you'll want to call `aws_server_bootstrap_destroy_socket_listener` with the return\n value from this function.\n\n The socket type in `options` must be AWS_SOCKET_STREAM if tls_options is set.\n DTLS is not currently supported for tls."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_server_socket_channel_bootstrap_options { pub bootstrap : * mut aws_server_bootstrap , pub host_name : * const :: libc :: c_char , pub port : u32 , pub socket_options : * const aws_socket_options , pub tls_options : * const aws_tls_connection_options , pub setup_callback : aws_server_bootstrap_on_listener_setup_fn , pub incoming_callback : aws_server_bootstrap_on_accept_channel_setup_fn , pub shutdown_callback : aws_server_bootstrap_on_accept_channel_shutdown_fn , pub destroy_callback : aws_server_bootstrap_on_server_listener_destroy_fn , pub enable_read_back_pressure : bool , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_server_socket_channel_bootstrap_options"] [:: std :: mem :: size_of :: < aws_server_socket_channel_bootstrap_options > () - 88usize] ; ["Alignment of aws_server_socket_channel_bootstrap_options"] [:: std :: mem :: align_of :: < aws_server_socket_channel_bootstrap_options > () - 8usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , bootstrap) - 0usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::host_name"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , host_name) - 8usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::port"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , port) - 16usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::socket_options"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , socket_options) - 24usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::tls_options"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , tls_options) - 32usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::setup_callback"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , setup_callback) - 40usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::incoming_callback"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , incoming_callback) - 48usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , shutdown_callback) - 56usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::destroy_callback"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , destroy_callback) - 64usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::enable_read_back_pressure"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , enable_read_back_pressure) - 72usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::user_data"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , user_data) - 80usize] ; } ; impl Default for aws_server_socket_channel_bootstrap_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 () } } } unsafe extern "C" { # [doc = " Create the client bootstrap."] pub fn aws_client_bootstrap_new (allocator : * mut aws_allocator , options : * const aws_client_bootstrap_options) -> * mut aws_client_bootstrap ; } unsafe extern "C" { # [doc = " Increments a client bootstrap's ref count, allowing the caller to take a reference to it.\n\n Returns the same client bootstrap passed in."] pub fn aws_client_bootstrap_acquire (bootstrap : * mut aws_client_bootstrap) -> * mut aws_client_bootstrap ; } unsafe extern "C" { # [doc = " Decrements a client bootstrap's ref count.  When the ref count drops to zero, the bootstrap will be destroyed."] pub fn aws_client_bootstrap_release (bootstrap : * mut aws_client_bootstrap) ; } unsafe extern "C" { # [doc = " When using TLS, if ALPN is used, this callback will be invoked from the channel. The returned handler will be added\n to the channel."] pub fn aws_client_bootstrap_set_alpn_callback (bootstrap : * mut aws_client_bootstrap , on_protocol_negotiated : aws_channel_on_protocol_negotiated_fn) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Sets up a client socket channel."] pub fn aws_client_bootstrap_new_socket_channel (options : * mut aws_socket_channel_bootstrap_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes the server bootstrap with `allocator` and `el_group`. This object manages listeners, server connections,\n and channels."] pub fn aws_server_bootstrap_new (allocator : * mut aws_allocator , el_group : * mut aws_event_loop_group) -> * mut aws_server_bootstrap ; } unsafe extern "C" { # [doc = " Increments a server bootstrap's ref count, allowing the caller to take a reference to it.\n\n Returns the same server bootstrap passed in."] pub fn aws_server_bootstrap_acquire (bootstrap : * mut aws_server_bootstrap) -> * mut aws_server_bootstrap ; } unsafe extern "C" { # [doc = " Decrements a server bootstrap's ref count.  When the ref count drops to zero, the bootstrap will be destroyed."] pub fn aws_server_bootstrap_release (bootstrap : * mut aws_server_bootstrap) ; } unsafe extern "C" { # [doc = " When using TLS, if ALPN is used, this callback will be invoked from the channel. The returned handler will be added\n to the channel."] pub fn aws_server_bootstrap_set_alpn_callback (bootstrap : * mut aws_server_bootstrap , on_protocol_negotiated : aws_channel_on_protocol_negotiated_fn) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Sets up a server socket listener. If you are planning on using TLS, use\n `aws_server_bootstrap_new_tls_socket_listener` instead. This creates a socket listener bound to `local_endpoint`\n using socket options `options`. `incoming_callback` will be invoked once an incoming channel is ready for use or if\n an error is encountered. `shutdown_callback` will be invoked once the channel has shutdown. `destroy_callback` will\n be invoked after the server socket listener is destroyed, and all associated connections and channels have finished\n shutting down. Immediately after the `shutdown_callback` returns, the channel is cleaned up automatically. All\n callbacks are invoked the thread of the event-loop that the listening socket is assigned to\n\n `setup_callback`. If set, the callback will be asynchronously invoked when the listener is ready for use. For Apple\n Network Framework, the listener is not usable until the callback is invoked. If the listener creation failed\n (return NULL), the `setup_callback` will not be invoked.\n\n Upon shutdown of your application, you'll want to call `aws_server_bootstrap_destroy_socket_listener` with the return\n value from this function.\n\n bootstrap_options is copied."] pub fn aws_server_bootstrap_new_socket_listener (bootstrap_options : * const aws_server_socket_channel_bootstrap_options) -> * mut aws_socket ; } unsafe extern "C" { # [doc = " Shuts down 'listener' and cleans up any resources associated with it. Any incoming channels on `listener` will still\n be active. `destroy_callback` will be invoked after the server socket listener is destroyed, and all associated\n connections and channels have finished shutting down."] pub fn aws_server_bootstrap_destroy_socket_listener (bootstrap : * mut aws_server_bootstrap , listener : * mut aws_socket) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop_options { _unused : [u8 ; 0] , } # [doc = " @internal"] pub type aws_event_loop_on_event_fn = :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , handle : * mut aws_io_handle , events : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " @internal"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_event_loop_vtable { pub start_destroy : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) > , pub complete_destroy : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) > , pub run : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) -> :: libc :: c_int > , pub stop : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) -> :: libc :: c_int > , pub wait_for_stop_completion : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) -> :: libc :: c_int > , pub schedule_task_now : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , task : * mut aws_task) > , pub schedule_task_now_serialized : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , task : * mut aws_task) > , pub schedule_task_future : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , task : * mut aws_task , run_at_nanos : u64) > , pub cancel_task : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , task : * mut aws_task) > , pub connect_to_io_completion_port : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , handle : * mut aws_io_handle) -> :: libc :: c_int > , pub subscribe_to_io_events : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , handle : * mut aws_io_handle , events : :: libc :: c_int , on_event : aws_event_loop_on_event_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > , pub unsubscribe_from_io_events : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , handle : * mut aws_io_handle) -> :: libc :: c_int > , pub free_io_event_resources : :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > , pub is_on_callers_thread : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) -> bool > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_event_loop_vtable"] [:: std :: mem :: size_of :: < aws_event_loop_vtable > () - 112usize] ; ["Alignment of aws_event_loop_vtable"] [:: std :: mem :: align_of :: < aws_event_loop_vtable > () - 8usize] ; ["Offset of field: aws_event_loop_vtable::start_destroy"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , start_destroy) - 0usize] ; ["Offset of field: aws_event_loop_vtable::complete_destroy"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , complete_destroy) - 8usize] ; ["Offset of field: aws_event_loop_vtable::run"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , run) - 16usize] ; ["Offset of field: aws_event_loop_vtable::stop"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , stop) - 24usize] ; ["Offset of field: aws_event_loop_vtable::wait_for_stop_completion"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , wait_for_stop_completion) - 32usize] ; ["Offset of field: aws_event_loop_vtable::schedule_task_now"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , schedule_task_now) - 40usize] ; ["Offset of field: aws_event_loop_vtable::schedule_task_now_serialized"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , schedule_task_now_serialized) - 48usize] ; ["Offset of field: aws_event_loop_vtable::schedule_task_future"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , schedule_task_future) - 56usize] ; ["Offset of field: aws_event_loop_vtable::cancel_task"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , cancel_task) - 64usize] ; ["Offset of field: aws_event_loop_vtable::connect_to_io_completion_port"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , connect_to_io_completion_port) - 72usize] ; ["Offset of field: aws_event_loop_vtable::subscribe_to_io_events"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , subscribe_to_io_events) - 80usize] ; ["Offset of field: aws_event_loop_vtable::unsubscribe_from_io_events"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , unsubscribe_from_io_events) - 88usize] ; ["Offset of field: aws_event_loop_vtable::free_io_event_resources"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , free_io_event_resources) - 96usize] ; ["Offset of field: aws_event_loop_vtable::is_on_callers_thread"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , is_on_callers_thread) - 104usize] ; } ; # [repr (u32)] # [non_exhaustive] # [doc = " Event Loop Type.  If set to `AWS_EVENT_LOOP_PLATFORM_DEFAULT`, the event loop will automatically use the platform’s\n default.\n\n Default Event Loop Type\n Linux       | AWS_EVENT_LOOP_EPOLL\n Windows     | AWS_EVENT_LOOP_IOCP\n BSD Variants| AWS_EVENT_LOOP_KQUEUE\n macOS       | AWS_EVENT_LOOP_KQUEUE\n iOS         | AWS_EVENT_LOOP_DISPATCH_QUEUE"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_event_loop_type { AWS_EVENT_LOOP_PLATFORM_DEFAULT = 0 , AWS_EVENT_LOOP_EPOLL = 1 , AWS_EVENT_LOOP_IOCP = 2 , AWS_EVENT_LOOP_KQUEUE = 3 , AWS_EVENT_LOOP_DISPATCH_QUEUE = 4 , } # [doc = " Event loop group configuration options"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop_group_options { # [doc = " How many event loops that event loop group should contain.  For most group types, this implies\n the creation and management of an analagous amount of managed threads"] pub loop_count : u16 , # [doc = " Event loop type. If the event loop type is set to AWS_EVENT_LOOP_PLATFORM_DEFAULT, the\n creation function will automatically use the platform’s default event loop type."] pub type_ : aws_event_loop_type , # [doc = " Optional callback to invoke when the event loop group finishes destruction."] pub shutdown_options : * const aws_shutdown_callback_options , # [doc = " Optional configuration to control how the event loop group's threads bind to CPU groups"] pub cpu_group : * const u16 , # [doc = " Override for the clock function that event loops should use.  Defaults to the system's high resolution\n timer.\n\n Do not bind this value to managed code; it is only used in timing-sensitive tests."] pub clock_override : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_event_loop_group_options"] [:: std :: mem :: size_of :: < aws_event_loop_group_options > () - 32usize] ; ["Alignment of aws_event_loop_group_options"] [:: std :: mem :: align_of :: < aws_event_loop_group_options > () - 8usize] ; ["Offset of field: aws_event_loop_group_options::loop_count"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , loop_count) - 0usize] ; ["Offset of field: aws_event_loop_group_options::type_"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , type_) - 4usize] ; ["Offset of field: aws_event_loop_group_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , shutdown_options) - 8usize] ; ["Offset of field: aws_event_loop_group_options::cpu_group"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , cpu_group) - 16usize] ; ["Offset of field: aws_event_loop_group_options::clock_override"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , clock_override) - 24usize] ; } ; impl Default for aws_event_loop_group_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 () } } } unsafe extern "C" { # [doc = " The event loop will schedule the task and run it on the event loop thread as soon as possible.\n Note that cancelled tasks may execute outside the event loop thread.\n This function may be called from outside or inside the event loop thread.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_event_loop_schedule_task_now (event_loop : * mut aws_event_loop , task : * mut aws_task) ; } unsafe extern "C" { # [doc = " Variant of aws_event_loop_schedule_task_now that forces all tasks to go through the cross thread task queue,\n guaranteeing that order-of-submission is order-of-execution.  If you need this guarantee, you must use this\n function; the base function contains short-circuiting logic that breaks ordering invariants.  Beyond that, all\n properties of aws_event_loop_schedule_task_now apply to this function as well.\n\n Serialization guarantee does not apply to task cancellation (which can occur out-of-order or even out-of-thread in\n certain cases)."] pub fn aws_event_loop_schedule_task_now_serialized (event_loop : * mut aws_event_loop , task : * mut aws_task) ; } unsafe extern "C" { # [doc = " The event loop will schedule the task and run it at the specified time.\n Use aws_event_loop_current_clock_time() to query the current time in nanoseconds.\n Note that cancelled tasks may execute outside the event loop thread.\n This function may be called from outside or inside the event loop thread.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_event_loop_schedule_task_future (event_loop : * mut aws_event_loop , task : * mut aws_task , run_at_nanos : u64) ; } unsafe extern "C" { # [doc = " Cancels task.\n This function must be called from the event loop's thread, and is only guaranteed\n to work properly on tasks scheduled from within the event loop's thread.\n The task will be executed with the AWS_TASK_STATUS_CANCELED status inside this call."] pub fn aws_event_loop_cancel_task (event_loop : * mut aws_event_loop , task : * mut aws_task) ; } unsafe extern "C" { # [doc = " Returns true if the event loop's thread is the same thread that called this function, otherwise false."] pub fn aws_event_loop_thread_is_callers_thread (event_loop : * mut aws_event_loop) -> bool ; } unsafe extern "C" { # [doc = " Gets the current timestamp for the event loop's clock, in nanoseconds. This function is thread-safe."] pub fn aws_event_loop_current_clock_time (event_loop : * const aws_event_loop , time_nanos : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Creation function for event loop groups."] pub fn aws_event_loop_group_new (allocator : * mut aws_allocator , options : * const aws_event_loop_group_options) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " Increments the reference count on the event loop group, allowing the caller to take a reference to it.\n\n Returns the same event loop group passed in."] pub fn aws_event_loop_group_acquire (el_group : * mut aws_event_loop_group) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " Decrements an event loop group's ref count.  When the ref count drops to zero, the event loop group will be\n destroyed."] pub fn aws_event_loop_group_release (el_group : * mut aws_event_loop_group) ; } unsafe extern "C" { # [doc = " Increments the reference count on the event loop group from event loop, allowing the caller to take a reference to\n it.\n\n Returns the base event loop group of the event loop, or null if the event loop does not belong to a group."] pub fn aws_event_loop_group_acquire_from_event_loop (event_loop : * mut aws_event_loop) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " Decrements the ref count of the event loop's base event loop group.  When the ref count drops to zero, the event loop\n group will be destroyed."] pub fn aws_event_loop_group_release_from_event_loop (event_loop : * mut aws_event_loop) ; } unsafe extern "C" { # [doc = " Returns the event loop at a particular index.  If the index is out of bounds, null is returned."] pub fn aws_event_loop_group_get_loop_at (el_group : * mut aws_event_loop_group , index : usize) -> * mut aws_event_loop ; } unsafe extern "C" { # [doc = " Gets the number of event loops managed by an event loop group."] pub fn aws_event_loop_group_get_loop_count (el_group : * const aws_event_loop_group) -> usize ; } unsafe extern "C" { # [doc = " Gets the event loop type used by an event loop group."] pub fn aws_event_loop_group_get_type (el_group : * const aws_event_loop_group) -> aws_event_loop_type ; } unsafe extern "C" { # [doc = " Fetches the next loop for use. The purpose is to enable load balancing across loops. You should not depend on how\n this load balancing is done as it is subject to change in the future. Currently it uses the \"best-of-two\" algorithm\n based on the load factor of each loop."] pub fn aws_event_loop_group_get_next_loop (el_group : * mut aws_event_loop_group) -> * mut aws_event_loop ; } unsafe extern "C" { # [doc = " @deprecated - use aws_event_loop_group_new() instead"] pub fn aws_event_loop_group_new_default (alloc : * mut aws_allocator , max_threads : u16 , shutdown_options : * const aws_shutdown_callback_options) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " @deprecated - use aws_event_loop_group_new() instead"] pub fn aws_event_loop_group_new_default_pinned_to_cpu_group (alloc : * mut aws_allocator , max_threads : u16 , cpu_group : u16 , shutdown_options : * const aws_shutdown_callback_options) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " @internal - Don't use outside of testing.\n\n Returns the opaque internal user data of an event loop.  Can be cast into a specific implementation by\n privileged consumers."] pub fn aws_event_loop_get_impl (event_loop : * mut aws_event_loop) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " @internal - Don't use outside of testing.\n\n Initializes the base structure used by all event loop implementations with test-oriented overrides."] pub fn aws_event_loop_new_base (allocator : * mut aws_allocator , clock : aws_io_clock_fn , vtable : * mut aws_event_loop_vtable , impl_ : * mut :: libc :: c_void) -> * mut aws_event_loop ; } unsafe extern "C" { # [doc = " @internal - Don't use outside of testing.\n\n Common cleanup code for all implementations.\n This is only called from the *destroy() function of event loop implementations."] pub fn aws_event_loop_clean_up_base (event_loop : * mut aws_event_loop) ; } unsafe extern "C" { # [doc = " @internal - Don't use outside of testing.\n\n Destroys an event loop implementation.\n If the event loop is still in a running state, this function will block waiting on the event loop to shutdown.\n If the event loop is shared by multiple threads then destroy must be called by exactly one thread. All other threads\n must ensure their API calls to the event loop happen-before the call to destroy.\n\n Internally, this calls aws_event_loop_start_destroy() followed by aws_event_loop_complete_destroy()"] pub fn aws_event_loop_destroy (event_loop : * mut aws_event_loop) ; } unsafe extern "C" { # [doc = " @internal\n\n Signals an event loop to begin its destruction process.  If an event loop's implementation of this API does anything,\n it must be quick and non-blocking.  Most event loop implementations have an empty implementation for this function."] pub fn aws_event_loop_start_destroy (event_loop : * mut aws_event_loop) ; } unsafe extern "C" { # [doc = " @internal\n\n Waits for an event loop to complete its destruction process.  aws_event_loop_start_destroy() must have been called\n previously for this function to not deadlock."] pub fn aws_event_loop_complete_destroy (event_loop : * mut aws_event_loop) ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_stream_seek_basis { AWS_SSB_BEGIN = 0 , AWS_SSB_END = 2 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_stream_status { pub is_end_of_stream : bool , pub is_valid : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_stream_status"] [:: std :: mem :: size_of :: < aws_stream_status > () - 2usize] ; ["Alignment of aws_stream_status"] [:: std :: mem :: align_of :: < aws_stream_status > () - 1usize] ; ["Offset of field: aws_stream_status::is_end_of_stream"] [:: std :: mem :: offset_of ! (aws_stream_status , is_end_of_stream) - 0usize] ; ["Offset of field: aws_stream_status::is_valid"] [:: std :: mem :: offset_of ! (aws_stream_status , is_valid) - 1usize] ; } ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_input_stream_vtable { pub seek : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream , offset : i64 , basis : aws_stream_seek_basis) -> :: libc :: c_int > , # [doc = " Stream as much data as will fit into the destination buffer and update its length.\n The destination buffer's capacity MUST NOT be changed.\n\n Return AWS_OP_SUCCESS if the read is successful.\n If AWS_OP_ERR is returned, the stream is assumed to be invalid and any data written to the buffer is ignored.\n\n If no more data is currently available, or the end of the stream has been reached, simply return AWS_OP_SUCCESS\n without touching the destination buffer."] pub read : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream , dest : * mut aws_byte_buf) -> :: libc :: c_int > , pub get_status : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream , status : * mut aws_stream_status) -> :: libc :: c_int > , pub get_length : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream , out_length : * mut i64) -> :: libc :: c_int > , # [doc = " Optional.\n If not set, the default aws_ref_count_acquire/release will be used.\n Set for high level language binding that has its own refcounting implementation and needs to be kept alive from\n C.\n If set, ref_count member will not be used."] pub acquire : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream) > , pub release : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_input_stream_vtable"] [:: std :: mem :: size_of :: < aws_input_stream_vtable > () - 48usize] ; ["Alignment of aws_input_stream_vtable"] [:: std :: mem :: align_of :: < aws_input_stream_vtable > () - 8usize] ; ["Offset of field: aws_input_stream_vtable::seek"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , seek) - 0usize] ; ["Offset of field: aws_input_stream_vtable::read"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , read) - 8usize] ; ["Offset of field: aws_input_stream_vtable::get_status"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , get_status) - 16usize] ; ["Offset of field: aws_input_stream_vtable::get_length"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , get_length) - 24usize] ; ["Offset of field: aws_input_stream_vtable::acquire"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , acquire) - 32usize] ; ["Offset of field: aws_input_stream_vtable::release"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , release) - 40usize] ; } ; # [doc = " Base class for input streams.\n Note: when you implement one input stream, the ref_count needs to be initialized to clean up the resource when\n reaches to zero."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_input_stream { pub impl_ : * mut :: libc :: c_void , pub vtable : * const aws_input_stream_vtable , pub ref_count : aws_ref_count , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_input_stream"] [:: std :: mem :: size_of :: < aws_input_stream > () - 40usize] ; ["Alignment of aws_input_stream"] [:: std :: mem :: align_of :: < aws_input_stream > () - 8usize] ; ["Offset of field: aws_input_stream::impl_"] [:: std :: mem :: offset_of ! (aws_input_stream , impl_) - 0usize] ; ["Offset of field: aws_input_stream::vtable"] [:: std :: mem :: offset_of ! (aws_input_stream , vtable) - 8usize] ; ["Offset of field: aws_input_stream::ref_count"] [:: std :: mem :: offset_of ! (aws_input_stream , ref_count) - 16usize] ; } ; impl Default for aws_input_stream { 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 () } } } unsafe extern "C" { # [doc = " Increments the reference count on the input stream, allowing the caller to take a reference to it.\n\n Returns the same input stream passed in."] pub fn aws_input_stream_acquire (stream : * mut aws_input_stream) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Decrements a input stream's ref count.  When the ref count drops to zero, the input stream will be destroyed.\n\n Returns NULL always."] pub fn aws_input_stream_release (stream : * mut aws_input_stream) -> * mut aws_input_stream ; } unsafe extern "C" { pub fn aws_input_stream_seek (stream : * mut aws_input_stream , offset : i64 , basis : aws_stream_seek_basis) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_input_stream_read (stream : * mut aws_input_stream , dest : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_input_stream_get_status (stream : * mut aws_input_stream , status : * mut aws_stream_status) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_input_stream_get_length (stream : * mut aws_input_stream , out_length : * mut i64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_input_stream_destroy (stream : * mut aws_input_stream) ; } unsafe extern "C" { pub fn aws_input_stream_new_from_cursor (allocator : * mut aws_allocator , cursor : * const aws_byte_cursor) -> * mut aws_input_stream ; } unsafe extern "C" { pub fn aws_input_stream_new_from_file (allocator : * mut aws_allocator , file_name : * const :: libc :: c_char) -> * mut aws_input_stream ; } unsafe extern "C" { pub fn aws_input_stream_new_from_open_file (allocator : * mut aws_allocator , file : * mut FILE) -> * mut aws_input_stream ; } # [doc = " Data representing a URI. uri_str is always allocated and filled in.\n The other portions are merely storing offsets into uri_str."] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 : u32 , pub path : aws_byte_cursor , pub query_string : aws_byte_cursor , pub path_and_query : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_uri"] [:: std :: mem :: size_of :: < aws_uri > () - 200usize] ; ["Alignment of aws_uri"] [:: std :: mem :: align_of :: < aws_uri > () - 8usize] ; ["Offset of field: aws_uri::self_size"] [:: std :: mem :: offset_of ! (aws_uri , self_size) - 0usize] ; ["Offset of field: aws_uri::allocator"] [:: std :: mem :: offset_of ! (aws_uri , allocator) - 8usize] ; ["Offset of field: aws_uri::uri_str"] [:: std :: mem :: offset_of ! (aws_uri , uri_str) - 16usize] ; ["Offset of field: aws_uri::scheme"] [:: std :: mem :: offset_of ! (aws_uri , scheme) - 48usize] ; ["Offset of field: aws_uri::authority"] [:: std :: mem :: offset_of ! (aws_uri , authority) - 64usize] ; ["Offset of field: aws_uri::userinfo"] [:: std :: mem :: offset_of ! (aws_uri , userinfo) - 80usize] ; ["Offset of field: aws_uri::user"] [:: std :: mem :: offset_of ! (aws_uri , user) - 96usize] ; ["Offset of field: aws_uri::password"] [:: std :: mem :: offset_of ! (aws_uri , password) - 112usize] ; ["Offset of field: aws_uri::host_name"] [:: std :: mem :: offset_of ! (aws_uri , host_name) - 128usize] ; ["Offset of field: aws_uri::port"] [:: std :: mem :: offset_of ! (aws_uri , port) - 144usize] ; ["Offset of field: aws_uri::path"] [:: std :: mem :: offset_of ! (aws_uri , path) - 152usize] ; ["Offset of field: aws_uri::query_string"] [:: std :: mem :: offset_of ! (aws_uri , query_string) - 168usize] ; ["Offset of field: aws_uri::path_and_query"] [:: std :: mem :: offset_of ! (aws_uri , path_and_query) - 184usize] ; } ; 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\n will be stored in key"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_uri_param { pub key : aws_byte_cursor , pub value : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_uri_param"] [:: std :: mem :: size_of :: < aws_uri_param > () - 32usize] ; ["Alignment of aws_uri_param"] [:: std :: mem :: align_of :: < aws_uri_param > () - 8usize] ; ["Offset of field: aws_uri_param::key"] [:: std :: mem :: offset_of ! (aws_uri_param , key) - 0usize] ; ["Offset of field: aws_uri_param::value"] [:: std :: mem :: offset_of ! (aws_uri_param , value) - 16usize] ; } ; 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\n be initialized before passing them to aws_uri_init().\n\n query_string and query_params are exclusive to each other. If you set\n query_string, do not prepend it with '?'"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_uri_builder_options { pub scheme : aws_byte_cursor , pub path : aws_byte_cursor , pub host_name : aws_byte_cursor , pub port : u32 , pub query_params : * mut aws_array_list , pub query_string : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_uri_builder_options"] [:: std :: mem :: size_of :: < aws_uri_builder_options > () - 80usize] ; ["Alignment of aws_uri_builder_options"] [:: std :: mem :: align_of :: < aws_uri_builder_options > () - 8usize] ; ["Offset of field: aws_uri_builder_options::scheme"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , scheme) - 0usize] ; ["Offset of field: aws_uri_builder_options::path"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , path) - 16usize] ; ["Offset of field: aws_uri_builder_options::host_name"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , host_name) - 32usize] ; ["Offset of field: aws_uri_builder_options::port"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , port) - 48usize] ; ["Offset of field: aws_uri_builder_options::query_params"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , query_params) - 56usize] ; ["Offset of field: aws_uri_builder_options::query_string"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , query_string) - 64usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Parses 'uri_str' and initializes uri. Returns AWS_OP_SUCCESS, on success, AWS_OP_ERR on failure.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes uri to values specified in options. Returns AWS_OP_SUCCESS, on success, AWS_OP_ERR on failure.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_uri_clean_up (uri : * mut aws_uri) ; } unsafe extern "C" { # [doc = " Returns the scheme portion of the uri (e.g. http, https, ftp, ftps, etc...). If the scheme was not present\n in the uri, the returned value will be empty. It is the users job to determine the appropriate defaults\n if this field is empty, based on protocol, port, etc..."] pub fn aws_uri_scheme (uri : * const aws_uri) -> * const aws_byte_cursor ; } unsafe extern "C" { # [doc = " Returns the authority portion of the uri (host[:port]). If it was not present, this was a request uri. In that\n case, the value will be empty."] pub fn aws_uri_authority (uri : * const aws_uri) -> * const aws_byte_cursor ; } unsafe extern "C" { # [doc = " Returns the path portion of the uri, including any leading '/'. If not present, this value will be empty."] pub fn aws_uri_path (uri : * const aws_uri) -> * const aws_byte_cursor ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Returns the port portion of the authority if it was present, otherwise, returns 0.\n 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) -> u32 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " For iterating over the params in the query string.\n `param` is an in/out argument used to track progress, it MUST be zeroed out to start.\n If true is returned, `param` contains the value of the next param.\n If false is returned, there are no further params.\n\n Edge cases:\n 1) Entries without '=' sign are treated as having a key and no value.\n    Example: First param in query string \"a&b=c\" has key=\"a\" value=\"\"\n\n 2) Blank entries are skipped.\n    Example: The only param in query string \"&&a=b\" is key=\"a\" value=\"b\""] pub fn aws_query_string_next_param (query_string : aws_byte_cursor , param : * mut aws_uri_param) -> bool ; } unsafe extern "C" { # [doc = " Parses query string and stores the parameters in 'out_params'. Returns AWS_OP_SUCCESS on success and\n AWS_OP_ERR on failure. The user is responsible for initializing out_params with item size of struct aws_query_param.\n The user is also responsible for cleaning up out_params when finished."] pub fn aws_query_string_params (query_string : aws_byte_cursor , out_params : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " For iterating over the params in the uri query string.\n `param` is an in/out argument used to track progress, it MUST be zeroed out to start.\n If true is returned, `param` contains the value of the next param.\n If false is returned, there are no further params.\n\n Edge cases:\n 1) Entries without '=' sign are treated as having a key and no value.\n    Example: First param in query string \"a&b=c\" has key=\"a\" value=\"\"\n\n 2) Blank entries are skipped.\n    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 ; } unsafe extern "C" { # [doc = " Parses query string and stores the parameters in 'out_params'. Returns AWS_OP_SUCCESS on success and\n AWS_OP_ERR on failure. The user is responsible for initializing out_params with item size of struct aws_query_param.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Writes the uri path encoding of a cursor to a buffer.  This is the modified version of rfc3986 used by\n sigv4 signing."] pub fn aws_byte_buf_append_encoding_uri_path (buffer : * mut aws_byte_buf , cursor : * const aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Writes the uri query param encoding (passthrough alnum + '-' '_' '~' '.') of a UTF-8 cursor to a buffer\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Writes the uri decoding of a UTF-8 cursor to a buffer,\n replacing %xx escapes by their single byte equivalent.\n 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) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_errors { AWS_ERROR_S3_MISSING_CONTENT_RANGE_HEADER = 14336 , AWS_ERROR_S3_INVALID_CONTENT_RANGE_HEADER = 14337 , AWS_ERROR_S3_MISSING_CONTENT_LENGTH_HEADER = 14338 , AWS_ERROR_S3_INVALID_CONTENT_LENGTH_HEADER = 14339 , AWS_ERROR_S3_MISSING_ETAG = 14340 , AWS_ERROR_S3_INTERNAL_ERROR = 14341 , AWS_ERROR_S3_SLOW_DOWN = 14342 , AWS_ERROR_S3_INVALID_RESPONSE_STATUS = 14343 , AWS_ERROR_S3_MISSING_UPLOAD_ID = 14344 , AWS_ERROR_S3_PROXY_PARSE_FAILED = 14345 , AWS_ERROR_S3_UNSUPPORTED_PROXY_SCHEME = 14346 , AWS_ERROR_S3_CANCELED = 14347 , AWS_ERROR_S3_INVALID_RANGE_HEADER = 14348 , AWS_ERROR_S3_MULTIRANGE_HEADER_UNSUPPORTED = 14349 , AWS_ERROR_S3_RESPONSE_CHECKSUM_MISMATCH = 14350 , AWS_ERROR_S3_CHECKSUM_CALCULATION_FAILED = 14351 , AWS_ERROR_S3_PAUSED = 14352 , AWS_ERROR_S3_LIST_PARTS_PARSE_FAILED = 14353 , AWS_ERROR_S3_RESUMED_PART_CHECKSUM_MISMATCH = 14354 , AWS_ERROR_S3_RESUME_FAILED = 14355 , AWS_ERROR_S3_OBJECT_MODIFIED = 14356 , AWS_ERROR_S3_NON_RECOVERABLE_ASYNC_ERROR = 14357 , AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE = 14358 , AWS_ERROR_S3_INCORRECT_CONTENT_LENGTH = 14359 , AWS_ERROR_S3_REQUEST_TIME_TOO_SKEWED = 14360 , AWS_ERROR_S3_FILE_MODIFIED = 14361 , AWS_ERROR_S3_EXCEEDS_MEMORY_LIMIT = 14362 , AWS_ERROR_S3_INVALID_MEMORY_LIMIT_CONFIG = 14363 , AWS_ERROR_S3EXPRESS_CREATE_SESSION_FAILED = 14364 , AWS_ERROR_S3_INTERNAL_PART_SIZE_MISMATCH_RETRYING_WITH_RANGE = 14365 , AWS_ERROR_S3_REQUEST_HAS_COMPLETED = 14366 , AWS_ERROR_S3_RECV_FILE_ALREADY_EXISTS = 14367 , AWS_ERROR_S3_RECV_FILE_NOT_FOUND = 14368 , AWS_ERROR_S3_REQUEST_TIMEOUT = 14369 , AWS_ERROR_S3_BUFFER_ALLOCATION_FAILED = 14370 , AWS_ERROR_S3_END_RANGE = 15359 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_subject { AWS_LS_S3_GENERAL = 14336 , AWS_LS_S3_CLIENT = 14337 , AWS_LS_S3_CLIENT_STATS = 14338 , AWS_LS_S3_REQUEST = 14339 , AWS_LS_S3_META_REQUEST = 14340 , AWS_LS_S3_ENDPOINT = 14341 , AWS_LS_S3_LAST = 15359 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_platform_info { pub instance_type : aws_byte_cursor , pub max_throughput_gbps : f64 , pub has_recommended_configuration : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_platform_info"] [:: std :: mem :: size_of :: < aws_s3_platform_info > () - 32usize] ; ["Alignment of aws_s3_platform_info"] [:: std :: mem :: align_of :: < aws_s3_platform_info > () - 8usize] ; ["Offset of field: aws_s3_platform_info::instance_type"] [:: std :: mem :: offset_of ! (aws_s3_platform_info , instance_type) - 0usize] ; ["Offset of field: aws_s3_platform_info::max_throughput_gbps"] [:: std :: mem :: offset_of ! (aws_s3_platform_info , max_throughput_gbps) - 16usize] ; ["Offset of field: aws_s3_platform_info::has_recommended_configuration"] [:: std :: mem :: offset_of ! (aws_s3_platform_info , has_recommended_configuration) - 24usize] ; } ; impl Default for aws_s3_platform_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 () } } } unsafe extern "C" { # [doc = " Initializes internal datastructures used by aws-c-s3.\n Must be called before using any functionality in aws-c-s3."] pub fn aws_s3_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Shuts down the internal datastructures used by aws-c-s3."] pub fn aws_s3_library_clean_up () ; } unsafe extern "C" { pub fn aws_s3_get_current_platform_info () -> * const aws_s3_platform_info ; } unsafe extern "C" { pub fn aws_s3_get_current_platform_ec2_intance_type (cached_only : bool) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_s3_get_platforms_with_recommended_config () -> aws_array_list ; } # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_s3_buffer_ticket { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_new (alloc : * mut aws_allocator) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_set_result_by_move (future : * mut aws_future_s3_buffer_ticket , pointer_address : * mut * mut aws_s3_buffer_ticket) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_get_result_by_move (future : * mut aws_future_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_peek_result (future : * const aws_future_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_acquire (future : * mut aws_future_s3_buffer_ticket) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_release (future : * mut aws_future_s3_buffer_ticket) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_set_error (future : * mut aws_future_s3_buffer_ticket , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_is_done (future : * const aws_future_s3_buffer_ticket) -> bool ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_get_error (future : * const aws_future_s3_buffer_ticket) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_register_callback (future : * mut aws_future_s3_buffer_ticket , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_register_callback_if_not_done (future : * mut aws_future_s3_buffer_ticket , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_register_event_loop_callback (future : * mut aws_future_s3_buffer_ticket , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_register_channel_callback (future : * mut aws_future_s3_buffer_ticket , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_wait (future : * mut aws_future_s3_buffer_ticket , timeout_ns : u64) -> bool ; } # [doc = " Meta information about ticket reservation request."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_buffer_pool_reserve_meta { pub client : * mut aws_s3_client , pub meta_request : * mut aws_s3_meta_request , pub size : usize , pub can_block : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_pool_reserve_meta"] [:: std :: mem :: size_of :: < aws_s3_buffer_pool_reserve_meta > () - 32usize] ; ["Alignment of aws_s3_buffer_pool_reserve_meta"] [:: std :: mem :: align_of :: < aws_s3_buffer_pool_reserve_meta > () - 8usize] ; ["Offset of field: aws_s3_buffer_pool_reserve_meta::client"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_reserve_meta , client) - 0usize] ; ["Offset of field: aws_s3_buffer_pool_reserve_meta::meta_request"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_reserve_meta , meta_request) - 8usize] ; ["Offset of field: aws_s3_buffer_pool_reserve_meta::size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_reserve_meta , size) - 16usize] ; ["Offset of field: aws_s3_buffer_pool_reserve_meta::can_block"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_reserve_meta , can_block) - 24usize] ; } ; impl Default for aws_s3_buffer_pool_reserve_meta { 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)] pub struct aws_s3_buffer_ticket_vtable { # [doc = " Get buffer associated with the ticket.\n Note: can be called multiple times and the same buffer should be returned. In some cases ticket might not be\n claimed at all."] pub claim : :: std :: option :: Option < unsafe extern "C" fn (ticket : * mut aws_s3_buffer_ticket) -> aws_byte_buf > , pub acquire : :: std :: option :: Option < unsafe extern "C" fn (ticket : * mut aws_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket > , pub release : :: std :: option :: Option < unsafe extern "C" fn (ticket : * mut aws_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_ticket_vtable"] [:: std :: mem :: size_of :: < aws_s3_buffer_ticket_vtable > () - 24usize] ; ["Alignment of aws_s3_buffer_ticket_vtable"] [:: std :: mem :: align_of :: < aws_s3_buffer_ticket_vtable > () - 8usize] ; ["Offset of field: aws_s3_buffer_ticket_vtable::claim"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket_vtable , claim) - 0usize] ; ["Offset of field: aws_s3_buffer_ticket_vtable::acquire"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket_vtable , acquire) - 8usize] ; ["Offset of field: aws_s3_buffer_ticket_vtable::release"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket_vtable , release) - 16usize] ; } ; # [doc = " Generic memory pool interface.\n Allows consumers of aws-c-s3 to override how buffer allocation for part buffers is done.\n Refer to docs/memory_aware_request_execution.md for details on how default implementation works.\n WARNING: this is currently experimental feature and does not provide API stability guarantees so should be used with\n caution. At highlevel the flow is as follows:\n - crt scheduler queues up requests to be prepared\n - requests being prepared will try to reserve mem (i.e. obtain a ticket) and wait until they get it before proceeding\n - once mem is reserved requests will proceed with the pipeline\n - request will acquire buffer from the ticket when needed\n - ticket is released when request is done with the buffer\n Note: in some cases pipeline can stall if new buffer cannot be allocated (ex. async writes flow).\n In this case reserve request will indicate that not granting the ticket can block and buffer pool should try to\n allocate ticket right away (or wait and call waker when mem is allocated for the case of async writes).\n Note for custom pool implementations: Scheduler keeps track of all outstanding futures and will error them out when\n request is paused or cancelled. Its still fine for memory pool implementation to deliver ticket (it will just be\n released by future right away with no side effects) or just ignore the future if its already in error state."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_buffer_ticket { pub vtable : * mut aws_s3_buffer_ticket_vtable , pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_ticket"] [:: std :: mem :: size_of :: < aws_s3_buffer_ticket > () - 40usize] ; ["Alignment of aws_s3_buffer_ticket"] [:: std :: mem :: align_of :: < aws_s3_buffer_ticket > () - 8usize] ; ["Offset of field: aws_s3_buffer_ticket::vtable"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket , vtable) - 0usize] ; ["Offset of field: aws_s3_buffer_ticket::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket , ref_count) - 8usize] ; ["Offset of field: aws_s3_buffer_ticket::impl_"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket , impl_) - 32usize] ; } ; impl Default for aws_s3_buffer_ticket { 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 () } } } unsafe extern "C" { pub fn aws_s3_buffer_ticket_claim (ticket : * mut aws_s3_buffer_ticket) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_s3_buffer_ticket_acquire (ticket : * mut aws_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket ; } unsafe extern "C" { pub fn aws_s3_buffer_ticket_release (ticket : * mut aws_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket ; } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_buffer_pool_vtable { pub reserve : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool , meta : aws_s3_buffer_pool_reserve_meta) -> * mut aws_future_s3_buffer_ticket > , # [doc = " Trim the pool. This is mostly a suggestion, which pool can decide to ignore. Triggered by CRT when\n client has been idle for some time."] pub trim : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool) > , # [doc = " Optimize the buffer pool for allocations of a specific size.\n Creates a separate list of blocks dedicated to this size for better memory efficiency."] pub add_special_size : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool , buffer_size : usize) -> :: libc :: c_int > , # [doc = " Release all special-sized blocks from the buffer pool.\n This frees all memory allocated for the special size optimization."] pub release_special_size : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool , buffer_size : usize) > , # [doc = " Align a range size to the buffer pool's allocation strategy.\n Returns the optimal aligned size based on the buffer pool's configuration."] pub derive_aligned_buffer_size : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool , size : u64) -> u64 > , pub acquire : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool) -> * mut aws_s3_buffer_pool > , pub release : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool) -> * mut aws_s3_buffer_pool > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_pool_vtable"] [:: std :: mem :: size_of :: < aws_s3_buffer_pool_vtable > () - 56usize] ; ["Alignment of aws_s3_buffer_pool_vtable"] [:: std :: mem :: align_of :: < aws_s3_buffer_pool_vtable > () - 8usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::reserve"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , reserve) - 0usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::trim"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , trim) - 8usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::add_special_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , add_special_size) - 16usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::release_special_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , release_special_size) - 24usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::derive_aligned_buffer_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , derive_aligned_buffer_size) - 32usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::acquire"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , acquire) - 40usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::release"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , release) - 48usize] ; } ; # [doc = " Polymorphic buffer pool."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_buffer_pool { pub vtable : * mut aws_s3_buffer_pool_vtable , pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_pool"] [:: std :: mem :: size_of :: < aws_s3_buffer_pool > () - 40usize] ; ["Alignment of aws_s3_buffer_pool"] [:: std :: mem :: align_of :: < aws_s3_buffer_pool > () - 8usize] ; ["Offset of field: aws_s3_buffer_pool::vtable"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool , vtable) - 0usize] ; ["Offset of field: aws_s3_buffer_pool::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool , ref_count) - 8usize] ; ["Offset of field: aws_s3_buffer_pool::impl_"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool , impl_) - 32usize] ; } ; impl Default for aws_s3_buffer_pool { 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 () } } } unsafe extern "C" { pub fn aws_s3_buffer_pool_reserve (buffer_pool : * mut aws_s3_buffer_pool , meta : aws_s3_buffer_pool_reserve_meta) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { pub fn aws_s3_buffer_pool_trim (buffer_pool : * mut aws_s3_buffer_pool) ; } unsafe extern "C" { pub fn aws_s3_buffer_pool_acquire (buffer_pool : * mut aws_s3_buffer_pool) -> * mut aws_s3_buffer_pool ; } unsafe extern "C" { pub fn aws_s3_buffer_pool_release (buffer_pool : * mut aws_s3_buffer_pool) -> * mut aws_s3_buffer_pool ; } # [doc = " Buffer pool configuration options."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_buffer_pool_config { pub client : * mut aws_s3_client , pub part_size : usize , pub max_part_size : usize , pub memory_limit : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_pool_config"] [:: std :: mem :: size_of :: < aws_s3_buffer_pool_config > () - 32usize] ; ["Alignment of aws_s3_buffer_pool_config"] [:: std :: mem :: align_of :: < aws_s3_buffer_pool_config > () - 8usize] ; ["Offset of field: aws_s3_buffer_pool_config::client"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_config , client) - 0usize] ; ["Offset of field: aws_s3_buffer_pool_config::part_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_config , part_size) - 8usize] ; ["Offset of field: aws_s3_buffer_pool_config::max_part_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_config , max_part_size) - 16usize] ; ["Offset of field: aws_s3_buffer_pool_config::memory_limit"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_config , memory_limit) - 24usize] ; } ; impl Default for aws_s3_buffer_pool_config { 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 = " Factory to construct the pool for the given config. Passes along buffer related info configured on the client, which\n factory may ignore when considering how to construct pool.\n This implementation should fail if pool cannot be constructed for some reason (ex. if config params cannot be met),\n by logging failure reason, returning null and raising aws_error."] pub type aws_s3_buffer_pool_factory_fn = :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , config : aws_s3_buffer_pool_config , user_data : * mut :: libc :: c_void) -> * mut aws_s3_buffer_pool > ; unsafe extern "C" { # [doc = " Optimize the buffer pool for allocations of a specific size.\n Creates a separate list of blocks dedicated to this size for better memory efficiency.\n Allocations of exactly this size will use these special blocks instead of the regular primary/secondary storage.\n\n @param buffer_pool The buffer pool to optimize\n @param buffer_size The size to optimize for (must be > 0)\n @return AWS_OP_SUCCESS on success, AWS_OP_ERR on failure"] pub fn aws_s3_buffer_pool_add_special_size (buffer_pool : * mut aws_s3_buffer_pool , buffer_size : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Release the special-sized blocks from the buffer pool.\n Should be called when done with the special-sized allocations.\n\n @param buffer_pool The buffer pool\n @param buffer_size The special size to release blocks for"] pub fn aws_s3_buffer_pool_release_special_size (buffer_pool : * mut aws_s3_buffer_pool , buffer_size : usize) ; } unsafe extern "C" { # [doc = " Align a range size to the buffer pool's allocation strategy.\n This function determines the optimal aligned size based on the buffer pool's configuration.\n For sizes within the primary allocation range, it aligns to chunk boundaries.\n For larger sizes that go to secondary storage, it returns the size as-is.\n\n @param buffer_pool The buffer pool to use for alignment (can be NULL, in which case size is returned unchanged)\n @param size The size to align\n @return The aligned size that's optimal for the buffer pool's allocation strategy"] pub fn aws_s3_buffer_pool_derive_aligned_buffer_size (buffer_pool : * mut aws_s3_buffer_pool , size : u64) -> u64 ; } pub type aws_should_sign_header_fn = :: std :: option :: Option < unsafe extern "C" fn (name : * const aws_byte_cursor , userdata : * mut :: libc :: c_void) -> bool > ; # [repr (u32)] # [non_exhaustive] # [doc = " A primitive RTTI indicator for signing configuration structs\n\n There must be one entry per config structure type and it's a fatal error\n to put the wrong value in the \"config_type\" member of your config structure."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_signing_config_type { AWS_SIGNING_CONFIG_AWS = 1 , } # [doc = " All signing configuration structs must match this by having\n the config_type member as the first member."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_signing_config_base { pub config_type : aws_signing_config_type , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_signing_config_base"] [:: std :: mem :: size_of :: < aws_signing_config_base > () - 4usize] ; ["Alignment of aws_signing_config_base"] [:: std :: mem :: align_of :: < aws_signing_config_base > () - 4usize] ; ["Offset of field: aws_signing_config_base::config_type"] [:: std :: mem :: offset_of ! (aws_signing_config_base , config_type) - 0usize] ; } ; impl Default for aws_signing_config_base { 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 (u32)] # [non_exhaustive] # [doc = " What version of the AWS signing process should we use."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_signing_algorithm { AWS_SIGNING_ALGORITHM_V4 = 0 , AWS_SIGNING_ALGORITHM_V4_ASYMMETRIC = 1 , AWS_SIGNING_ALGORITHM_V4_S3EXPRESS = 2 , } # [repr (u32)] # [non_exhaustive] # [doc = " What sort of signature should be computed from the signable?"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_signature_type { # [doc = " A signature for a full http request should be computed, with header updates applied to the signing result."] AWS_ST_HTTP_REQUEST_HEADERS = 0 , # [doc = " A signature for a full http request should be computed, with query param updates applied to the signing result."] AWS_ST_HTTP_REQUEST_QUERY_PARAMS = 1 , # [doc = " Compute a signature for a payload chunk. The signable's input stream should be the chunk data and the\n signable should contain the most recent signature value (either the original http request or the most recent\n chunk) in the \"previous-signature\" property."] AWS_ST_HTTP_REQUEST_CHUNK = 2 , # [doc = " Compute a signature for an event stream event. The signable's input stream should be the encoded event-stream\n message (headers + payload), the signable should contain the most recent signature value (either the original\n http request or the most recent event) in the \"previous-signature\" property.\n\n This option is only supported for Sigv4 for now."] AWS_ST_HTTP_REQUEST_EVENT = 3 , # [doc = " Compute a signature for an http request via it's already-computed canonical request.  Only the authorization\n signature header is added to the signing result."] AWS_ST_CANONICAL_REQUEST_HEADERS = 4 , # [doc = " Compute a signature for an http request via it's already-computed canonical request.  Only the authorization\n signature query param is added to the signing result."] AWS_ST_CANONICAL_REQUEST_QUERY_PARAMS = 5 , # [doc = " Compute a signature for the trailing headers.\n the signable should contain the most recent signature value (either the original http request or the most recent\n chunk) in the \"previous-signature\" property."] AWS_ST_HTTP_REQUEST_TRAILING_HEADERS = 6 , } unsafe extern "C" { # [doc = " The SHA-256 of an empty string:\n 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_empty_sha256 : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'UNSIGNED-PAYLOAD'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_unsigned_payload : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-UNSIGNED-PAYLOAD-TRAILER'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_unsigned_payload_trailer : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-HMAC-SHA256-PAYLOAD'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_aws4_hmac_sha256_payload : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-HMAC-SHA256-PAYLOAD-TRAILER'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_aws4_hmac_sha256_payload_trailer : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-ECDSA-P256-SHA256-PAYLOAD'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_aws4_ecdsa_p256_sha256_payload : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-ECDSA-P256-SHA256-PAYLOAD-TRAILER'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_aws4_ecdsa_p256_sha256_payload_trailer : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-HMAC-SHA256-EVENTS'\n For use with `aws_signing_config_aws.signed_body_value`.\n\n Event signing is only supported for Sigv4 for now."] pub static g_aws_signed_body_value_streaming_aws4_hmac_sha256_events : aws_byte_cursor ; } # [repr (u32)] # [non_exhaustive] # [doc = " Controls if signing adds a header containing the canonical request's body value"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_signed_body_header_type { # [doc = " Do not add a header"] AWS_SBHT_NONE = 0 , # [doc = " Add the \"x-amz-content-sha256\" header with the canonical request's body value"] AWS_SBHT_X_AMZ_CONTENT_SHA256 = 1 , } # [doc = " A configuration structure for use in AWS-related signing.  Currently covers sigv4 only, but is not required to."] # [repr (C)] pub struct aws_signing_config_aws { # [doc = " What kind of config structure is this?"] pub config_type : aws_signing_config_type , # [doc = " What signing algorithm to use."] pub algorithm : aws_signing_algorithm , # [doc = " What sort of signature should be computed?"] pub signature_type : aws_signature_type , pub region : aws_byte_cursor , # [doc = " name of service to sign a request for"] pub service : aws_byte_cursor , # [doc = " Raw date to use during the signing process."] pub date : aws_date_time , # [doc = " Optional function to control which headers are a part of the canonical request.\n Skipping auth-required headers will result in an unusable signature.  Headers injected by the signing process\n are not skippable.\n\n This function does not override the internal check function (x-amzn-trace-id, user-agent), but rather\n supplements it.  In particular, a header will get signed if and only if it returns true to both\n the internal check (skips x-amzn-trace-id, user-agent) and this function (if defined)."] pub should_sign_header : aws_should_sign_header_fn , pub should_sign_header_ud : * mut :: libc :: c_void , pub flags : aws_signing_config_aws__bindgen_ty_1 , # [doc = " Optional string to use as the canonical request's body value.\n If string is empty, a value will be calculated from the payload during signing.\n Typically, this is the SHA-256 of the (request/chunk/event) payload, written as lowercase hex.\n If this has been precalculated, it can be set here. Special values used by certain services can also be set\n (e.g. \"UNSIGNED-PAYLOAD\" \"STREAMING-AWS4-HMAC-SHA256-PAYLOAD\" \"STREAMING-AWS4-HMAC-SHA256-EVENTS\")."] pub signed_body_value : aws_byte_cursor , # [doc = " Controls what body \"hash\" header, if any, should be added to the canonical request and the signed request:\n   AWS_SBHT_NONE - no header should be added\n   AWS_SBHT_X_AMZ_CONTENT_SHA256 - the body \"hash\" should be added in the X-Amz-Content-Sha256 header"] pub signed_body_header : aws_signed_body_header_type , pub credentials : * const aws_credentials , pub credentials_provider : * mut aws_credentials_provider , # [doc = " If non-zero and the signing transform is query param, then signing will add X-Amz-Expires to the query\n string, equal to the value specified here.  If this value is zero or if header signing is being used then\n this parameter has no effect."] pub expiration_in_seconds : u64 , } # [repr (C)] # [repr (align (4))] # [derive (Debug , Default , Copy , Clone)] pub struct aws_signing_config_aws__bindgen_ty_1 { pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub __bindgen_padding_0 : [u8 ; 3usize] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_signing_config_aws__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_signing_config_aws__bindgen_ty_1 > () - 4usize] ; ["Alignment of aws_signing_config_aws__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_signing_config_aws__bindgen_ty_1 > () - 4usize] ; } ; impl aws_signing_config_aws__bindgen_ty_1 { # [inline] pub fn use_double_uri_encode (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_use_double_uri_encode (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn use_double_uri_encode_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_use_double_uri_encode_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn should_normalize_uri_path (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_should_normalize_uri_path (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub unsafe fn should_normalize_uri_path_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 1usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_should_normalize_uri_path_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 1usize , 1u8 , val as u64 ,) } } # [inline] pub fn omit_session_token (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_omit_session_token (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub unsafe fn omit_session_token_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 2usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_omit_session_token_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 2usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (use_double_uri_encode : u32 , should_normalize_uri_path : u32 , omit_session_token : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let use_double_uri_encode : u32 = unsafe { :: std :: mem :: transmute (use_double_uri_encode) } ; use_double_uri_encode as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let should_normalize_uri_path : u32 = unsafe { :: std :: mem :: transmute (should_normalize_uri_path) } ; should_normalize_uri_path as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let omit_session_token : u32 = unsafe { :: std :: mem :: transmute (omit_session_token) } ; omit_session_token as u64 }) ; __bindgen_bitfield_unit } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_signing_config_aws"] [:: std :: mem :: size_of :: < aws_signing_config_aws > () - 256usize] ; ["Alignment of aws_signing_config_aws"] [:: std :: mem :: align_of :: < aws_signing_config_aws > () - 8usize] ; ["Offset of field: aws_signing_config_aws::config_type"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , config_type) - 0usize] ; ["Offset of field: aws_signing_config_aws::algorithm"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , algorithm) - 4usize] ; ["Offset of field: aws_signing_config_aws::signature_type"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , signature_type) - 8usize] ; ["Offset of field: aws_signing_config_aws::region"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , region) - 16usize] ; ["Offset of field: aws_signing_config_aws::service"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , service) - 32usize] ; ["Offset of field: aws_signing_config_aws::date"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , date) - 48usize] ; ["Offset of field: aws_signing_config_aws::should_sign_header"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , should_sign_header) - 184usize] ; ["Offset of field: aws_signing_config_aws::should_sign_header_ud"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , should_sign_header_ud) - 192usize] ; ["Offset of field: aws_signing_config_aws::flags"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , flags) - 200usize] ; ["Offset of field: aws_signing_config_aws::signed_body_value"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , signed_body_value) - 208usize] ; ["Offset of field: aws_signing_config_aws::signed_body_header"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , signed_body_header) - 224usize] ; ["Offset of field: aws_signing_config_aws::credentials"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , credentials) - 232usize] ; ["Offset of field: aws_signing_config_aws::credentials_provider"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , credentials_provider) - 240usize] ; ["Offset of field: aws_signing_config_aws::expiration_in_seconds"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , expiration_in_seconds) - 248usize] ; } ; impl Default for aws_signing_config_aws { 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 () } } } unsafe extern "C" { # [doc = " Returns a c-string that describes the supplied signing algorithm\n\n @param algorithm signing algorithm to get a friendly string name for\n\n @return friendly string name of the supplied algorithm, or \"Unknown\" if the algorithm is not recognized"] pub fn aws_signing_algorithm_to_string (algorithm : aws_signing_algorithm) -> * const :: libc :: c_char ; } unsafe extern "C" { # [doc = " Checks a signing configuration for invalid settings combinations.\n\n @param config signing configuration to validate\n\n @return - AWS_OP_SUCCESS if the configuration is valid, AWS_OP_ERR otherwise"] pub fn aws_validate_aws_signing_config_aws (config : * const aws_signing_config_aws) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3express_credentials_provider { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_properties_s3express { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [doc = " A Meta Request represents a group of generated requests that are being done on behalf of the\n original request. For example, one large GetObject request can be transformed into a series\n of ranged GetObject requests that are executed in parallel to improve throughput.\n\n The aws_s3_meta_request_type is a hint of transformation to be applied."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_type { # [doc = " The Default meta request type sends any request to S3 as-is (with no transformation). For example,\n it can be used to pass a CreateBucket request."] AWS_S3_META_REQUEST_TYPE_DEFAULT = 0 , # [doc = " The GetObject request will be split into a series of ranged GetObject requests that are\n executed in parallel to improve throughput, when possible."] AWS_S3_META_REQUEST_TYPE_GET_OBJECT = 1 , # [doc = " The PutObject request will be split into MultiPart uploads that are executed in parallel\n to improve throughput, when possible.\n Note: put object supports both known and unknown body length. The client\n relies on Content-Length header to determine length of the body.\n Request with unknown content length are always sent using multipart\n upload regardless of final number of parts and do have the following limitations:\n - multipart threshold is ignored and all request are made through mpu,\n   even if they only need one part\n - pause/resume is not supported\n - meta request will throw error if checksum header is provider (due to\n   general limitation of checksum not being usable if meta request is\n   getting split)"] AWS_S3_META_REQUEST_TYPE_PUT_OBJECT = 2 , # [doc = " The CopyObject meta request performs a multi-part copy\n using multiple S3 UploadPartCopy requests in parallel, or bypasses\n a CopyObject request to S3 if the object size is not large enough for\n a multipart upload.\n Note: copy support is still in development and has following limitations:\n 1. host header must use virtual host addressing style (path style is not\n   supported) and both source and dest buckets must have dns compliant name\n 2. only {bucket}/{key} format is supported for source and passing arn as\n   source will not work\n 3. source bucket is assumed to be in the same region as dest\n 4. source bucket and dest bucket must both be either directory buckets or regular buckets.\n\n Provide the `meta_request_options.copy_source_uri` to bypass limitation 1 & 2."] AWS_S3_META_REQUEST_TYPE_COPY_OBJECT = 3 , # [doc = " The CopyObject meta request performs a multi-part copy\n using multiple S3 UploadPartCopy requests in parallel, or bypasses\n a CopyObject request to S3 if the object size is not large enough for\n a multipart upload.\n Note: copy support is still in development and has following limitations:\n 1. host header must use virtual host addressing style (path style is not\n   supported) and both source and dest buckets must have dns compliant name\n 2. only {bucket}/{key} format is supported for source and passing arn as\n   source will not work\n 3. source bucket is assumed to be in the same region as dest\n 4. source bucket and dest bucket must both be either directory buckets or regular buckets.\n\n Provide the `meta_request_options.copy_source_uri` to bypass limitation 1 & 2."] AWS_S3_META_REQUEST_TYPE_MAX = 4 , } impl aws_s3_request_type { pub const AWS_S3_REQUEST_TYPE_DEFAULT : aws_s3_request_type = aws_s3_request_type :: AWS_S3_REQUEST_TYPE_UNKNOWN ; } # [repr (u32)] # [non_exhaustive] # [doc = " The type of a single S3 HTTP request. Used by metrics.\n A meta-request can make multiple S3 HTTP requests under the hood.\n\n For example, AWS_S3_META_REQUEST_TYPE_PUT_OBJECT for a large file will\n do multipart upload, resulting in 3+ HTTP requests:\n AWS_S3_REQUEST_TYPE_CREATE_MULTIPART_UPLOAD, one or more AWS_S3_REQUEST_TYPE_UPLOAD_PART,\n and finally AWS_S3_REQUEST_TYPE_COMPLETE_MULTIPART_UPLOAD.\n\n aws_s3_request_type_operation_name() returns the S3 operation name\n for types that map (e.g. AWS_S3_REQUEST_TYPE_HEAD_OBJECT -> \"HeadObject\"),\n or empty string for types that don't map (e.g. AWS_S3_REQUEST_TYPE_UNKNOWN -> \"\")."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_request_type { AWS_S3_REQUEST_TYPE_UNKNOWN = 0 , AWS_S3_REQUEST_TYPE_HEAD_OBJECT = 1 , AWS_S3_REQUEST_TYPE_GET_OBJECT = 2 , AWS_S3_REQUEST_TYPE_LIST_PARTS = 3 , AWS_S3_REQUEST_TYPE_CREATE_MULTIPART_UPLOAD = 4 , AWS_S3_REQUEST_TYPE_UPLOAD_PART = 5 , AWS_S3_REQUEST_TYPE_ABORT_MULTIPART_UPLOAD = 6 , AWS_S3_REQUEST_TYPE_COMPLETE_MULTIPART_UPLOAD = 7 , AWS_S3_REQUEST_TYPE_UPLOAD_PART_COPY = 8 , AWS_S3_REQUEST_TYPE_COPY_OBJECT = 9 , AWS_S3_REQUEST_TYPE_PUT_OBJECT = 10 , AWS_S3_REQUEST_TYPE_CREATE_SESSION = 11 , AWS_S3_REQUEST_TYPE_MAX = 12 , } # [doc = " Invoked to provide response headers received during execution of the meta request, both for\n success and error HTTP status codes.\n\n Return AWS_OP_SUCCESS to continue processing the request.\n\n Return aws_raise_error(E) to cancel the request.\n The error you raise will be reflected in `aws_s3_meta_request_result.error_code`.\n If you're not sure which error to raise, use AWS_ERROR_S3_CANCELED."] pub type aws_s3_meta_request_headers_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , headers : * const aws_http_headers , response_status : :: libc :: c_int , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked to provide the response body as it is received.\n\n Note: If you set `enable_read_backpressure` true on the S3 client,\n you must maintain the flow-control window.\n The flow-control window shrinks as you receive body data via this callback.\n Whenever the flow-control window reaches 0 you will stop downloading data.\n Use aws_s3_meta_request_increment_read_window() to increment the window and keep data flowing.\n Maintain a larger window to keep up a high download throughput,\n parts cannot download in parallel unless the window is large enough to hold multiple parts.\n Maintain a smaller window to limit the amount of data buffered in memory.\n\n If `manual_window_management` is false, you do not need to maintain the flow-control window.\n No back-pressure is applied and data arrives as fast as possible.\n\n Return AWS_OP_SUCCESS to continue processing the request.\n\n Return aws_raise_error(E) to cancel the request.\n The error you raise will be reflected in `aws_s3_meta_request_result.error_code`.\n If you're not sure which error to raise, use AWS_ERROR_S3_CANCELED."] pub type aws_s3_meta_request_receive_body_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , body : * const aws_byte_cursor , range_start : u64 , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked when the entire meta request execution is complete."] pub type aws_s3_meta_request_finish_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , meta_request_result : * const aws_s3_meta_request_result , user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request_receive_body_extra_info { pub range_start : u64 , pub ticket : * mut aws_s3_buffer_ticket , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_receive_body_extra_info"] [:: std :: mem :: size_of :: < aws_s3_meta_request_receive_body_extra_info > () - 16usize] ; ["Alignment of aws_s3_meta_request_receive_body_extra_info"] [:: std :: mem :: align_of :: < aws_s3_meta_request_receive_body_extra_info > () - 8usize] ; ["Offset of field: aws_s3_meta_request_receive_body_extra_info::range_start"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_receive_body_extra_info , range_start) - 0usize] ; ["Offset of field: aws_s3_meta_request_receive_body_extra_info::ticket"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_receive_body_extra_info , ticket) - 8usize] ; } ; impl Default for aws_s3_meta_request_receive_body_extra_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 () } } } pub type aws_s3_meta_request_receive_body_callback_ex_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , body : * const aws_byte_cursor , info : aws_s3_meta_request_receive_body_extra_info , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Information sent in the meta_request progress callback."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_meta_request_progress { pub bytes_transferred : u64 , pub content_length : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_progress"] [:: std :: mem :: size_of :: < aws_s3_meta_request_progress > () - 16usize] ; ["Alignment of aws_s3_meta_request_progress"] [:: std :: mem :: align_of :: < aws_s3_meta_request_progress > () - 8usize] ; ["Offset of field: aws_s3_meta_request_progress::bytes_transferred"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_progress , bytes_transferred) - 0usize] ; ["Offset of field: aws_s3_meta_request_progress::content_length"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_progress , content_length) - 8usize] ; } ; # [doc = " Invoked to report progress of a meta-request.\n For PutObject, progress refers to bytes uploaded.\n For CopyObject, progress refers to bytes copied.\n For GetObject, progress refers to bytes downloaded.\n For anything else, progress refers to response body bytes received."] pub type aws_s3_meta_request_progress_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , progress : * const aws_s3_meta_request_progress , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked to report the telemetry of the meta request once a single request finishes.\n Note: *metrics is only valid for the duration of the callback. If you need to keep it around, use\n `aws_s3_request_metrics_acquire`"] pub type aws_s3_meta_request_telemetry_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , metrics : * mut aws_s3_request_metrics , user_data : * mut :: libc :: c_void) > ; pub type aws_s3_meta_request_shutdown_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; pub type aws_s3_client_shutdown_complete_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " Optional callback, for you to provide the full object checksum after the object was read.\n Client will NOT check the checksum provided before sending it to the server.\n\n @param meta_request  pointer to the aws_s3_meta_request of the upload.\n @param user_data     pointer to the user_data set.\n\n @return A new string with the full object checksum, as it is sent in a PutObject request (base64-encoded):\n         https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#API_PutObject_RequestSyntax\n         If an error occurs, call aws_raise_error(E) with a proper error code and return NULL."] pub type aws_s3_meta_request_full_object_checksum_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , user_data : * mut :: libc :: c_void) -> * mut aws_string > ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_tls_mode { AWS_MR_TLS_ENABLED = 0 , AWS_MR_TLS_DISABLED = 1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_compute_content_md5 { AWS_MR_CONTENT_MD5_DISABLED = 0 , AWS_MR_CONTENT_MD5_ENABLED = 1 , } impl aws_s3_checksum_algorithm { pub const AWS_SCA_CRC32C : aws_s3_checksum_algorithm = aws_s3_checksum_algorithm :: AWS_SCA_INIT ; } impl aws_s3_checksum_algorithm { pub const AWS_SCA_END : aws_s3_checksum_algorithm = aws_s3_checksum_algorithm :: AWS_SCA_CRC64NVME ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_checksum_algorithm { AWS_SCA_NONE = 0 , AWS_SCA_INIT = 1 , AWS_SCA_CRC32 = 2 , AWS_SCA_SHA1 = 3 , AWS_SCA_SHA256 = 4 , AWS_SCA_CRC64NVME = 5 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_checksum_location { AWS_SCL_NONE = 0 , AWS_SCL_HEADER = 1 , AWS_SCL_TRAILER = 2 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_recv_file_options { # [doc = " Create a new file if it doesn't exist, otherwise replace the existing file."] AWS_S3_RECV_FILE_CREATE_OR_REPLACE = 0 , # [doc = " Always create a new file. If the file already exists, AWS_ERROR_S3_RECV_FILE_ALREADY_EXISTS will be raised."] AWS_S3_RECV_FILE_CREATE_NEW = 1 , # [doc = " Create a new file if it doesn't exist, otherwise append to the existing file."] AWS_S3_RECV_FILE_CREATE_OR_APPEND = 2 , # [doc = " Write to an existing file at the specified position, defined by the `recv_file_position`.\n If the file does not exist, AWS_ERROR_S3_RECV_FILE_NOT_FOUND will be raised.\n If `recv_file_position` is not configured, start overwriting data at the beginning of the\n file (byte 0)."] AWS_S3_RECV_FILE_WRITE_TO_POSITION = 3 , } # [doc = " WARNING: experimental/unstable:\n Controls how client performance file I/O operations. Only applies to the file based workload."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_file_io_options { # [doc = " Skip buffering the part in memory before sending the request.\n\n Default to false on small objects, and true when the object size exceed a certain threshold\n`g_streaming_object_size_threshold`."] pub should_stream : bool , # [doc = " The estimated disk throughput. Only be applied when `streaming_upload` is true.\n in gigabits per second (Gbps).\n\n Notes: There are possibilities that cannot reach the all available disk throughput:\n 1. Disk is busy with other applications\n 2. OS Cache may cap the throughput, use `direct_io` to get around this.\n\n Default to throughput_target_gbps."] pub disk_throughput_gbps : f64 , # [doc = " Enable direct IO to bypass the OS cache. Helpful when the disk I/O outperforms the kernel cache.\n Notes:\n - Only supported on linux for now.\n - Only supports upload for now.\n - Check NOTES for O_DIRECT for additional info https://man7.org/linux/man-pages/man2/openat.2.html\n In summary, O_DIRECT is a potentially powerful tool that should be used with caution."] pub direct_io : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_file_io_options"] [:: std :: mem :: size_of :: < aws_s3_file_io_options > () - 24usize] ; ["Alignment of aws_s3_file_io_options"] [:: std :: mem :: align_of :: < aws_s3_file_io_options > () - 8usize] ; ["Offset of field: aws_s3_file_io_options::should_stream"] [:: std :: mem :: offset_of ! (aws_s3_file_io_options , should_stream) - 0usize] ; ["Offset of field: aws_s3_file_io_options::disk_throughput_gbps"] [:: std :: mem :: offset_of ! (aws_s3_file_io_options , disk_throughput_gbps) - 8usize] ; ["Offset of field: aws_s3_file_io_options::direct_io"] [:: std :: mem :: offset_of ! (aws_s3_file_io_options , direct_io) - 16usize] ; } ; # [doc = " Info about a single part, for you to review before the upload completes."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_part_review { pub size : u64 , pub checksum : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_review"] [:: std :: mem :: size_of :: < aws_s3_upload_part_review > () - 24usize] ; ["Alignment of aws_s3_upload_part_review"] [:: std :: mem :: align_of :: < aws_s3_upload_part_review > () - 8usize] ; ["Offset of field: aws_s3_upload_part_review::size"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_review , size) - 0usize] ; ["Offset of field: aws_s3_upload_part_review::checksum"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_review , checksum) - 8usize] ; } ; impl Default for aws_s3_upload_part_review { 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 = " Info for you to review before an upload completes.\n\n WARNING: This feature is experimental/unstable.\n At this time, review is only available for multipart upload\n (when Content-Length is above the `multipart_upload_threshold`,\n or Content-Length not specified)."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_review { pub checksum_algorithm : aws_s3_checksum_algorithm , pub part_count : usize , pub part_array : * mut aws_s3_upload_part_review , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_review"] [:: std :: mem :: size_of :: < aws_s3_upload_review > () - 24usize] ; ["Alignment of aws_s3_upload_review"] [:: std :: mem :: align_of :: < aws_s3_upload_review > () - 8usize] ; ["Offset of field: aws_s3_upload_review::checksum_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_upload_review , checksum_algorithm) - 0usize] ; ["Offset of field: aws_s3_upload_review::part_count"] [:: std :: mem :: offset_of ! (aws_s3_upload_review , part_count) - 8usize] ; ["Offset of field: aws_s3_upload_review::part_array"] [:: std :: mem :: offset_of ! (aws_s3_upload_review , part_array) - 16usize] ; } ; impl Default for aws_s3_upload_review { 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 = " Optional callback, for you to review an upload before it completes.\n For example, you can review each part's checksum and fail the upload if\n you do not agree with them.\n\n @param meta_request pointer to the aws_s3_meta_request of the upload.\n @param info Detailed info about the upload.\n\n Return AWS_OP_SUCCESS to continue processing the request.\n\n Return aws_raise_error(E) to cancel the request.\n The error you raise will be reflected in `aws_s3_meta_request_result.error_code`.\n If you're not sure which error to raise, use AWS_ERROR_S3_CANCELED.\n\n WARNING: This feature is experimental/unstable.\n At this time, the callback is only invoked for multipart upload\n (when Content-Length is above the `multipart_upload_threshold`,\n or Content-Length not specified)."] pub type aws_s3_meta_request_upload_review_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , review : * const aws_s3_upload_review , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " The factory function for S3 client to create a S3 Express credentials provider.\n The S3 client will be the only owner of the S3 Express credentials provider.\n\n During S3 client destruction, S3 client will start the destruction of the provider, and wait the\n on_provider_shutdown_callback to be invoked before the S3 client finish destruction.\n\n Note to implement the factory properly:\n - Make sure `on_provider_shutdown_callback` will be invoked after the provider finish shutdown, otherwise,\n leak will happen.\n - The provider must not acquire a reference to the client; otherwise, a circular reference will cause a deadlock.\n - The `client` provided CANNOT be used within the factory function call or the destructor.\n\n @param allocator    memory allocator to create the provider.\n @param client    The S3 client uses and owns the provider.\n @param on_provider_shutdown_callback    The callback to be invoked when the provider finishes shutdown.\n @param shutdown_user_data    The user data to invoke shutdown callback with\n @param user_data    The user data with the factory\n\n @return The aws_s3express_credentials_provider."] pub type aws_s3express_provider_factory_fn = :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , client : * mut aws_s3_client , on_provider_shutdown_callback : aws_simple_completion_callback , shutdown_user_data : * mut :: libc :: c_void , factory_user_data : * mut :: libc :: c_void) -> * mut aws_s3express_credentials_provider > ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_tcp_keep_alive_options { pub keep_alive_interval_sec : u16 , pub keep_alive_timeout_sec : u16 , pub keep_alive_max_failed_probes : u16 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_tcp_keep_alive_options"] [:: std :: mem :: size_of :: < aws_s3_tcp_keep_alive_options > () - 6usize] ; ["Alignment of aws_s3_tcp_keep_alive_options"] [:: std :: mem :: align_of :: < aws_s3_tcp_keep_alive_options > () - 2usize] ; ["Offset of field: aws_s3_tcp_keep_alive_options::keep_alive_interval_sec"] [:: std :: mem :: offset_of ! (aws_s3_tcp_keep_alive_options , keep_alive_interval_sec) - 0usize] ; ["Offset of field: aws_s3_tcp_keep_alive_options::keep_alive_timeout_sec"] [:: std :: mem :: offset_of ! (aws_s3_tcp_keep_alive_options , keep_alive_timeout_sec) - 2usize] ; ["Offset of field: aws_s3_tcp_keep_alive_options::keep_alive_max_failed_probes"] [:: std :: mem :: offset_of ! (aws_s3_tcp_keep_alive_options , keep_alive_max_failed_probes) - 4usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_client_config { pub max_active_connections_override : u32 , pub region : aws_byte_cursor , pub client_bootstrap : * mut aws_client_bootstrap , pub tls_mode : aws_s3_meta_request_tls_mode , pub tls_connection_options : * const aws_tls_connection_options , # [doc = " Optional.\n If set, this controls how the client interact with file I/O.\n Read `aws_s3_file_io_options` for details.\n  Notes: Only applies to meta requests with `send_filepath` set.\n  TODO: adapt it to `recv_filepath`.\n\n eg:\n - When the file is too large to fit in the buffer, set `should_stream` to avoid buffering the whole parts in\n  memory.\n - When the disk I/O is faster than OS cache, set `direct_io` to bypass the OS cache."] pub fio_opts : * mut aws_s3_file_io_options , # [doc = " Required.\n Configure the signing for the requests made from the client.\n - Credentials or credentials provider is required. Other configs are all optional, and will be default to what\n      needs to sign the request for S3, only overrides when Non-zero/Not-empty is set.\n - To skip signing, you can config it with anonymous credentials.\n - S3 Client will derive the right config for signing process based on this.\n\n Notes:\n - For AWS_SIGNING_ALGORITHM_V4_S3EXPRESS, S3 client will use the credentials in the config to derive the\n S3 Express credentials that are used in the signing process.\n - For other auth algorithm, client may make modifications to signing config before passing it on to signer.\n\n TODO: deprecate this structure from auth, introduce a new S3 specific one."] pub signing_config : * const aws_signing_config_aws , # [doc = " Optional.\n Size of parts the object will be downloaded or uploaded in, in bytes.\n This only affects AWS_S3_META_REQUEST_TYPE_GET_OBJECT and AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n\n If not set, a dynamic default part size will be used based on the throughput target, memory_limit_in_bytes.\n\n The client will adjust the part size for AWS_S3_META_REQUEST_TYPE_PUT_OBJECT if needed for service limits (max\n number of parts per upload is 10,000, minimum upload part size is 5 MiB).\n\n You can also set this per meta-request, via `aws_s3_meta_request_options.part_size`."] pub part_size : u64 , pub max_part_size : u64 , # [doc = " Optional.\n The size threshold in bytes for when to use multipart uploads.\n Uploads larger than this will use the multipart upload strategy.\n Uploads smaller or equal to this will use a single HTTP request.\n This only affects AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n If set, this should be at least `part_size`.\n If not set, maximal of `part_size` and 5 MiB will be used.\n\n You can also set this per meta-request, via `aws_s3_meta_request_options.multipart_upload_threshold`."] pub multipart_upload_threshold : u64 , pub throughput_target_gbps : f64 , pub memory_limit_in_bytes : u64 , pub retry_strategy : * mut aws_retry_strategy , # [doc = " TODO: move MD5 config to checksum config.\n For multi-part upload, content-md5 will be calculated if the AWS_MR_CONTENT_MD5_ENABLED is specified\n     or initial request has content-md5 header.\n For single-part upload, keep the content-md5 in the initial request unchanged."] pub compute_content_md5 : aws_s3_meta_request_compute_content_md5 , pub shutdown_callback : aws_s3_client_shutdown_complete_callback_fn , pub shutdown_callback_user_data : * mut :: libc :: c_void , # [doc = " Optional.\n Proxy configuration for http connection.\n If the connection_type is AWS_HPCT_HTTP_LEGACY, it will be converted to AWS_HPCT_HTTP_TUNNEL if tls_mode is\n ENABLED. Otherwise, it will be converted to AWS_HPCT_HTTP_FORWARD."] pub proxy_options : * const aws_http_proxy_options , # [doc = " Optional.\n Configuration for fetching proxy configuration from environment.\n By Default proxy_ev_settings.aws_http_proxy_env_var_type is set to AWS_HPEV_ENABLE which means read proxy\n configuration from environment.\n Only works when proxy_options is not set. If both are set, configuration from proxy_options is used."] pub proxy_ev_settings : * const proxy_env_var_settings , # [doc = " Optional.\n If set to 0, default value is used."] pub connect_timeout_ms : u32 , # [doc = " Optional.\n Set keepalive to periodically transmit messages for detecting a disconnected peer."] pub tcp_keep_alive_options : * const aws_s3_tcp_keep_alive_options , # [doc = " Optional.\n Configuration options for connection monitoring.\n If the transfer speed falls below the specified minimum_throughput_bytes_per_second, the operation is aborted.\n If set to NULL, default values are used."] pub monitoring_options : * const aws_http_connection_monitoring_options , # [doc = " Enable backpressure and prevent response data from downloading faster than you can handle it.\n\n If false (default), no backpressure is applied and data will download as fast as possible.\n\n If true, each meta request has a flow-control window that shrinks as\n response body data is downloaded (headers do not affect the window).\n `initial_read_window` determines the starting size of each meta request's window.\n\n - You will stop receiving response body data whenever the flow-control window reaches 0\n - If the window size remaining is smaller than the part download, client will buffer the part until\n   the window opens up to delivery the full part.\n - You must call aws_s3_meta_request_increment_read_window() to keep data flowing.\n\n WARNING: This feature is experimental.\n Currently, backpressure is only applied to GetObject requests which are split into multiple parts,\n - If you set body_callback, no more data will be delivered once the window reaches 0.\n - If you set body_callback_ex, you may still receive some data after the window reaches 0. TODO: fix it."] pub enable_read_backpressure : bool , # [doc = " The starting size of each meta request's flow-control window, in bytes.\n Ignored unless `enable_read_backpressure` is true."] pub initial_read_window : usize , # [doc = " To enable S3 Express support or not."] pub enable_s3express : bool , # [doc = " Optional.\n Only used when `enable_s3express` is set.\n\n If set, client will invoke the factory to get the provider to use, when needed.\n\n If not set, client will create a default S3 Express provider under the hood.\n\n NOTE: THE FOLLOWING BEHAVIOR IS EXPERIMENTAL AND UNSTABLE\n Default S3 Express provider will pass the headers allowed in `g_s3_create_session_allowed_headers` to the\n CreateSession call."] pub s3express_provider_override_factory : aws_s3express_provider_factory_fn , pub factory_user_data : * mut :: libc :: c_void , # [doc = " THIS IS AN EXPERIMENTAL AND UNSTABLE API\n (Optional)\n An array of network interface names. The client will distribute the\n connections across network interface names provided in this array. If any interface name is invalid, goes down,\n or has any issues like network access, you will see connection failures.\n\n This option is only supported on Linux, MacOS, and platforms that have either SO_BINDTODEVICE or IP_BOUND_IF. It\n is not supported on Windows. `AWS_ERROR_PLATFORM_NOT_SUPPORTED` will be raised on unsupported platforms. On\n Linux, SO_BINDTODEVICE is used and requires kernel version >= 5.7 or root privileges."] pub network_interface_names_array : * const aws_byte_cursor , pub num_network_interface_names : usize , # [doc = " Experimental (touch at your own risk).\n (Optional)\n Factory function to create buffer pool.\n if not set creates default implementation of the buffer pool."] pub buffer_pool_factory_fn : aws_s3_buffer_pool_factory_fn , pub buffer_pool_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client_config"] [:: std :: mem :: size_of :: < aws_s3_client_config > () - 248usize] ; ["Alignment of aws_s3_client_config"] [:: std :: mem :: align_of :: < aws_s3_client_config > () - 8usize] ; ["Offset of field: aws_s3_client_config::max_active_connections_override"] [:: std :: mem :: offset_of ! (aws_s3_client_config , max_active_connections_override) - 0usize] ; ["Offset of field: aws_s3_client_config::region"] [:: std :: mem :: offset_of ! (aws_s3_client_config , region) - 8usize] ; ["Offset of field: aws_s3_client_config::client_bootstrap"] [:: std :: mem :: offset_of ! (aws_s3_client_config , client_bootstrap) - 24usize] ; ["Offset of field: aws_s3_client_config::tls_mode"] [:: std :: mem :: offset_of ! (aws_s3_client_config , tls_mode) - 32usize] ; ["Offset of field: aws_s3_client_config::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_s3_client_config , tls_connection_options) - 40usize] ; ["Offset of field: aws_s3_client_config::fio_opts"] [:: std :: mem :: offset_of ! (aws_s3_client_config , fio_opts) - 48usize] ; ["Offset of field: aws_s3_client_config::signing_config"] [:: std :: mem :: offset_of ! (aws_s3_client_config , signing_config) - 56usize] ; ["Offset of field: aws_s3_client_config::part_size"] [:: std :: mem :: offset_of ! (aws_s3_client_config , part_size) - 64usize] ; ["Offset of field: aws_s3_client_config::max_part_size"] [:: std :: mem :: offset_of ! (aws_s3_client_config , max_part_size) - 72usize] ; ["Offset of field: aws_s3_client_config::multipart_upload_threshold"] [:: std :: mem :: offset_of ! (aws_s3_client_config , multipart_upload_threshold) - 80usize] ; ["Offset of field: aws_s3_client_config::throughput_target_gbps"] [:: std :: mem :: offset_of ! (aws_s3_client_config , throughput_target_gbps) - 88usize] ; ["Offset of field: aws_s3_client_config::memory_limit_in_bytes"] [:: std :: mem :: offset_of ! (aws_s3_client_config , memory_limit_in_bytes) - 96usize] ; ["Offset of field: aws_s3_client_config::retry_strategy"] [:: std :: mem :: offset_of ! (aws_s3_client_config , retry_strategy) - 104usize] ; ["Offset of field: aws_s3_client_config::compute_content_md5"] [:: std :: mem :: offset_of ! (aws_s3_client_config , compute_content_md5) - 112usize] ; ["Offset of field: aws_s3_client_config::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_client_config , shutdown_callback) - 120usize] ; ["Offset of field: aws_s3_client_config::shutdown_callback_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client_config , shutdown_callback_user_data) - 128usize] ; ["Offset of field: aws_s3_client_config::proxy_options"] [:: std :: mem :: offset_of ! (aws_s3_client_config , proxy_options) - 136usize] ; ["Offset of field: aws_s3_client_config::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_s3_client_config , proxy_ev_settings) - 144usize] ; ["Offset of field: aws_s3_client_config::connect_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_client_config , connect_timeout_ms) - 152usize] ; ["Offset of field: aws_s3_client_config::tcp_keep_alive_options"] [:: std :: mem :: offset_of ! (aws_s3_client_config , tcp_keep_alive_options) - 160usize] ; ["Offset of field: aws_s3_client_config::monitoring_options"] [:: std :: mem :: offset_of ! (aws_s3_client_config , monitoring_options) - 168usize] ; ["Offset of field: aws_s3_client_config::enable_read_backpressure"] [:: std :: mem :: offset_of ! (aws_s3_client_config , enable_read_backpressure) - 176usize] ; ["Offset of field: aws_s3_client_config::initial_read_window"] [:: std :: mem :: offset_of ! (aws_s3_client_config , initial_read_window) - 184usize] ; ["Offset of field: aws_s3_client_config::enable_s3express"] [:: std :: mem :: offset_of ! (aws_s3_client_config , enable_s3express) - 192usize] ; ["Offset of field: aws_s3_client_config::s3express_provider_override_factory"] [:: std :: mem :: offset_of ! (aws_s3_client_config , s3express_provider_override_factory) - 200usize] ; ["Offset of field: aws_s3_client_config::factory_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client_config , factory_user_data) - 208usize] ; ["Offset of field: aws_s3_client_config::network_interface_names_array"] [:: std :: mem :: offset_of ! (aws_s3_client_config , network_interface_names_array) - 216usize] ; ["Offset of field: aws_s3_client_config::num_network_interface_names"] [:: std :: mem :: offset_of ! (aws_s3_client_config , num_network_interface_names) - 224usize] ; ["Offset of field: aws_s3_client_config::buffer_pool_factory_fn"] [:: std :: mem :: offset_of ! (aws_s3_client_config , buffer_pool_factory_fn) - 232usize] ; ["Offset of field: aws_s3_client_config::buffer_pool_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client_config , buffer_pool_user_data) - 240usize] ; } ; impl Default for aws_s3_client_config { 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)] pub struct aws_s3_checksum_config { # [doc = " PUT Object specific *******************************/\n/**\n The location of client added checksum header.\n\n If AWS_SCL_NONE. No request payload checksum will be added.\n\n If AWS_SCL_HEADER, the client will calculate the checksum and add it to the headers.\n\n If AWS_SCL_TRAILER, the payload will be aws_chunked encoded, The client will calculate the checksum and add it to\n the trailer. Note the payload of the original request cannot be aws-chunked encoded already, this will cause an\n error."] pub location : aws_s3_checksum_location , # [doc = " The checksum algorithm used.\n Must be set if location is not AWS_SCL_NONE."] pub checksum_algorithm : aws_s3_checksum_algorithm , # [doc = " Optional.\n Provide the full object checksum. This callback is invoked once, after the entire body has been read.\n sent.\n\n NOTE:\n  - Do not set this callback if the HTTP message already has a checksum header (e.g. x-amz-checksum-crc32). Doing\n      so will raise AWS_ERROR_INVALID_ARGUMENT.\n  - checksum_algorithm must be set to the algorithm you will use.\n\n WARNING: This feature is experimental/unstable.\n At this time, full object checksum callback is only available for multipart upload\n (when Content-Length is above the `multipart_upload_threshold`,\n or Content-Length not specified). Otherwise, it will be ignored."] pub full_object_checksum_callback : aws_s3_meta_request_full_object_checksum_fn , pub user_data : * mut :: libc :: c_void , # [doc = " GET Object specific *******************************/\n/**\n Enable checksum mode header will be attached to GET requests, this will tell s3 to send back checksums headers if\n they exist. Calculate the corresponding checksum on the response bodies. The meta request will finish with a did\n validate field and set the error code to AWS_ERROR_S3_RESPONSE_CHECKSUM_MISMATCH if the calculated\n checksum, and checksum found in the response header do not match."] pub validate_response_checksum : bool , # [doc = " Optional array of `enum aws_s3_checksum_algorithm`.\n\n Ignored when validate_response_checksum is not set.\n If not set all the algorithms will be selected as default behavior.\n Owned by the caller.\n\n The list of algorithms for user to pick up when validate the checksum. Client will pick up the algorithm from the\n list with the priority based on performance, and the algorithm sent by server. The priority based on performance\n is [CRC64NVME, CRC32C, CRC32, SHA1, SHA256].\n\n If the response checksum was validated by client, the result will indicate which algorithm was picked."] pub validate_checksum_algorithms : * const aws_array_list , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_checksum_config"] [:: std :: mem :: size_of :: < aws_s3_checksum_config > () - 40usize] ; ["Alignment of aws_s3_checksum_config"] [:: std :: mem :: align_of :: < aws_s3_checksum_config > () - 8usize] ; ["Offset of field: aws_s3_checksum_config::location"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , location) - 0usize] ; ["Offset of field: aws_s3_checksum_config::checksum_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , checksum_algorithm) - 4usize] ; ["Offset of field: aws_s3_checksum_config::full_object_checksum_callback"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , full_object_checksum_callback) - 8usize] ; ["Offset of field: aws_s3_checksum_config::user_data"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , user_data) - 16usize] ; ["Offset of field: aws_s3_checksum_config::validate_response_checksum"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , validate_response_checksum) - 24usize] ; ["Offset of field: aws_s3_checksum_config::validate_checksum_algorithms"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , validate_checksum_algorithms) - 32usize] ; } ; impl Default for aws_s3_checksum_config { 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 a new meta request, ie, file transfer that will be handled by the high performance client.\n\n There are several ways to pass the request's body data:\n 1) If the data is already in memory, set the body-stream on `message`.\n 2) If the data is on disk, set `send_filepath` for best performance.\n 3) If the data is available, but copying each chunk is asynchronous, set `send_async_stream`.\n 4) If you're not sure when each chunk of data will be available, use `send_using_async_writes`."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request_options { pub type_ : aws_s3_meta_request_type , # [doc = " The S3 operation name (e.g. \"CreateBucket\").\n This MUST be set if type is AWS_S3_META_REQUEST_TYPE_DEFAULT;\n it is automatically populated for other meta-request types.\n The canonical operation names are listed here:\n https://docs.aws.amazon.com/AmazonS3/latest/API/API_Operations_Amazon_Simple_Storage_Service.html\n\n This name is used to fill out details in metrics and error reports.\n It also drives some operation-specific behavior.\n If you pass the wrong name, you risk getting the wrong behavior.\n\n For example, every operation except \"GetObject\" has its response checked\n for error, even if the HTTP status-code was 200 OK\n (see https://repost.aws/knowledge-center/s3-resolve-200-internalerror).\n If you used AWS_S3_META_REQUEST_TYPE_DEFAULT to do GetObject, but mis-named\n it \"Download\", and the object looked like XML with an error code,\n then the meta-request would fail. You may log the full response body,\n and leak sensitive data."] pub operation_name : aws_byte_cursor , # [doc = " Configure the signing for each request created for this meta request. If NULL, options in the client will be\n  used.\n - The credentials will be obtained based on the precedence of:\n      1. `credentials` from `signing_config` in `aws_s3_meta_request_options`\n      2. `credentials_provider` from `signing_config` in `aws_s3_meta_request_options`\n      3. `credentials` from `signing_config` cached in the client\n      4. `credentials_provider` cached in the client\n - To skip signing, you can config it with anonymous credentials.\n - S3 Client will derive the right config for signing process based on this.\n\n Notes:\n - For AWS_SIGNING_ALGORITHM_V4_S3EXPRESS, S3 client will use the credentials in the config to derive the\n S3 Express credentials that are used in the signing process.\n - For other auth algorithm, client may make modifications to signing config before passing it on to signer."] pub signing_config : * const aws_signing_config_aws , pub message : * mut aws_http_message , # [doc = " Optional.\n If set, the received data will be written into this file.\n the `body_callback` will NOT be invoked.\n This gives a better performance when receiving data to write to a file.\n See `aws_s3_recv_file_options` for the configuration on the receive file."] pub recv_filepath : aws_byte_cursor , # [doc = " Optional.\n Default to AWS_S3_RECV_FILE_CREATE_OR_REPLACE.\n This only works with recv_filepath set.\n See `aws_s3_recv_file_options`."] pub recv_file_option : aws_s3_recv_file_options , # [doc = " Optional.\n The specified position to start writing at for the recv file when `recv_file_option` is set to\n AWS_S3_RECV_FILE_WRITE_TO_POSITION, ignored otherwise."] pub recv_file_position : u64 , # [doc = " Set it to be true to delete the receive file on failure, otherwise, the file will be left as-is.\n This only works with recv_filepath set."] pub recv_file_delete_on_failure : bool , # [doc = " Optional.\n If set, this file is sent as the request body.\n This gives the best performance when sending data from a file.\n Do not set if the body is being passed by other means (see note above)."] pub send_filepath : aws_byte_cursor , # [doc = " Optional.\n Overrides the client config if set.\n If set, this controls how the meta request interact with file I/O.\n Read `aws_s3_file_io_options` for details.\n  Notes: Only applies when `send_filepath` is set.\n  TODO: adapt it to `recv_filepath`.\n\n Note: if both client and meta request don't set this, for objects larger than 2TiB, this will be set to a default\n options with `should_stream` to be True and others follow the default to avoid memory issues.\n\n eg:\n - When the file is too large to fit in the buffer, set `should_stream` to avoid buffering the whole parts in\n  memory.\n - When the disk I/O is faster than OS cache, set `direct_io` to bypass the OS cache."] pub fio_opts : * mut aws_s3_file_io_options , # [doc = " Optional - EXPERIMENTAL/UNSTABLE\n If set, the request body comes from this async stream.\n Use this when outgoing data will be produced in asynchronous chunks.\n The S3 client will read from the stream whenever it's ready to upload another chunk.\n\n WARNING: The S3 client can deadlock if many async streams are \"stalled\",\n never completing their async read. If you're not sure when (if ever)\n data will be ready, use `send_using_async_writes` instead.\n\n Do not set if the body is being passed by other means (see note above)."] pub send_async_stream : * mut aws_async_input_stream , # [doc = " Optional - EXPERIMENTAL/UNSTABLE\n Set this to send request body data using the async aws_s3_meta_request_poll_write()\n or aws_s3_meta_request_write() functions.\n Use this when outgoing data will be produced in asynchronous chunks,\n and you're not sure when (if ever) each chunk will be ready.\n\n This only works with AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n\n Do not set if the body is being passed by other means (see note above)."] pub send_using_async_writes : bool , # [doc = " Optional.\n if set, the flexible checksum will be performed by client based on the config.\n\n Notes: checksum can also be added through the http message provided.\n      The checksum in http header will override corresponding the checksum config."] pub checksum_config : * const aws_s3_checksum_config , # [doc = " Optional.\n Size of parts the object will be downloaded or uploaded in, in bytes.\n This only affects AWS_S3_META_REQUEST_TYPE_GET_OBJECT and AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n\n If not set, the value from `aws_s3_client_config.part_size` is used, which defaults to a dynamic value based on\n the throughput target, memory_limit_in_bytes and the requested object size.\n\n The client will adjust the part size for AWS_S3_META_REQUEST_TYPE_PUT_OBJECT if needed for service limits (max\n number of parts per upload is 10,000, minimum upload part size is 5 MiB)."] pub part_size : u64 , # [doc = " Optional - EXPERIMENTAL/UNSTABLE\n Set this to prefer for the dynamic default part_size over the part size set for both client and meta request for\n the best performance under the memory constrain, especially for getting large objects."] pub force_dynamic_part_size : bool , # [doc = " Optional.\n The size threshold in bytes for when to use multipart uploads.\n Uploads larger than this will use the multipart upload strategy.\n Uploads smaller or equal to this will use a single HTTP request.\n This only affects AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n If set, this should be at least `part_size`.\n If not set, `part_size` adjusted by client will be used as the threshold.\n If both `part_size` and `multipart_upload_threshold` are not set,\n the values from `aws_s3_client_config` are used."] pub multipart_upload_threshold : u64 , pub user_data : * mut :: libc :: c_void , # [doc = " Optional.\n Invoked to provide response headers received during execution of the meta request.\n Note: this callback will not be fired for cases when resuming an\n operation that was already completed (ex. pausing put object after it\n uploaded all data and then resuming it)\n See `aws_s3_meta_request_headers_callback_fn`."] pub headers_callback : aws_s3_meta_request_headers_callback_fn , # [doc = " Invoked to provide the response body as it is received.\n See `aws_s3_meta_request_receive_body_callback_fn`."] pub body_callback : aws_s3_meta_request_receive_body_callback_fn , # [doc = " Invoked to provide the response body as it is received.\n Provides extra information as compared to regular callback.\n Note: setting both body_callback and body_callback_ex is not\n considered valid and meta request creation will fail.\n See `aws_s3_meta_request_receive_body_callback_ex_fn`."] pub body_callback_ex : aws_s3_meta_request_receive_body_callback_ex_fn , # [doc = " Invoked when the entire meta request execution is complete.\n See `aws_s3_meta_request_finish_fn`."] pub finish_callback : aws_s3_meta_request_finish_fn , pub shutdown_callback : aws_s3_meta_request_shutdown_fn , # [doc = " Invoked to report progress of the meta request execution.\n See `aws_s3_meta_request_progress_fn`."] pub progress_callback : aws_s3_meta_request_progress_fn , # [doc = " Optional.\n To get telemetry metrics when a single request finishes.\n If set the request will keep track of the metrics from `aws_s3_request_metrics`, and fire the callback when the\n request finishes receiving response.\n See `aws_s3_meta_request_telemetry_fn`"] pub telemetry_callback : aws_s3_meta_request_telemetry_fn , # [doc = " Optional.\n Callback for reviewing an upload before it completes.\n WARNING: experimental/unstable\n See `aws_s3_meta_request_upload_review_fn`"] pub upload_review_callback : aws_s3_meta_request_upload_review_fn , # [doc = " Optional.\n Endpoint override for request. Can be used to override scheme and port of\n the endpoint.\n There is some overlap between Host header and Endpoint and corner cases\n are handled as follows:\n - Only Host header is set - Host is used to construct endpoint. https is\n   default with corresponding port\n - Only endpoint is set - Host header is created from endpoint. Port and\n   Scheme from endpoint is used.\n - Both Host and Endpoint is set - Host header must match Authority of\n   Endpoint uri. Port and Scheme from endpoint is used."] pub endpoint : * const aws_uri , # [doc = " Optional.\n For meta requests that support pause/resume (e.g. PutObject), serialized resume token returned by\n aws_s3_meta_request_pause() can be provided here.\n Note: If PutObject request specifies a checksum algorithm, client will calculate checksums while skipping parts\n from the buffer and compare them them to previously uploaded part checksums."] pub resume_token : * mut aws_s3_meta_request_resume_token , pub object_size_hint : * const u64 , pub copy_source_uri : aws_byte_cursor , pub max_active_connections_override : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_options"] [:: std :: mem :: size_of :: < aws_s3_meta_request_options > () - 272usize] ; ["Alignment of aws_s3_meta_request_options"] [:: std :: mem :: align_of :: < aws_s3_meta_request_options > () - 8usize] ; ["Offset of field: aws_s3_meta_request_options::type_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , type_) - 0usize] ; ["Offset of field: aws_s3_meta_request_options::operation_name"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , operation_name) - 8usize] ; ["Offset of field: aws_s3_meta_request_options::signing_config"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , signing_config) - 24usize] ; ["Offset of field: aws_s3_meta_request_options::message"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , message) - 32usize] ; ["Offset of field: aws_s3_meta_request_options::recv_filepath"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , recv_filepath) - 40usize] ; ["Offset of field: aws_s3_meta_request_options::recv_file_option"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , recv_file_option) - 56usize] ; ["Offset of field: aws_s3_meta_request_options::recv_file_position"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , recv_file_position) - 64usize] ; ["Offset of field: aws_s3_meta_request_options::recv_file_delete_on_failure"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , recv_file_delete_on_failure) - 72usize] ; ["Offset of field: aws_s3_meta_request_options::send_filepath"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , send_filepath) - 80usize] ; ["Offset of field: aws_s3_meta_request_options::fio_opts"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , fio_opts) - 96usize] ; ["Offset of field: aws_s3_meta_request_options::send_async_stream"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , send_async_stream) - 104usize] ; ["Offset of field: aws_s3_meta_request_options::send_using_async_writes"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , send_using_async_writes) - 112usize] ; ["Offset of field: aws_s3_meta_request_options::checksum_config"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , checksum_config) - 120usize] ; ["Offset of field: aws_s3_meta_request_options::part_size"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , part_size) - 128usize] ; ["Offset of field: aws_s3_meta_request_options::force_dynamic_part_size"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , force_dynamic_part_size) - 136usize] ; ["Offset of field: aws_s3_meta_request_options::multipart_upload_threshold"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , multipart_upload_threshold) - 144usize] ; ["Offset of field: aws_s3_meta_request_options::user_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , user_data) - 152usize] ; ["Offset of field: aws_s3_meta_request_options::headers_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , headers_callback) - 160usize] ; ["Offset of field: aws_s3_meta_request_options::body_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , body_callback) - 168usize] ; ["Offset of field: aws_s3_meta_request_options::body_callback_ex"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , body_callback_ex) - 176usize] ; ["Offset of field: aws_s3_meta_request_options::finish_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , finish_callback) - 184usize] ; ["Offset of field: aws_s3_meta_request_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , shutdown_callback) - 192usize] ; ["Offset of field: aws_s3_meta_request_options::progress_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , progress_callback) - 200usize] ; ["Offset of field: aws_s3_meta_request_options::telemetry_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , telemetry_callback) - 208usize] ; ["Offset of field: aws_s3_meta_request_options::upload_review_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , upload_review_callback) - 216usize] ; ["Offset of field: aws_s3_meta_request_options::endpoint"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , endpoint) - 224usize] ; ["Offset of field: aws_s3_meta_request_options::resume_token"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , resume_token) - 232usize] ; ["Offset of field: aws_s3_meta_request_options::object_size_hint"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , object_size_hint) - 240usize] ; ["Offset of field: aws_s3_meta_request_options::copy_source_uri"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , copy_source_uri) - 248usize] ; ["Offset of field: aws_s3_meta_request_options::max_active_connections_override"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , max_active_connections_override) - 264usize] ; } ; impl Default for aws_s3_meta_request_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)] pub struct aws_s3_meta_request_result { pub error_response_headers : * mut aws_http_headers , pub error_response_body : * mut aws_byte_buf , pub error_response_operation_name : * mut aws_string , pub response_status : :: libc :: c_int , pub did_validate : bool , pub validation_algorithm : aws_s3_checksum_algorithm , pub error_code : :: libc :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_result"] [:: std :: mem :: size_of :: < aws_s3_meta_request_result > () - 40usize] ; ["Alignment of aws_s3_meta_request_result"] [:: std :: mem :: align_of :: < aws_s3_meta_request_result > () - 8usize] ; ["Offset of field: aws_s3_meta_request_result::error_response_headers"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , error_response_headers) - 0usize] ; ["Offset of field: aws_s3_meta_request_result::error_response_body"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , error_response_body) - 8usize] ; ["Offset of field: aws_s3_meta_request_result::error_response_operation_name"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , error_response_operation_name) - 16usize] ; ["Offset of field: aws_s3_meta_request_result::response_status"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , response_status) - 24usize] ; ["Offset of field: aws_s3_meta_request_result::did_validate"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , did_validate) - 28usize] ; ["Offset of field: aws_s3_meta_request_result::validation_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , validation_algorithm) - 32usize] ; ["Offset of field: aws_s3_meta_request_result::error_code"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , error_code) - 36usize] ; } ; impl Default for aws_s3_meta_request_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 () } } } unsafe extern "C" { pub fn aws_s3_client_new (allocator : * mut aws_allocator , client_config : * const aws_s3_client_config) -> * mut aws_s3_client ; } unsafe extern "C" { # [doc = " Add a reference, keeping this object alive.\n The reference must be released when you are done with it, or it's memory will never be cleaned up.\n You must not pass in NULL.\n Always returns the same pointer that was passed in."] pub fn aws_s3_client_acquire (client : * mut aws_s3_client) -> * mut aws_s3_client ; } unsafe extern "C" { # [doc = " Release a reference.\n When the reference count drops to 0, this object will be cleaned up.\n It's OK to pass in NULL (nothing happens).\n Always returns NULL."] pub fn aws_s3_client_release (client : * mut aws_s3_client) -> * mut aws_s3_client ; } unsafe extern "C" { pub fn aws_s3_client_make_meta_request (client : * mut aws_s3_client , options : * const aws_s3_meta_request_options) -> * mut aws_s3_meta_request ; } # [doc = " The result of an `aws_s3_meta_request_poll_write()` call.\n Think of this like Rust's `Poll<Result<size_t, int>>`, or C++'s `optional<expected<size_t, int>>`."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_meta_request_poll_write_result { pub is_pending : bool , pub error_code : :: libc :: c_int , pub bytes_processed : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_poll_write_result"] [:: std :: mem :: size_of :: < aws_s3_meta_request_poll_write_result > () - 16usize] ; ["Alignment of aws_s3_meta_request_poll_write_result"] [:: std :: mem :: align_of :: < aws_s3_meta_request_poll_write_result > () - 8usize] ; ["Offset of field: aws_s3_meta_request_poll_write_result::is_pending"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_poll_write_result , is_pending) - 0usize] ; ["Offset of field: aws_s3_meta_request_poll_write_result::error_code"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_poll_write_result , error_code) - 4usize] ; ["Offset of field: aws_s3_meta_request_poll_write_result::bytes_processed"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_poll_write_result , bytes_processed) - 8usize] ; } ; unsafe extern "C" { # [doc = " Attempt to write data.\n\n You must set `aws_s3_meta_request_options.send_using_async_writes` to use this function.\n\n This is a non-blocking poll-style async function, similar to Rust's:\n https://docs.rs/futures/latest/futures/io/trait.AsyncWrite.html#tymethod.poll_write\n If you prefer completion-style async functions, and your data can outlive\n the callstack, use aws_s3_meta_request_write() instead.\n\n Check the returned `result` struct to see what happened:\n 1)   If `result.is_pending == true` then no work was done.\n      The waker callback will be invoked when you can call poll_write() again.\n      Do not call poll_write() again before the waker is invoked.\n\n 2)   Else if `result.error_code != 0` then poll_write() did not succeed\n      and you should not call it again. The meta request is guaranteed to finish soon\n      (you don't need to worry about canceling the meta request yourself after a failed write).\n      A common error code is AWS_ERROR_S3_REQUEST_HAS_COMPLETED, indicating\n      the meta request completed for reasons unrelated to the poll_write() call\n      (e.g. CreateMultipartUpload received a 403 Forbidden response).\n      AWS_ERROR_INVALID_STATE usually indicates that you're calling poll_write()\n      incorrectly (e.g. not waiting for waker callback from previous poll_write() call).\n\n 3)   Else `result.bytes_processed` tells you how much data was processed.\n      `bytes_processed` may be less than the `data.len` you passed in.\n      Continue calling poll_write() with the remaining data until everything is processed.\n      `result.bytes_processed` won't be 0 unless you passed in `data.len` of 0.\n\n @param meta_request  Meta request\n\n @param data          The data to send. The data can be any size.\n                      `result.bytes_processed` indicates how many bytes were\n                      processed by this call.\n\n @param eof           Pass true to signal EOF (end of file).\n                      If poll_write() doesn't process all your data\n                      (`result.is_pending` or `result.byte_processed < data.len`)\n                      then EOF was ignored, and you need to pass it again\n                      to subsequent poll_write() calls.\n\n @param waker         Waker callback.\n                      If `result.is_pending == true`, then the waker will be called\n                      exactly once when it's a good time to call poll_write() again.\n                      If `result.is_pending == false`, the waker will never be called.\n\n @param user_data     Pointer to be passed to the waker callback.\n\n WARNING: This feature is experimental."] pub fn aws_s3_meta_request_poll_write (meta_request : * mut aws_s3_meta_request , data : aws_byte_cursor , eof : bool , waker : aws_simple_completion_callback , user_data : * mut :: libc :: c_void) -> aws_s3_meta_request_poll_write_result ; } unsafe extern "C" { # [doc = " Write the next chunk of data.\n\n You must set `aws_s3_meta_request_options.send_using_async_writes` to use this function.\n\n This function is asynchronous, and returns a future (see <aws/io/future.h>).\n You may not call write() again until the future completes.\n\n If the future completes with an error code, then write() did not succeed\n and you should not call it again. If the future contains any error code,\n the meta request is guaranteed to finish soon (you don't need to worry about\n canceling the meta request yourself after a failed write).\n A common error code is AWS_ERROR_S3_REQUEST_HAS_COMPLETED, indicating\n the meta request completed for reasons unrelated to the write() call\n (e.g. CreateMultipartUpload received a 403 Forbidden response).\n AWS_ERROR_INVALID_STATE usually indicates that you're calling write()\n incorrectly (e.g. not waiting for previous write to complete).\n\n You MUST keep the data in memory until the future completes.\n If you cannot do this, use aws_s3_meta_request_poll_write() instead.\n\n You can wait any length of time between calls to write().\n If there's not enough data to upload a part, the data will be copied\n to a buffer and the future will immediately complete.\n\n @param meta_request  Meta request\n\n @param data          The data to send. The data can be any size.\n\n @param eof           Pass true to signal EOF (end of file).\n                      Do not call write() again after passing true.\n\n This function never returns NULL.\n\n WARNING: This feature is experimental."] pub fn aws_s3_meta_request_write (meta_request : * mut aws_s3_meta_request , data : aws_byte_cursor , eof : bool) -> * mut aws_future_void ; } unsafe extern "C" { # [doc = " Increment the flow-control window, so that response data continues downloading.\n\n If the client was created with `enable_read_backpressure` set true,\n each meta request has a flow-control window that shrinks as response\n body data is downloaded (headers do not affect the size of the window).\n The client's `initial_read_window` determines the starting size of each meta request's window.\n If a meta request's flow-control window reaches 0, no further data will be downloaded.\n If the `initial_read_window` is 0, the request will not start until the window is incremented.\n Maintain a larger window to keep up a high download throughput,\n parts cannot download in parallel unless the window is large enough to hold multiple parts.\n Maintain a smaller window to limit the amount of data buffered in memory.\n\n If `enable_read_backpressure` is false this call will have no effect,\n no backpressure is being applied and data is being downloaded as fast as possible.\n\n WARNING: This feature is experimental.\n Currently, backpressure is applied to GetObject requests,\n - If you set body_callback, no more data will be delivered once the window reaches 0.\n - If you set body_callback_ex, you may still receive some data after the window reaches 0. TODO: fix it."] pub fn aws_s3_meta_request_increment_read_window (meta_request : * mut aws_s3_meta_request , bytes : u64) ; } unsafe extern "C" { pub fn aws_s3_meta_request_cancel (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { # [doc = " Note: pause is currently only supported on upload requests.\n In order to pause an ongoing upload, call aws_s3_meta_request_pause() that\n will return resume token. Token can be used to query the state of operation\n at the pausing time.\n To resume an upload that was paused, supply resume token in the meta\n request options structure member aws_s3_meta_request_options.resume_token.\n The upload can be resumed either from the same client or a different one.\n Corner cases for resume upload are as follows:\n - upload is not MPU - fail with AWS_ERROR_UNSUPPORTED_OPERATION\n - pausing before MPU is created - NULL resume token returned. NULL resume\n   token is equivalent to restarting upload\n - pausing in the middle of part transfer - return resume token. scheduling of\n   new part uploads stops.\n - pausing after completeMPU started - return resume token. if s3 cannot find\n   find associated MPU id when resuming with that token and num of parts\n   uploaded equals to total num parts, then operation is a no op. Otherwise\n   operation fails.\n Note: for no op case the call will succeed and finish/shutdown request callbacks will\n   fire, but on headers callback will not fire.\n Note: similar to cancel pause does not cancel requests already in flight and\n and parts might complete after pause is requested.\n @param meta_request pointer to the aws_s3_meta_request of the upload to be paused\n @param resume_token resume token\n @return either AWS_OP_ERR or AWS_OP_SUCCESS"] pub fn aws_s3_meta_request_pause (meta_request : * mut aws_s3_meta_request , out_resume_token : * mut * mut aws_s3_meta_request_resume_token) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_resume_token_options { pub upload_id : aws_byte_cursor , pub part_size : u64 , pub total_num_parts : usize , # [doc = " Optional.\n\n Note: during resume num_parts_uploaded is used for sanity checking against\n uploads on s3 side.\n In cases where upload id does not exist (already resumed using this token\n or pause called after upload completes, etc...) and num_parts_uploaded\n equals to total num parts, resume will become a noop."] pub num_parts_completed : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_resume_token_options"] [:: std :: mem :: size_of :: < aws_s3_upload_resume_token_options > () - 40usize] ; ["Alignment of aws_s3_upload_resume_token_options"] [:: std :: mem :: align_of :: < aws_s3_upload_resume_token_options > () - 8usize] ; ["Offset of field: aws_s3_upload_resume_token_options::upload_id"] [:: std :: mem :: offset_of ! (aws_s3_upload_resume_token_options , upload_id) - 0usize] ; ["Offset of field: aws_s3_upload_resume_token_options::part_size"] [:: std :: mem :: offset_of ! (aws_s3_upload_resume_token_options , part_size) - 16usize] ; ["Offset of field: aws_s3_upload_resume_token_options::total_num_parts"] [:: std :: mem :: offset_of ! (aws_s3_upload_resume_token_options , total_num_parts) - 24usize] ; ["Offset of field: aws_s3_upload_resume_token_options::num_parts_completed"] [:: std :: mem :: offset_of ! (aws_s3_upload_resume_token_options , num_parts_completed) - 32usize] ; } ; impl Default for aws_s3_upload_resume_token_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 () } } } unsafe extern "C" { # [doc = " Create upload resume token from persisted data.\n Note: Data required for resume token varies per operation."] pub fn aws_s3_meta_request_resume_token_new_upload (allocator : * mut aws_allocator , options : * const aws_s3_upload_resume_token_options) -> * mut aws_s3_meta_request_resume_token ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_acquire (resume_token : * mut aws_s3_meta_request_resume_token) -> * mut aws_s3_meta_request_resume_token ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_release (resume_token : * mut aws_s3_meta_request_resume_token) -> * mut aws_s3_meta_request_resume_token ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_type (resume_token : * mut aws_s3_meta_request_resume_token) -> aws_s3_meta_request_type ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_part_size (resume_token : * mut aws_s3_meta_request_resume_token) -> u64 ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_total_num_parts (resume_token : * mut aws_s3_meta_request_resume_token) -> usize ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_num_parts_completed (resume_token : * mut aws_s3_meta_request_resume_token) -> usize ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_upload_id (resume_token : * mut aws_s3_meta_request_resume_token) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Add a reference, keeping this object alive.\n The reference must be released when you are done with it, or it's memory will never be cleaned up.\n You must not pass in NULL.\n Always returns the same pointer that was passed in."] pub fn aws_s3_meta_request_acquire (meta_request : * mut aws_s3_meta_request) -> * mut aws_s3_meta_request ; } unsafe extern "C" { # [doc = " Release a reference.\n When the reference count drops to 0, this object will be cleaned up.\n It's OK to pass in NULL (nothing happens).\n Always returns NULL."] pub fn aws_s3_meta_request_release (meta_request : * mut aws_s3_meta_request) -> * mut aws_s3_meta_request ; } unsafe extern "C" { # [doc = " Initialize the configuration for a default S3 signing."] pub fn aws_s3_init_default_signing_config (signing_config : * mut aws_signing_config_aws , region : aws_byte_cursor , credentials_provider : * mut aws_credentials_provider) ; } unsafe extern "C" { # [doc = " Return operation name for aws_s3_request_type,\n or empty string if the type doesn't map to an actual operation.\n For example:\n AWS_S3_REQUEST_TYPE_HEAD_OBJECT -> \"HeadObject\"\n AWS_S3_REQUEST_TYPE_UNKNOWN -> \"\"\n AWS_S3_REQUEST_TYPE_MAX -> \"\""] pub fn aws_s3_request_type_operation_name (type_ : aws_s3_request_type) -> * const :: libc :: c_char ; } unsafe extern "C" { # [doc = " Add a reference, keeping this object alive.\n The reference must be released when you are done with it, or it's memory will never be cleaned up.\n Always returns the same pointer that was passed in."] pub fn aws_s3_request_metrics_acquire (metrics : * mut aws_s3_request_metrics) -> * mut aws_s3_request_metrics ; } unsafe extern "C" { # [doc = " Release a reference.\n When the reference count drops to 0, this object will be cleaned up.\n It's OK to pass in NULL (nothing happens).\n Always returns NULL."] pub fn aws_s3_request_metrics_release (metrics : * mut aws_s3_request_metrics) -> * mut aws_s3_request_metrics ; } unsafe extern "C" { # [doc = "  Getters for s3 request metrics ************************************************/\n/**\n Get the request ID from aws_s3_request_metrics.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_request_id will be set to a string. Be warned this string's lifetime is tied to the metrics\n object."] pub fn aws_s3_request_metrics_get_request_id (metrics : * const aws_s3_request_metrics , out_request_id : * mut * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the extended request ID from aws_s3_request_metrics.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_extended_request_id will be set to a string. Be warned this string's lifetime is tied to the\n metrics object."] pub fn aws_s3_request_metrics_get_extended_request_id (metrics : * const aws_s3_request_metrics , out_extended_request_id : * mut * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_start_time : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_end_time : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_total_duration_ns (metrics : * const aws_s3_request_metrics , out_total_duration : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_send_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_send_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_send_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_send_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_sending_duration_ns (metrics : * const aws_s3_request_metrics , out_sending_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_receive_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_receive_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_receive_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_receive_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_sign_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_signing_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_sign_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_signing_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_signing_duration_ns (metrics : * const aws_s3_request_metrics , out_signing_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_mem_acquire_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_mem_acquire_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_mem_acquire_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_mem_acquire_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_mem_acquire_duration_ns (metrics : * const aws_s3_request_metrics , out_mem_acquire_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_delivery_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_delivery_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_delivery_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_delivery_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_delivery_duration_ns (metrics : * const aws_s3_request_metrics , out_delivery_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_receiving_duration_ns (metrics : * const aws_s3_request_metrics , out_receiving_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_response_status_code (metrics : * const aws_s3_request_metrics , out_response_status : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_response_headers (metrics : * const aws_s3_request_metrics , out_response_headers : * mut * mut aws_http_headers) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the path and query of the request.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_request_path_query will be set to a string. Be warned this string's lifetime is tied to the metrics\n object."] pub fn aws_s3_request_metrics_get_request_path_query (metrics : * const aws_s3_request_metrics , out_request_path_query : * mut * const aws_string) ; } unsafe extern "C" { # [doc = " Get the host_address of the request.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_host_address will be set to a string. Be warned this string's lifetime is tied to the metrics\n object."] pub fn aws_s3_request_metrics_get_host_address (metrics : * const aws_s3_request_metrics , out_host_address : * mut * const aws_string) ; } unsafe extern "C" { # [doc = " Get the IP address of the request connected to.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_ip_address will be set to a string. Be warned this string's lifetime is tied to the metrics object."] pub fn aws_s3_request_metrics_get_ip_address (metrics : * const aws_s3_request_metrics , out_ip_address : * mut * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_connection_id (metrics : * const aws_s3_request_metrics , out_connection_ptr : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_request_ptr (metrics : * const aws_s3_request_metrics , out_request_ptr : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_thread_id (metrics : * const aws_s3_request_metrics , out_thread_id : * mut aws_thread_id_t) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_request_stream_id (metrics : * const aws_s3_request_metrics , out_stream_id : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the S3 operation name of the request (e.g. \"HeadObject\").\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_operation_name will be set to a string.\n Be warned this string's lifetime is tied to the metrics object."] pub fn aws_s3_request_metrics_get_operation_name (metrics : * const aws_s3_request_metrics , out_operation_name : * mut * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_request_type (metrics : * const aws_s3_request_metrics , out_request_type : * mut aws_s3_request_type) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_error_code (metrics : * const aws_s3_request_metrics) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_retry_attempt (metrics : * const aws_s3_request_metrics) -> u32 ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_memory_allocated_from_pool (metrics : * const aws_s3_request_metrics) -> bool ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_part_range_start (metrics : * const aws_s3_request_metrics , out_part_range_start : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_part_range_end (metrics : * const aws_s3_request_metrics , out_part_range_end : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_part_number (metrics : * const aws_s3_request_metrics , out_part_number : * mut u32) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_s3_request_first_attempt_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_s3_request_first_attempt_start_time : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_s3_request_last_attempt_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_s3_request_last_attempt_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_s3_request_total_duration_ns (metrics : * const aws_s3_request_metrics , out_request_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_conn_acquire_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_conn_acquire_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_conn_acquire_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_conn_acquire_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_conn_acquire_duration_ns (metrics : * const aws_s3_request_metrics , out_conn_acquire_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_retry_delay_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_retry_delay_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_retry_delay_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_retry_delay_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_retry_delay_duration_ns (metrics : * const aws_s3_request_metrics , out_retry_delay_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_service_call_duration_ns (metrics : * const aws_s3_request_metrics , out_service_call_duration : * mut u64) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_request_context { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_rule_engine { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " Creates a new S3 endpoint resolver.\n Warning: Before using this header, you have to enable it by\n setting cmake config AWS_ENABLE_S3_ENDPOINT_RESOLVER=ON"] pub fn aws_s3_endpoint_resolver_new (allocator : * mut aws_allocator) -> * mut aws_endpoints_rule_engine ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_ruleset { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_partitions_config { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_parameter { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_resolved_endpoint { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_endpoints_parameter_type { AWS_ENDPOINTS_PARAMETER_STRING = 0 , AWS_ENDPOINTS_PARAMETER_BOOLEAN = 1 , AWS_ENDPOINTS_PARAMETER_STRING_ARRAY = 2 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_endpoints_resolved_endpoint_type { AWS_ENDPOINTS_RESOLVED_ENDPOINT = 0 , AWS_ENDPOINTS_RESOLVED_ERROR = 1 , } unsafe extern "C" { pub fn aws_endpoints_get_supported_ruleset_version () -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Warning: The following helpers are intended for use by SDKs that validate correctness of the ruleset at compile time.\n The engine sanity checks the provided ruleset, but does not do extensive checking.\n Some malformed rulesets might fail in unexpected ways."] pub fn aws_endpoints_parameter_get_type (parameter : * const aws_endpoints_parameter) -> aws_endpoints_parameter_type ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_built_in (parameter : * const aws_endpoints_parameter) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_default_string (parameter : * const aws_endpoints_parameter , out_cursor : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_default_boolean (parameter : * const aws_endpoints_parameter , out_bool : * mut * const bool) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_is_required (parameter : * const aws_endpoints_parameter) -> bool ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_documentation (parameter : * const aws_endpoints_parameter) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_parameters_get_is_deprecated (parameter : * const aws_endpoints_parameter) -> bool ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_deprecated_message (parameter : * const aws_endpoints_parameter) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_deprecated_since (parameter : * const aws_endpoints_parameter) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_new_from_string (allocator : * mut aws_allocator , ruleset_json : aws_byte_cursor) -> * mut aws_endpoints_ruleset ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_acquire (ruleset : * mut aws_endpoints_ruleset) -> * mut aws_endpoints_ruleset ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_release (ruleset : * mut aws_endpoints_ruleset) -> * mut aws_endpoints_ruleset ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_get_parameters (ruleset : * mut aws_endpoints_ruleset) -> * const aws_hash_table ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_get_version (ruleset : * const aws_endpoints_ruleset) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_get_service_id (ruleset : * const aws_endpoints_ruleset) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Create new rule engine for a given ruleset.\n In cases of failure NULL is returned and last error is set."] pub fn aws_endpoints_rule_engine_new (allocator : * mut aws_allocator , ruleset : * mut aws_endpoints_ruleset , partitions_config : * mut aws_partitions_config) -> * mut aws_endpoints_rule_engine ; } unsafe extern "C" { pub fn aws_endpoints_rule_engine_acquire (rule_engine : * mut aws_endpoints_rule_engine) -> * mut aws_endpoints_rule_engine ; } unsafe extern "C" { pub fn aws_endpoints_rule_engine_release (rule_engine : * mut aws_endpoints_rule_engine) -> * mut aws_endpoints_rule_engine ; } unsafe extern "C" { pub fn aws_endpoints_request_context_new (allocator : * mut aws_allocator) -> * mut aws_endpoints_request_context ; } unsafe extern "C" { pub fn aws_endpoints_request_context_acquire (request_context : * mut aws_endpoints_request_context) -> * mut aws_endpoints_request_context ; } unsafe extern "C" { pub fn aws_endpoints_request_context_release (request_context : * mut aws_endpoints_request_context) -> * mut aws_endpoints_request_context ; } unsafe extern "C" { pub fn aws_endpoints_request_context_add_string (allocator : * mut aws_allocator , context : * mut aws_endpoints_request_context , name : aws_byte_cursor , value : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_request_context_add_boolean (allocator : * mut aws_allocator , context : * mut aws_endpoints_request_context , name : aws_byte_cursor , value : bool) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_request_context_add_string_array (allocator : * mut aws_allocator , context : * mut aws_endpoints_request_context , name : aws_byte_cursor , value_array : * const aws_byte_cursor , len : usize) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_rule_engine_resolve (engine : * mut aws_endpoints_rule_engine , context : * const aws_endpoints_request_context , out_resolved_endpoint : * mut * mut aws_endpoints_resolved_endpoint) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_acquire (resolved_endpoint : * mut aws_endpoints_resolved_endpoint) -> * mut aws_endpoints_resolved_endpoint ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_release (resolved_endpoint : * mut aws_endpoints_resolved_endpoint) -> * mut aws_endpoints_resolved_endpoint ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_type (resolved_endpoint : * const aws_endpoints_resolved_endpoint) -> aws_endpoints_resolved_endpoint_type ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_url (resolved_endpoint : * const aws_endpoints_resolved_endpoint , out_url : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_properties (resolved_endpoint : * const aws_endpoints_resolved_endpoint , out_properties : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_headers (resolved_endpoint : * const aws_endpoints_resolved_endpoint , out_headers : * mut * const aws_hash_table) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_error (resolved_endpoint : * const aws_endpoints_resolved_endpoint , out_error : * mut aws_byte_cursor) -> :: libc :: c_int ; } pub const AWS_COMMON_HASH_TABLE_ITER_CONTINUE : _bindgen_ty_23 = _bindgen_ty_23 :: AWS_COMMON_HASH_TABLE_ITER_CONTINUE ; pub const AWS_COMMON_HASH_TABLE_ITER_DELETE : _bindgen_ty_23 = _bindgen_ty_23 :: AWS_COMMON_HASH_TABLE_ITER_DELETE ; pub const AWS_COMMON_HASH_TABLE_ITER_ERROR : _bindgen_ty_23 = _bindgen_ty_23 :: AWS_COMMON_HASH_TABLE_ITER_ERROR ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_23 { AWS_COMMON_HASH_TABLE_ITER_CONTINUE = 1 , AWS_COMMON_HASH_TABLE_ITER_DELETE = 2 , AWS_COMMON_HASH_TABLE_ITER_ERROR = 4 , } # [doc = " Hash table data structure. This module provides an automatically resizing\n hash table implementation for general purpose use. The hash table stores a\n mapping between void * keys and values; it is expected that in most cases,\n these will point to a structure elsewhere in the heap, instead of inlining a\n key or value into the hash table element itself.\n\n Currently, this hash table implements a variant of robin hood hashing, but\n we do not guarantee that this won't change in the future.\n\n Associated with each hash function are four callbacks:\n\n   hash_fn - A hash function from the keys to a uint64_t. It is critical that\n      the hash function for a key does not change while the key is in the hash\n      table; violating this results in undefined behavior. Collisions are\n      tolerated, though naturally with reduced performance.\n\n   equals_fn - An equality comparison function. This function must be\n      reflexive and consistent with hash_fn.\n\n   destroy_key_fn, destroy_value_fn - Optional callbacks invoked when the\n      table is cleared or cleaned up and at the caller's option when an element\n      is removed from the table. Either or both may be set to NULL, which\n      has the same effect as a no-op destroy function.\n\n This datastructure can be safely moved between threads, subject to the\n requirements of the underlying allocator. It is also safe to invoke\n non-mutating operations on the hash table from multiple threads. A suitable\n memory barrier must be used when transitioning from single-threaded mutating\n usage to multithreaded usage."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct hash_table_state { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_hash_table { pub p_impl : * mut hash_table_state , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash_table"] [:: std :: mem :: size_of :: < aws_hash_table > () - 8usize] ; ["Alignment of aws_hash_table"] [:: std :: mem :: align_of :: < aws_hash_table > () - 8usize] ; ["Offset of field: aws_hash_table::p_impl"] [:: std :: mem :: offset_of ! (aws_hash_table , p_impl) - 0usize] ; } ; 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\n table may provide pointers to elements stored within the hash table;\n generally, calling code may alter value, but must not alter key (or any\n information used to compute key's hash code).\n\n Pointers to elements within the hash are invalidated whenever an operation\n which may change the number of elements in the hash is invoked (i.e. put,\n delete, clear, and clean_up), regardless of whether the number of elements\n actually changes."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_hash_element { pub key : * const :: libc :: c_void , pub value : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash_element"] [:: std :: mem :: size_of :: < aws_hash_element > () - 16usize] ; ["Alignment of aws_hash_element"] [:: std :: mem :: align_of :: < aws_hash_element > () - 8usize] ; ["Offset of field: aws_hash_element::key"] [:: std :: mem :: offset_of ! (aws_hash_element , key) - 0usize] ; ["Offset of field: aws_hash_element::value"] [:: std :: mem :: offset_of ! (aws_hash_element , value) - 8usize] ; } ; 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 () } } } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_hash_iter_status { AWS_HASH_ITER_STATUS_DONE = 0 , AWS_HASH_ITER_STATUS_DELETE_CALLED = 1 , AWS_HASH_ITER_STATUS_READY_FOR_USE = 2 , } # [repr (C)] # [derive (Debug , Copy , Clone)] 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 : :: libc :: c_int , pub unused_1 : * mut :: libc :: c_void , pub unused_2 : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash_iter"] [:: std :: mem :: size_of :: < aws_hash_iter > () - 64usize] ; ["Alignment of aws_hash_iter"] [:: std :: mem :: align_of :: < aws_hash_iter > () - 8usize] ; ["Offset of field: aws_hash_iter::map"] [:: std :: mem :: offset_of ! (aws_hash_iter , map) - 0usize] ; ["Offset of field: aws_hash_iter::element"] [:: std :: mem :: offset_of ! (aws_hash_iter , element) - 8usize] ; ["Offset of field: aws_hash_iter::slot"] [:: std :: mem :: offset_of ! (aws_hash_iter , slot) - 24usize] ; ["Offset of field: aws_hash_iter::limit"] [:: std :: mem :: offset_of ! (aws_hash_iter , limit) - 32usize] ; ["Offset of field: aws_hash_iter::status"] [:: std :: mem :: offset_of ! (aws_hash_iter , status) - 40usize] ; ["Offset of field: aws_hash_iter::unused_0"] [:: std :: mem :: offset_of ! (aws_hash_iter , unused_0) - 44usize] ; ["Offset of field: aws_hash_iter::unused_1"] [:: std :: mem :: offset_of ! (aws_hash_iter , unused_1) - 48usize] ; ["Offset of field: aws_hash_iter::unused_2"] [:: std :: mem :: offset_of ! (aws_hash_iter , unused_2) - 56usize] ; } ; 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 :: libc :: c_void) -> u64 > ; # [doc = " Prototype for a hash table equality check function pointer.\n\n This type is usually used for a function that compares two hash table\n keys, but note that the same type is used for a function that compares\n two hash table values in aws_hash_table_eq.\n\n Equality functions used in a hash table must be be reflexive (a == a),\n symmetric (a == b => b == a), transitive (a == b, b == c => a == c)\n and consistent (result does not change with time)."] pub type aws_hash_callback_eq_fn = :: std :: option :: Option < unsafe extern "C" fn (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool > ; # [doc = " Prototype for a hash table key or value destructor function pointer.\n\n This function is used to destroy elements in the hash table when the\n table is cleared or cleaned up.\n\n Note that functions which remove individual elements from the hash\n table provide options of whether or not to invoke the destructors\n 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 :: libc :: c_void) > ; unsafe extern "C" { # [doc = " Initializes a hash map with initial capacity for 'size' elements\n without resizing. Uses hash_fn to compute the hash of each element.\n equals_fn to compute equality of two keys.  Whenever an element is\n removed without being returned, destroy_key_fn is run on the pointer\n to the key and destroy_value_fn is run on the pointer to the value.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Deletes every element from map and frees all associated memory.\n destroy_fn will be called for each element.  aws_hash_table_init\n must be called before reusing the hash table.\n\n This method is idempotent."] pub fn aws_hash_table_clean_up (map : * mut aws_hash_table) ; } unsafe extern "C" { # [doc = " Safely swaps two hash tables. Note that we swap the entirety of the hash\n table, including which allocator is associated.\n\n Neither hash table is required to be initialized; if one or both is\n uninitialized, then the uninitialized state is also swapped."] pub fn aws_hash_table_swap (a : * mut aws_hash_table , b : * mut aws_hash_table) ; } unsafe extern "C" { # [doc = " Moves the hash table in 'from' to 'to'. After this move, 'from' will\n be identical to the state of the original 'to' hash table, and 'to'\n will be in the same state as if it had been passed to aws_hash_table_clean_up\n (that is, it will have no memory allocated, and it will be safe to\n either discard it or call aws_hash_table_clean_up again).\n\n Note that 'to' will not be cleaned up. You should make sure that 'to'\n is either uninitialized or cleaned up before moving a hashtable into\n it."] pub fn aws_hash_table_move (to : * mut aws_hash_table , from : * mut aws_hash_table) ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Returns an iterator to be used for iterating through a hash table.\n Iterator will already point to the first element of the table it finds,\n which can be accessed as iter.element.\n\n This function cannot fail, but if there are no elements in the table,\n 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 ; } unsafe extern "C" { # [doc = " Returns true if iterator is done iterating through table, false otherwise.\n 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 ; } unsafe extern "C" { # [doc = " Updates iterator so that it points to next element of hash table.\n\n This and the two previous functions are designed to be used together with\n the following idiom:\n\n for (struct aws_hash_iter iter = aws_hash_iter_begin(&map);\n      !aws_hash_iter_done(&iter); aws_hash_iter_next(&iter)) {\n     const key_type key = *(const key_type *)iter.element.key;\n     value_type value = *(value_type *)iter.element.value;\n     // etc.\n }\n\n Note that calling this on an iter which is \"done\" is idempotent:\n i.e. it will return another iter which is \"done\"."] pub fn aws_hash_iter_next (iter : * mut aws_hash_iter) ; } unsafe extern "C" { # [doc = " Deletes the element currently pointed-to by the hash iterator.\n After calling this method, the element member of the iterator\n should not be accessed until the next call to aws_hash_iter_next.\n\n @param destroy_contents If true, the destructors for the key and value\n  will be called."] pub fn aws_hash_iter_delete (iter : * mut aws_hash_iter , destroy_contents : bool) ; } unsafe extern "C" { # [doc = " Attempts to locate an element at key.  If the element is found, a\n pointer to the value is placed in *p_elem; if it is not found,\n *pElem is set to NULL. Either way, AWS_OP_SUCCESS is returned.\n\n This method does not change the state of the hash table. Therefore, it\n is safe to call _find from multiple threads on the same hash table,\n provided no mutating operations happen in parallel.\n\n Calling code may update the value in the hash table by modifying **pElem\n after a successful find. However, this pointer is not guaranteed to\n remain usable after a subsequent call to _put, _delete, _clear, or\n _clean_up."] pub fn aws_hash_table_find (map : * const aws_hash_table , key : * const :: libc :: c_void , p_elem : * mut * mut aws_hash_element) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Attempts to locate an element at key. If no such element was found,\n creates a new element, with value initialized to NULL. In either case, a\n pointer to the element is placed in *p_elem.\n\n If was_created is non-NULL, *was_created is set to 0 if an existing\n element was found, or 1 is a new element was created.\n\n Returns AWS_OP_SUCCESS if an item was found or created.\n Raises AWS_ERROR_OOM if hash table expansion was required and memory\n allocation failed."] pub fn aws_hash_table_create (map : * mut aws_hash_table , key : * const :: libc :: c_void , p_elem : * mut * mut aws_hash_element , was_created : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Inserts a new element at key, with the given value. If another element\n exists at that key, the old element will be overwritten; both old key and\n value objects will be destroyed.\n\n If was_created is non-NULL, *was_created is set to 0 if an existing\n element was found, or 1 is a new element was created.\n\n Returns AWS_OP_SUCCESS if an item was found or created.\n Raises AWS_ERROR_OOM if hash table expansion was required and memory\n allocation failed."] pub fn aws_hash_table_put (map : * mut aws_hash_table , key : * const :: libc :: c_void , value : * mut :: libc :: c_void , was_created : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes element at key. Always returns AWS_OP_SUCCESS.\n\n If pValue is non-NULL, the existing value (if any) is moved into\n (*value) before removing from the table, and destroy_fn is _not_\n invoked. If pValue is NULL, then (if the element existed) destroy_fn\n will be invoked on the element being removed.\n\n If was_present is non-NULL, it is set to 0 if the element was\n 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 :: libc :: c_void , p_value : * mut aws_hash_element , was_present : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes element already known (typically by find()).\n\n p_value should point to a valid element returned by create() or find().\n\n NOTE: DO NOT call this method from inside of a aws_hash_table_foreach callback, return\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Iterates through every element in the map and invokes the callback on\n that item. Iteration is performed in an arbitrary, implementation-defined\n order, and is not guaranteed to be consistent across invocations.\n\n The callback may change the value associated with the key by overwriting\n the value pointed-to by value. In this case, the on_element_removed\n callback will not be invoked, unless the callback invokes\n AWS_COMMON_HASH_TABLE_ITER_DELETE (in which case the on_element_removed\n is given the updated value).\n\n The callback must return a bitmask of zero or more of the following values\n ORed together:\n\n # AWS_COMMON_HASH_TABLE_ITER_CONTINUE - Continues iteration to the next\n     element (if not set, iteration stops)\n # AWS_COMMON_HASH_TABLE_ITER_DELETE   - Deletes the current value and\n     continues iteration.  destroy_fn will NOT be invoked.\n # AWS_COMMON_HASH_TABLE_ITER_ERROR   - Stop iteration with error.\n     No action will be taken for the current value and the value before this.\n     No rolling back. The deleted value before will NOT be back.\n     aws_hash_table_foreach returns AWS_OP_ERR after stropping the iteration.\n\n Invoking any method which may change the contents of the hashtable\n during iteration results in undefined behavior. However, you may safely\n invoke non-mutating operations during an iteration.\n\n This operation is mutating only if AWS_COMMON_HASH_TABLE_ITER_DELETE\n is returned at some point during iteration. Otherwise, it is non-mutating\n 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 :: libc :: c_void , p_element : * mut aws_hash_element) -> :: libc :: c_int > , context : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Compares two hash tables for equality. Both hash tables must have equivalent\n key comparators; values will be compared using the comparator passed into this\n function. The key hash function does not need to be equivalent between the\n 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 ; } unsafe extern "C" { # [doc = " Removes every element from the hash map. destroy_fn will be called for\n each element."] pub fn aws_hash_table_clear (map : * mut aws_hash_table) ; } unsafe extern "C" { # [doc = " Convenience hash function for NULL-terminated C-strings"] pub fn aws_hash_c_string (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Convenience hash function for struct aws_strings.\n Hash is same as used on the string bytes by aws_hash_c_string."] pub fn aws_hash_string (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Convenience hash function for struct aws_byte_cursor.\n Hash is same as used on the string bytes by aws_hash_c_string."] pub fn aws_hash_byte_cursor_ptr (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Convenience hash function which hashes the pointer value directly,\n without dereferencing.  This can be used in cases where pointer identity\n is desired, or where a uintptr_t is encoded into a const void *."] pub fn aws_hash_ptr (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { pub fn aws_hash_combine (item1 : u64 , item2 : u64) -> u64 ; } unsafe extern "C" { # [doc = " Convenience eq callback for NULL-terminated C-strings"] pub fn aws_hash_callback_c_str_eq (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " Convenience eq callback for AWS strings"] pub fn aws_hash_callback_string_eq (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " Convenience destroy callback for AWS strings"] pub fn aws_hash_callback_string_destroy (a : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Equality function which compares pointer equality."] pub fn aws_ptr_eq (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Helper function to hash keys that are uint64_t values.\n\n The function is not a strong hash function in any sense; it merely reflects\n the uint64 value back.  Do not use this function as a hash if you need\n the properties of a strong hash function."] pub fn aws_hash_uint64_t_by_identity (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Helper function to compare hash keys that are uint64_t values."] pub fn aws_hash_compare_uint64_t_eq (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool ; } # [repr (C)] pub struct aws_mutex { pub mutex_handle : pthread_mutex_t , pub initialized : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_mutex"] [:: std :: mem :: size_of :: < aws_mutex > () - 48usize] ; ["Alignment of aws_mutex"] [:: std :: mem :: align_of :: < aws_mutex > () - 8usize] ; ["Offset of field: aws_mutex::mutex_handle"] [:: std :: mem :: offset_of ! (aws_mutex , mutex_handle) - 0usize] ; ["Offset of field: aws_mutex::initialized"] [:: std :: mem :: offset_of ! (aws_mutex , initialized) - 40usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Initializes a new platform instance of mutex."] pub fn aws_mutex_init (mutex : * mut aws_mutex) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Cleans up internal resources."] pub fn aws_mutex_clean_up (mutex : * mut aws_mutex) ; } unsafe extern "C" { # [doc = " Blocks until it acquires the lock. While on some platforms such as Windows,\n this may behave as a reentrant mutex, you should not treat it like one. On\n platforms it is possible for it to be non-reentrant, it will be."] pub fn aws_mutex_lock (mutex : * mut aws_mutex) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Attempts to acquire the lock but returns immediately if it can not.\n While on some platforms such as Windows, this may behave as a reentrant mutex,\n you should not treat it like one. On platforms it is possible for it to be non-reentrant, it will be.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Releases the lock."] pub fn aws_mutex_unlock (mutex : * mut aws_mutex) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_connection_finish_code { AWS_S3_CONNECTION_FINISH_CODE_SUCCESS = 0 , AWS_S3_CONNECTION_FINISH_CODE_FAILED = 1 , AWS_S3_CONNECTION_FINISH_CODE_RETRY = 2 , } pub type aws_s3_endpoint_shutdown_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_endpoint_options { pub host_name : * mut aws_string , pub shutdown_callback : aws_s3_endpoint_shutdown_fn , pub client_bootstrap : * mut aws_client_bootstrap , pub tls_connection_options : * const aws_tls_connection_options , pub dns_host_address_ttl_seconds : usize , pub client : * mut aws_s3_client , pub max_connections : u32 , pub port : u32 , # [doc = " Optional.\n Proxy configuration for http connection."] pub proxy_config : * mut aws_http_proxy_config , # [doc = " Optional.\n Configuration for fetching proxy configuration from environment.\n By Default proxy_ev_settings.aws_http_proxy_env_var_type is set to AWS_HPEV_ENABLE which means read proxy\n configuration from environment.\n Only works when proxy_config is not set. If both are set, configuration from proxy_config is used."] pub proxy_ev_settings : * mut proxy_env_var_settings , # [doc = " Optional.\n If set to 0, default value is used."] pub connect_timeout_ms : u32 , # [doc = " Optional.\n Set keepalive to periodically transmit messages for detecting a disconnected peer."] pub tcp_keep_alive_options : * mut aws_s3_tcp_keep_alive_options , # [doc = " Optional.\n Configuration options for connection monitoring.\n If the transfer speed falls below the specified minimum_throughput_bytes_per_second, the operation is aborted."] pub monitoring_options : * mut aws_http_connection_monitoring_options , pub network_interface_names_array : * const aws_byte_cursor , pub num_network_interface_names : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_endpoint_options"] [:: std :: mem :: size_of :: < aws_s3_endpoint_options > () - 112usize] ; ["Alignment of aws_s3_endpoint_options"] [:: std :: mem :: align_of :: < aws_s3_endpoint_options > () - 8usize] ; ["Offset of field: aws_s3_endpoint_options::host_name"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , host_name) - 0usize] ; ["Offset of field: aws_s3_endpoint_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , shutdown_callback) - 8usize] ; ["Offset of field: aws_s3_endpoint_options::client_bootstrap"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , client_bootstrap) - 16usize] ; ["Offset of field: aws_s3_endpoint_options::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , tls_connection_options) - 24usize] ; ["Offset of field: aws_s3_endpoint_options::dns_host_address_ttl_seconds"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , dns_host_address_ttl_seconds) - 32usize] ; ["Offset of field: aws_s3_endpoint_options::client"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , client) - 40usize] ; ["Offset of field: aws_s3_endpoint_options::max_connections"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , max_connections) - 48usize] ; ["Offset of field: aws_s3_endpoint_options::port"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , port) - 52usize] ; ["Offset of field: aws_s3_endpoint_options::proxy_config"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , proxy_config) - 56usize] ; ["Offset of field: aws_s3_endpoint_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , proxy_ev_settings) - 64usize] ; ["Offset of field: aws_s3_endpoint_options::connect_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , connect_timeout_ms) - 72usize] ; ["Offset of field: aws_s3_endpoint_options::tcp_keep_alive_options"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , tcp_keep_alive_options) - 80usize] ; ["Offset of field: aws_s3_endpoint_options::monitoring_options"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , monitoring_options) - 88usize] ; ["Offset of field: aws_s3_endpoint_options::network_interface_names_array"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , network_interface_names_array) - 96usize] ; ["Offset of field: aws_s3_endpoint_options::num_network_interface_names"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , num_network_interface_names) - 104usize] ; } ; impl Default for aws_s3_endpoint_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 , Default , Copy , Clone)] pub struct aws_s3_endpoint_system_vtable { pub acquire : :: std :: option :: Option < unsafe extern "C" fn (endpoint : * mut aws_s3_endpoint , already_holding_lock : bool) > , pub release : :: std :: option :: Option < unsafe extern "C" fn (endpoint : * mut aws_s3_endpoint) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_endpoint_system_vtable"] [:: std :: mem :: size_of :: < aws_s3_endpoint_system_vtable > () - 16usize] ; ["Alignment of aws_s3_endpoint_system_vtable"] [:: std :: mem :: align_of :: < aws_s3_endpoint_system_vtable > () - 8usize] ; ["Offset of field: aws_s3_endpoint_system_vtable::acquire"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_system_vtable , acquire) - 0usize] ; ["Offset of field: aws_s3_endpoint_system_vtable::release"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_system_vtable , release) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_endpoint { pub client_synced_data : aws_s3_endpoint__bindgen_ty_1 , pub allocator : * mut aws_allocator , pub host_name : * mut aws_string , pub http_connection_manager : * mut aws_http_connection_manager , pub client : * mut aws_s3_client , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_endpoint__bindgen_ty_1 { pub ref_count : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_endpoint__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_endpoint__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_s3_endpoint__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_endpoint__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_endpoint__bindgen_ty_1::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_endpoint__bindgen_ty_1 , ref_count) - 0usize] ; } ; # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_endpoint"] [:: std :: mem :: size_of :: < aws_s3_endpoint > () - 40usize] ; ["Alignment of aws_s3_endpoint"] [:: std :: mem :: align_of :: < aws_s3_endpoint > () - 8usize] ; ["Offset of field: aws_s3_endpoint::client_synced_data"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , client_synced_data) - 0usize] ; ["Offset of field: aws_s3_endpoint::allocator"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , allocator) - 8usize] ; ["Offset of field: aws_s3_endpoint::host_name"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , host_name) - 16usize] ; ["Offset of field: aws_s3_endpoint::http_connection_manager"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , http_connection_manager) - 24usize] ; ["Offset of field: aws_s3_endpoint::client"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , client) - 32usize] ; } ; impl Default for aws_s3_endpoint { 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)] pub struct aws_s3_connection { pub endpoint : * mut aws_s3_endpoint , pub http_connection : * mut aws_http_connection , pub request : * mut aws_s3_request , pub retry_token : * mut aws_retry_token , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_connection"] [:: std :: mem :: size_of :: < aws_s3_connection > () - 32usize] ; ["Alignment of aws_s3_connection"] [:: std :: mem :: align_of :: < aws_s3_connection > () - 8usize] ; ["Offset of field: aws_s3_connection::endpoint"] [:: std :: mem :: offset_of ! (aws_s3_connection , endpoint) - 0usize] ; ["Offset of field: aws_s3_connection::http_connection"] [:: std :: mem :: offset_of ! (aws_s3_connection , http_connection) - 8usize] ; ["Offset of field: aws_s3_connection::request"] [:: std :: mem :: offset_of ! (aws_s3_connection , request) - 16usize] ; ["Offset of field: aws_s3_connection::retry_token"] [:: std :: mem :: offset_of ! (aws_s3_connection , retry_token) - 24usize] ; } ; impl Default for aws_s3_connection { 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)] pub struct aws_s3_client_vtable { pub meta_request_factory : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client , options : * const aws_s3_meta_request_options) -> * mut aws_s3_meta_request > , pub create_connection_for_request : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client , request : * mut aws_s3_request) > , pub acquire_http_connection : :: std :: option :: Option < unsafe extern "C" fn (conn_manager : * mut aws_http_connection_manager , on_connection_acquired_callback : aws_http_connection_manager_on_connection_setup_fn , user_data : * mut :: libc :: c_void) > , pub get_host_address_count : :: std :: option :: Option < unsafe extern "C" fn (host_resolver : * mut aws_host_resolver , host_name : * const aws_string , flags : u32) -> usize > , pub schedule_process_work_synced : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client) > , pub process_work : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client) > , pub endpoint_shutdown_callback : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client) > , pub finish_destroy : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client) > , pub parallel_input_stream_new_from_file : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , file_name : aws_byte_cursor , reading_elg : * mut aws_event_loop_group , direct_io_read : bool) -> * mut aws_parallel_input_stream > , pub http_connection_make_request : :: std :: option :: Option < unsafe extern "C" fn (client_connection : * mut aws_http_connection , options : * const aws_http_make_request_options) -> * mut aws_http_stream > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client_vtable"] [:: std :: mem :: size_of :: < aws_s3_client_vtable > () - 80usize] ; ["Alignment of aws_s3_client_vtable"] [:: std :: mem :: align_of :: < aws_s3_client_vtable > () - 8usize] ; ["Offset of field: aws_s3_client_vtable::meta_request_factory"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , meta_request_factory) - 0usize] ; ["Offset of field: aws_s3_client_vtable::create_connection_for_request"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , create_connection_for_request) - 8usize] ; ["Offset of field: aws_s3_client_vtable::acquire_http_connection"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , acquire_http_connection) - 16usize] ; ["Offset of field: aws_s3_client_vtable::get_host_address_count"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , get_host_address_count) - 24usize] ; ["Offset of field: aws_s3_client_vtable::schedule_process_work_synced"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , schedule_process_work_synced) - 32usize] ; ["Offset of field: aws_s3_client_vtable::process_work"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , process_work) - 40usize] ; ["Offset of field: aws_s3_client_vtable::endpoint_shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , endpoint_shutdown_callback) - 48usize] ; ["Offset of field: aws_s3_client_vtable::finish_destroy"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , finish_destroy) - 56usize] ; ["Offset of field: aws_s3_client_vtable::parallel_input_stream_new_from_file"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , parallel_input_stream_new_from_file) - 64usize] ; ["Offset of field: aws_s3_client_vtable::http_connection_make_request"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , http_connection_make_request) - 72usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_part_timeout_stats { pub stop_timeout : bool , pub num_successful_upload_requests : u64 , pub initial_request_time : aws_s3_upload_part_timeout_stats__bindgen_ty_1 , pub timeout_rate_tracking : aws_s3_upload_part_timeout_stats__bindgen_ty_2 , pub response_to_first_byte_time : aws_s3_upload_part_timeout_stats__bindgen_ty_3 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_part_timeout_stats__bindgen_ty_1 { pub sum_ns : u64 , pub num_samples : u64 , pub collecting_p90 : bool , pub p90_samples : aws_priority_queue , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_timeout_stats__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_1 > () - 112usize] ; ["Alignment of aws_s3_upload_part_timeout_stats__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_1::sum_ns"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_1 , sum_ns) - 0usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_1::num_samples"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_1 , num_samples) - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_1::collecting_p90"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_1 , collecting_p90) - 16usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_1::p90_samples"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_1 , p90_samples) - 24usize] ; } ; impl Default for aws_s3_upload_part_timeout_stats__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 () } } } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_upload_part_timeout_stats__bindgen_ty_2 { pub num_completed : u64 , pub num_failed : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_timeout_stats__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_2 > () - 16usize] ; ["Alignment of aws_s3_upload_part_timeout_stats__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_2::num_completed"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_2 , num_completed) - 0usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_2::num_failed"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_2 , num_failed) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_upload_part_timeout_stats__bindgen_ty_3 { pub sum_ns : u64 , pub num_samples : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_timeout_stats__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_3 > () - 16usize] ; ["Alignment of aws_s3_upload_part_timeout_stats__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_3::sum_ns"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_3 , sum_ns) - 0usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_3::num_samples"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_3 , num_samples) - 8usize] ; } ; # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_timeout_stats"] [:: std :: mem :: size_of :: < aws_s3_upload_part_timeout_stats > () - 160usize] ; ["Alignment of aws_s3_upload_part_timeout_stats"] [:: std :: mem :: align_of :: < aws_s3_upload_part_timeout_stats > () - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::stop_timeout"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , stop_timeout) - 0usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::num_successful_upload_requests"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , num_successful_upload_requests) - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::initial_request_time"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , initial_request_time) - 16usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::timeout_rate_tracking"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , timeout_rate_tracking) - 128usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::response_to_first_byte_time"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , response_to_first_byte_time) - 144usize] ; } ; impl Default for aws_s3_upload_part_timeout_stats { 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)] pub struct aws_s3_client { pub allocator : * mut aws_allocator , pub buffer_pool : * mut aws_s3_buffer_pool , pub vtable : * mut aws_s3_client_vtable , pub ref_count : aws_ref_count , pub client_bootstrap : * mut aws_client_bootstrap , pub process_work_event_loop : * mut aws_event_loop , pub body_streaming_elg : * mut aws_event_loop_group , pub region : * mut aws_string , pub part_size : usize , pub part_size_set : bool , pub max_part_size : u64 , pub optimal_range_size : u64 , pub fio_options_set : bool , pub fio_opts : aws_s3_file_io_options , pub multipart_upload_threshold : u64 , pub tls_connection_options : * mut aws_tls_connection_options , pub cached_signing_config : * mut aws_cached_signing_config_aws , pub s3express_provider_factory : aws_s3express_provider_factory_fn , pub factory_user_data : * mut :: libc :: c_void , pub s3express_provider : * mut aws_s3express_credentials_provider , pub throughput_target_gbps : f64 , pub ideal_connection_count : u32 , # [doc = " For multi-part upload, content-md5 will be calculated if the AWS_MR_CONTENT_MD5_ENABLED is specified\n     or initial request has content-md5 header.\n For single-part upload, if the content-md5 header is specified, it will remain unchanged. If the header is not\n     specified, and this is set to AWS_MR_CONTENT_MD5_ENABLED, it will be calculated."] pub compute_content_md5 : aws_s3_meta_request_compute_content_md5 , pub max_active_connections_override : u32 , pub max_allowed_connections : aws_atomic_var , pub retry_strategy : * mut aws_retry_strategy , # [doc = " Optional.\n Proxy configuration for http connection."] pub proxy_config : * mut aws_http_proxy_config , # [doc = " Optional.\n Configuration for fetching proxy configuration from environment.\n By Default proxy_ev_settings.aws_http_proxy_env_var_type is set to AWS_HPEV_ENABLE which means read proxy\n configuration from environment.\n Only works when proxy_config is not set. If both are set, configuration from proxy_config is used."] pub proxy_ev_settings : * mut proxy_env_var_settings , # [doc = " Optional.\n If set to 0, default value is used."] pub connect_timeout_ms : u32 , # [doc = " Optional.\n Set keepalive to periodically transmit messages for detecting a disconnected peer."] pub tcp_keep_alive_options : * mut aws_s3_tcp_keep_alive_options , # [doc = " Configuration options for connection monitoring.\n If the transfer speed falls below the specified minimum_throughput_bytes_per_second, the operation is aborted.\n If user passes in NULL, default values are used."] pub monitoring_options : aws_http_connection_monitoring_options , pub proxy_ev_tls_options : * mut aws_tls_connection_options , pub shutdown_callback : aws_s3_client_shutdown_complete_callback_fn , pub shutdown_callback_user_data : * mut :: libc :: c_void , pub enable_read_backpressure : bool , pub initial_read_window : usize , # [doc = " Timeout in ms for upload request for request after sending to the response first byte received."] pub upload_timeout_ms : aws_atomic_var , pub network_interface_names : aws_array_list , pub network_interface_names_cursor_array : * mut aws_byte_cursor , pub num_network_interface_names : usize , pub stats : aws_s3_client__bindgen_ty_1 , pub synced_data : aws_s3_client__bindgen_ty_2 , pub threaded_data : aws_s3_client__bindgen_ty_3 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_client__bindgen_ty_1 { pub num_requests_in_flight : aws_atomic_var , pub num_requests_network_io : [aws_atomic_var ; 4usize] , pub num_requests_stream_queued_waiting : aws_atomic_var , pub num_requests_streaming_response : aws_atomic_var , pub num_requests_streaming_request_body : aws_atomic_var , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_client__bindgen_ty_1 > () - 64usize] ; ["Alignment of aws_s3_client__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_client__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_in_flight"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_in_flight) - 0usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_network_io"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_network_io) - 8usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_stream_queued_waiting"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_stream_queued_waiting) - 40usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_streaming_response"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_streaming_response) - 48usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_streaming_request_body"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_streaming_request_body) - 56usize] ; } ; impl Default for aws_s3_client__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 () } } } # [repr (C)] pub struct aws_s3_client__bindgen_ty_2 { pub lock : aws_mutex , pub endpoints : aws_hash_table , pub num_failed_prepare_requests : u32 , pub pending_meta_request_work : aws_linked_list , pub prepared_requests : aws_linked_list , pub process_work_task : aws_task , pub trim_buffer_pool_task : aws_task , pub endpoints_cleanup_task : aws_task , pub num_endpoints_allocated : u32 , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub upload_part_stats : aws_s3_upload_part_timeout_stats , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_client__bindgen_ty_2 > () - 488usize] ; ["Alignment of aws_s3_client__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_client__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::lock"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , lock) - 0usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::endpoints"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , endpoints) - 48usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::num_failed_prepare_requests"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , num_failed_prepare_requests) - 56usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::pending_meta_request_work"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , pending_meta_request_work) - 64usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::prepared_requests"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , prepared_requests) - 96usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::process_work_task"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , process_work_task) - 128usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::trim_buffer_pool_task"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , trim_buffer_pool_task) - 192usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::endpoints_cleanup_task"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , endpoints_cleanup_task) - 256usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::num_endpoints_allocated"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , num_endpoints_allocated) - 320usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::upload_part_stats"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , upload_part_stats) - 328usize] ; } ; impl Default for aws_s3_client__bindgen_ty_2 { 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 () } } } impl aws_s3_client__bindgen_ty_2 { # [inline] pub fn active (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_active (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn active_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_active_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn start_destroy_executing (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_start_destroy_executing (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub unsafe fn start_destroy_executing_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 1usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_start_destroy_executing_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 1usize , 1u8 , val as u64 ,) } } # [inline] pub fn process_work_task_scheduled (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_process_work_task_scheduled (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub unsafe fn process_work_task_scheduled_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 2usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_process_work_task_scheduled_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 2usize , 1u8 , val as u64 ,) } } # [inline] pub fn process_work_task_in_progress (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_process_work_task_in_progress (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (3usize , 1u8 , val as u64) } } # [inline] pub unsafe fn process_work_task_in_progress_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 3usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_process_work_task_in_progress_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 3usize , 1u8 , val as u64 ,) } } # [inline] pub fn body_streaming_elg_allocated (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (4usize , 1u8) as u32) } } # [inline] pub fn set_body_streaming_elg_allocated (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (4usize , 1u8 , val as u64) } } # [inline] pub unsafe fn body_streaming_elg_allocated_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 4usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_body_streaming_elg_allocated_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 4usize , 1u8 , val as u64 ,) } } # [inline] pub fn s3express_provider_active (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (5usize , 1u8) as u32) } } # [inline] pub fn set_s3express_provider_active (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (5usize , 1u8 , val as u64) } } # [inline] pub unsafe fn s3express_provider_active_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 5usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_s3express_provider_active_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 5usize , 1u8 , val as u64 ,) } } # [inline] pub fn finish_destroy (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 1u8) as u32) } } # [inline] pub fn set_finish_destroy (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (6usize , 1u8 , val as u64) } } # [inline] pub unsafe fn finish_destroy_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 6usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_finish_destroy_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 6usize , 1u8 , val as u64 ,) } } # [inline] pub fn endpoints_cleanup_task_scheduled (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (7usize , 1u8) as u32) } } # [inline] pub fn set_endpoints_cleanup_task_scheduled (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (7usize , 1u8 , val as u64) } } # [inline] pub unsafe fn endpoints_cleanup_task_scheduled_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 7usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_endpoints_cleanup_task_scheduled_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 7usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (active : u32 , start_destroy_executing : u32 , process_work_task_scheduled : u32 , process_work_task_in_progress : u32 , body_streaming_elg_allocated : u32 , s3express_provider_active : u32 , finish_destroy : u32 , endpoints_cleanup_task_scheduled : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let active : u32 = unsafe { :: std :: mem :: transmute (active) } ; active as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let start_destroy_executing : u32 = unsafe { :: std :: mem :: transmute (start_destroy_executing) } ; start_destroy_executing as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let process_work_task_scheduled : u32 = unsafe { :: std :: mem :: transmute (process_work_task_scheduled) } ; process_work_task_scheduled as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let process_work_task_in_progress : u32 = unsafe { :: std :: mem :: transmute (process_work_task_in_progress) } ; process_work_task_in_progress as u64 }) ; __bindgen_bitfield_unit . set (4usize , 1u8 , { let body_streaming_elg_allocated : u32 = unsafe { :: std :: mem :: transmute (body_streaming_elg_allocated) } ; body_streaming_elg_allocated as u64 }) ; __bindgen_bitfield_unit . set (5usize , 1u8 , { let s3express_provider_active : u32 = unsafe { :: std :: mem :: transmute (s3express_provider_active) } ; s3express_provider_active as u64 }) ; __bindgen_bitfield_unit . set (6usize , 1u8 , { let finish_destroy : u32 = unsafe { :: std :: mem :: transmute (finish_destroy) } ; finish_destroy as u64 }) ; __bindgen_bitfield_unit . set (7usize , 1u8 , { let endpoints_cleanup_task_scheduled : u32 = unsafe { :: std :: mem :: transmute (endpoints_cleanup_task_scheduled) } ; endpoints_cleanup_task_scheduled as u64 }) ; __bindgen_bitfield_unit } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_client__bindgen_ty_3 { pub request_queue : aws_linked_list , pub meta_requests : aws_linked_list , pub request_queue_size : u32 , pub num_requests_being_prepared : u32 , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub __bindgen_padding_0 : [u8 ; 7usize] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_client__bindgen_ty_3 > () - 80usize] ; ["Alignment of aws_s3_client__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_client__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_client__bindgen_ty_3::request_queue"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_3 , request_queue) - 0usize] ; ["Offset of field: aws_s3_client__bindgen_ty_3::meta_requests"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_3 , meta_requests) - 32usize] ; ["Offset of field: aws_s3_client__bindgen_ty_3::request_queue_size"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_3 , request_queue_size) - 64usize] ; ["Offset of field: aws_s3_client__bindgen_ty_3::num_requests_being_prepared"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_3 , num_requests_being_prepared) - 68usize] ; } ; impl Default for aws_s3_client__bindgen_ty_3 { 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 () } } } impl aws_s3_client__bindgen_ty_3 { # [inline] pub fn trim_buffer_pool_task_scheduled (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_trim_buffer_pool_task_scheduled (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn trim_buffer_pool_task_scheduled_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_trim_buffer_pool_task_scheduled_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (trim_buffer_pool_task_scheduled : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let trim_buffer_pool_task_scheduled : u32 = unsafe { :: std :: mem :: transmute (trim_buffer_pool_task_scheduled) } ; trim_buffer_pool_task_scheduled as u64 }) ; __bindgen_bitfield_unit } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client"] [:: std :: mem :: size_of :: < aws_s3_client > () - 1032usize] ; ["Alignment of aws_s3_client"] [:: std :: mem :: align_of :: < aws_s3_client > () - 8usize] ; ["Offset of field: aws_s3_client::allocator"] [:: std :: mem :: offset_of ! (aws_s3_client , allocator) - 0usize] ; ["Offset of field: aws_s3_client::buffer_pool"] [:: std :: mem :: offset_of ! (aws_s3_client , buffer_pool) - 8usize] ; ["Offset of field: aws_s3_client::vtable"] [:: std :: mem :: offset_of ! (aws_s3_client , vtable) - 16usize] ; ["Offset of field: aws_s3_client::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_client , ref_count) - 24usize] ; ["Offset of field: aws_s3_client::client_bootstrap"] [:: std :: mem :: offset_of ! (aws_s3_client , client_bootstrap) - 48usize] ; ["Offset of field: aws_s3_client::process_work_event_loop"] [:: std :: mem :: offset_of ! (aws_s3_client , process_work_event_loop) - 56usize] ; ["Offset of field: aws_s3_client::body_streaming_elg"] [:: std :: mem :: offset_of ! (aws_s3_client , body_streaming_elg) - 64usize] ; ["Offset of field: aws_s3_client::region"] [:: std :: mem :: offset_of ! (aws_s3_client , region) - 72usize] ; ["Offset of field: aws_s3_client::part_size"] [:: std :: mem :: offset_of ! (aws_s3_client , part_size) - 80usize] ; ["Offset of field: aws_s3_client::part_size_set"] [:: std :: mem :: offset_of ! (aws_s3_client , part_size_set) - 88usize] ; ["Offset of field: aws_s3_client::max_part_size"] [:: std :: mem :: offset_of ! (aws_s3_client , max_part_size) - 96usize] ; ["Offset of field: aws_s3_client::optimal_range_size"] [:: std :: mem :: offset_of ! (aws_s3_client , optimal_range_size) - 104usize] ; ["Offset of field: aws_s3_client::fio_options_set"] [:: std :: mem :: offset_of ! (aws_s3_client , fio_options_set) - 112usize] ; ["Offset of field: aws_s3_client::fio_opts"] [:: std :: mem :: offset_of ! (aws_s3_client , fio_opts) - 120usize] ; ["Offset of field: aws_s3_client::multipart_upload_threshold"] [:: std :: mem :: offset_of ! (aws_s3_client , multipart_upload_threshold) - 144usize] ; ["Offset of field: aws_s3_client::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_s3_client , tls_connection_options) - 152usize] ; ["Offset of field: aws_s3_client::cached_signing_config"] [:: std :: mem :: offset_of ! (aws_s3_client , cached_signing_config) - 160usize] ; ["Offset of field: aws_s3_client::s3express_provider_factory"] [:: std :: mem :: offset_of ! (aws_s3_client , s3express_provider_factory) - 168usize] ; ["Offset of field: aws_s3_client::factory_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client , factory_user_data) - 176usize] ; ["Offset of field: aws_s3_client::s3express_provider"] [:: std :: mem :: offset_of ! (aws_s3_client , s3express_provider) - 184usize] ; ["Offset of field: aws_s3_client::throughput_target_gbps"] [:: std :: mem :: offset_of ! (aws_s3_client , throughput_target_gbps) - 192usize] ; ["Offset of field: aws_s3_client::ideal_connection_count"] [:: std :: mem :: offset_of ! (aws_s3_client , ideal_connection_count) - 200usize] ; ["Offset of field: aws_s3_client::compute_content_md5"] [:: std :: mem :: offset_of ! (aws_s3_client , compute_content_md5) - 204usize] ; ["Offset of field: aws_s3_client::max_active_connections_override"] [:: std :: mem :: offset_of ! (aws_s3_client , max_active_connections_override) - 208usize] ; ["Offset of field: aws_s3_client::max_allowed_connections"] [:: std :: mem :: offset_of ! (aws_s3_client , max_allowed_connections) - 216usize] ; ["Offset of field: aws_s3_client::retry_strategy"] [:: std :: mem :: offset_of ! (aws_s3_client , retry_strategy) - 224usize] ; ["Offset of field: aws_s3_client::proxy_config"] [:: std :: mem :: offset_of ! (aws_s3_client , proxy_config) - 232usize] ; ["Offset of field: aws_s3_client::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_s3_client , proxy_ev_settings) - 240usize] ; ["Offset of field: aws_s3_client::connect_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_client , connect_timeout_ms) - 248usize] ; ["Offset of field: aws_s3_client::tcp_keep_alive_options"] [:: std :: mem :: offset_of ! (aws_s3_client , tcp_keep_alive_options) - 256usize] ; ["Offset of field: aws_s3_client::monitoring_options"] [:: std :: mem :: offset_of ! (aws_s3_client , monitoring_options) - 264usize] ; ["Offset of field: aws_s3_client::proxy_ev_tls_options"] [:: std :: mem :: offset_of ! (aws_s3_client , proxy_ev_tls_options) - 296usize] ; ["Offset of field: aws_s3_client::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_client , shutdown_callback) - 304usize] ; ["Offset of field: aws_s3_client::shutdown_callback_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client , shutdown_callback_user_data) - 312usize] ; ["Offset of field: aws_s3_client::enable_read_backpressure"] [:: std :: mem :: offset_of ! (aws_s3_client , enable_read_backpressure) - 320usize] ; ["Offset of field: aws_s3_client::initial_read_window"] [:: std :: mem :: offset_of ! (aws_s3_client , initial_read_window) - 328usize] ; ["Offset of field: aws_s3_client::upload_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_client , upload_timeout_ms) - 336usize] ; ["Offset of field: aws_s3_client::network_interface_names"] [:: std :: mem :: offset_of ! (aws_s3_client , network_interface_names) - 344usize] ; ["Offset of field: aws_s3_client::network_interface_names_cursor_array"] [:: std :: mem :: offset_of ! (aws_s3_client , network_interface_names_cursor_array) - 384usize] ; ["Offset of field: aws_s3_client::num_network_interface_names"] [:: std :: mem :: offset_of ! (aws_s3_client , num_network_interface_names) - 392usize] ; ["Offset of field: aws_s3_client::stats"] [:: std :: mem :: offset_of ! (aws_s3_client , stats) - 400usize] ; ["Offset of field: aws_s3_client::synced_data"] [:: std :: mem :: offset_of ! (aws_s3_client , synced_data) - 464usize] ; ["Offset of field: aws_s3_client::threaded_data"] [:: std :: mem :: offset_of ! (aws_s3_client , threaded_data) - 952usize] ; } ; impl Default for aws_s3_client { 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)] pub struct aws_s3_meta_request_resume_token { pub allocator : * mut aws_allocator , pub ref_count : aws_ref_count , pub type_ : aws_s3_meta_request_type , pub multipart_upload_id : * mut aws_string , pub part_size : usize , pub total_num_parts : usize , pub num_parts_completed : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_resume_token"] [:: std :: mem :: size_of :: < aws_s3_meta_request_resume_token > () - 72usize] ; ["Alignment of aws_s3_meta_request_resume_token"] [:: std :: mem :: align_of :: < aws_s3_meta_request_resume_token > () - 8usize] ; ["Offset of field: aws_s3_meta_request_resume_token::allocator"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , allocator) - 0usize] ; ["Offset of field: aws_s3_meta_request_resume_token::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , ref_count) - 8usize] ; ["Offset of field: aws_s3_meta_request_resume_token::type_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , type_) - 32usize] ; ["Offset of field: aws_s3_meta_request_resume_token::multipart_upload_id"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , multipart_upload_id) - 40usize] ; ["Offset of field: aws_s3_meta_request_resume_token::part_size"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , part_size) - 48usize] ; ["Offset of field: aws_s3_meta_request_resume_token::total_num_parts"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , total_num_parts) - 56usize] ; ["Offset of field: aws_s3_meta_request_resume_token::num_parts_completed"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , num_parts_completed) - 64usize] ; } ; impl Default for aws_s3_meta_request_resume_token { 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 () } } } unsafe extern "C" { pub fn aws_s3_client_notify_connection_finished (client : * mut aws_s3_client , connection : * mut aws_s3_connection , error_code : :: libc :: c_int , finish_code : aws_s3_connection_finish_code) ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_new (allocator : * mut aws_allocator) -> * mut aws_s3_meta_request_resume_token ; } unsafe extern "C" { pub fn aws_s3_set_dns_ttl (ttl : usize) ; } unsafe extern "C" { pub fn aws_s3_client_get_max_requests_prepare (client : * mut aws_s3_client) -> u32 ; } unsafe extern "C" { pub fn aws_s3_client_get_max_active_connections (client : * mut aws_s3_client , meta_request : * mut aws_s3_meta_request) -> u32 ; } unsafe extern "C" { pub fn aws_s3_client_get_max_requests_in_flight (client : * mut aws_s3_client) -> u32 ; } unsafe extern "C" { pub fn aws_s3_client_queue_requests_threaded (client : * mut aws_s3_client , request_list : * mut aws_linked_list , queue_front : bool) -> u32 ; } unsafe extern "C" { pub fn aws_s3_client_dequeue_request_threaded (client : * mut aws_s3_client) -> * mut aws_s3_request ; } unsafe extern "C" { pub fn aws_s3_client_schedule_process_work (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_client_update_meta_requests_threaded (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_client_update_connections_threaded (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_endpoint_new (allocator : * mut aws_allocator , options : * const aws_s3_endpoint_options) -> * mut aws_s3_endpoint ; } unsafe extern "C" { pub fn aws_s3_client_lock_synced_data (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_client_unlock_synced_data (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_endpoint_set_system_vtable (vtable : * const aws_s3_endpoint_system_vtable) ; } unsafe extern "C" { pub fn aws_s3_endpoint_acquire (endpoint : * mut aws_s3_endpoint , already_holding_lock : bool) -> * mut aws_s3_endpoint ; } unsafe extern "C" { pub fn aws_s3_endpoint_release (endpoint : * mut aws_s3_endpoint) ; } unsafe extern "C" { pub fn aws_s3_endpoint_destroy (endpoint : * mut aws_s3_endpoint) ; } unsafe extern "C" { pub static g_min_num_connections : u32 ; } unsafe extern "C" { pub static g_expect_timeout_offset_ms : usize ; } unsafe extern "C" { pub fn aws_s3_client_update_upload_part_timeout (client : * mut aws_s3_client , finished_upload_part_request : * mut aws_s3_request , finished_error_code : :: libc :: c_int) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_default_buffer_ticket { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_default_buffer_pool_usage_stats { pub mem_limit : usize , pub primary_cutoff : usize , pub primary_allocated : usize , pub primary_num_blocks : usize , pub primary_used : usize , pub primary_reserved : usize , pub secondary_used : usize , pub secondary_reserved : usize , pub special_blocks_allocated : usize , pub special_blocks_num : usize , pub special_blocks_reserved : usize , pub special_blocks_used : usize , pub forced_used : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_default_buffer_pool_usage_stats"] [:: std :: mem :: size_of :: < aws_s3_default_buffer_pool_usage_stats > () - 104usize] ; ["Alignment of aws_s3_default_buffer_pool_usage_stats"] [:: std :: mem :: align_of :: < aws_s3_default_buffer_pool_usage_stats > () - 8usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::mem_limit"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , mem_limit) - 0usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_cutoff"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_cutoff) - 8usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_allocated"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_allocated) - 16usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_num_blocks"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_num_blocks) - 24usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_used) - 32usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_reserved) - 40usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::secondary_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , secondary_used) - 48usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::secondary_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , secondary_reserved) - 56usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::special_blocks_allocated"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , special_blocks_allocated) - 64usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::special_blocks_num"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , special_blocks_num) - 72usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::special_blocks_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , special_blocks_reserved) - 80usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::special_blocks_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , special_blocks_used) - 88usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::forced_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , forced_used) - 96usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct s3_special_block_list { pub allocator : * mut aws_allocator , pub buffer_size : usize , pub blocks : aws_array_list , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of s3_special_block_list"] [:: std :: mem :: size_of :: < s3_special_block_list > () - 56usize] ; ["Alignment of s3_special_block_list"] [:: std :: mem :: align_of :: < s3_special_block_list > () - 8usize] ; ["Offset of field: s3_special_block_list::allocator"] [:: std :: mem :: offset_of ! (s3_special_block_list , allocator) - 0usize] ; ["Offset of field: s3_special_block_list::buffer_size"] [:: std :: mem :: offset_of ! (s3_special_block_list , buffer_size) - 8usize] ; ["Offset of field: s3_special_block_list::blocks"] [:: std :: mem :: offset_of ! (s3_special_block_list , blocks) - 16usize] ; } ; impl Default for s3_special_block_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 () } } } # [repr (C)] pub struct aws_s3_default_buffer_pool { pub base_allocator : * mut aws_allocator , pub mutex : aws_mutex , pub block_size : usize , pub chunk_size : usize , pub primary_size_cutoff : usize , pub mem_limit : usize , pub primary_allocated : usize , pub primary_reserved : usize , pub primary_used : usize , pub special_blocks_allocated : usize , pub special_blocks_reserved : usize , pub special_blocks_used : usize , pub secondary_reserved : usize , pub secondary_used : usize , pub forced_used : usize , pub blocks : aws_array_list , pub pending_reserves : aws_linked_list , pub special_blocks : aws_hash_table , pub force_keeping_special_blocks : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_default_buffer_pool"] [:: std :: mem :: size_of :: < aws_s3_default_buffer_pool > () - 248usize] ; ["Alignment of aws_s3_default_buffer_pool"] [:: std :: mem :: align_of :: < aws_s3_default_buffer_pool > () - 8usize] ; ["Offset of field: aws_s3_default_buffer_pool::base_allocator"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , base_allocator) - 0usize] ; ["Offset of field: aws_s3_default_buffer_pool::mutex"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , mutex) - 8usize] ; ["Offset of field: aws_s3_default_buffer_pool::block_size"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , block_size) - 56usize] ; ["Offset of field: aws_s3_default_buffer_pool::chunk_size"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , chunk_size) - 64usize] ; ["Offset of field: aws_s3_default_buffer_pool::primary_size_cutoff"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , primary_size_cutoff) - 72usize] ; ["Offset of field: aws_s3_default_buffer_pool::mem_limit"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , mem_limit) - 80usize] ; ["Offset of field: aws_s3_default_buffer_pool::primary_allocated"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , primary_allocated) - 88usize] ; ["Offset of field: aws_s3_default_buffer_pool::primary_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , primary_reserved) - 96usize] ; ["Offset of field: aws_s3_default_buffer_pool::primary_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , primary_used) - 104usize] ; ["Offset of field: aws_s3_default_buffer_pool::special_blocks_allocated"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , special_blocks_allocated) - 112usize] ; ["Offset of field: aws_s3_default_buffer_pool::special_blocks_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , special_blocks_reserved) - 120usize] ; ["Offset of field: aws_s3_default_buffer_pool::special_blocks_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , special_blocks_used) - 128usize] ; ["Offset of field: aws_s3_default_buffer_pool::secondary_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , secondary_reserved) - 136usize] ; ["Offset of field: aws_s3_default_buffer_pool::secondary_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , secondary_used) - 144usize] ; ["Offset of field: aws_s3_default_buffer_pool::forced_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , forced_used) - 152usize] ; ["Offset of field: aws_s3_default_buffer_pool::blocks"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , blocks) - 160usize] ; ["Offset of field: aws_s3_default_buffer_pool::pending_reserves"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , pending_reserves) - 200usize] ; ["Offset of field: aws_s3_default_buffer_pool::special_blocks"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , special_blocks) - 232usize] ; ["Offset of field: aws_s3_default_buffer_pool::force_keeping_special_blocks"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , force_keeping_special_blocks) - 240usize] ; } ; impl Default for aws_s3_default_buffer_pool { 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)] pub struct s3_pending_reserve { pub node : aws_linked_list_node , pub ticket_future : * mut aws_future_s3_buffer_ticket , pub ticket : * mut aws_s3_default_buffer_ticket , pub meta : aws_s3_buffer_pool_reserve_meta , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of s3_pending_reserve"] [:: std :: mem :: size_of :: < s3_pending_reserve > () - 64usize] ; ["Alignment of s3_pending_reserve"] [:: std :: mem :: align_of :: < s3_pending_reserve > () - 8usize] ; ["Offset of field: s3_pending_reserve::node"] [:: std :: mem :: offset_of ! (s3_pending_reserve , node) - 0usize] ; ["Offset of field: s3_pending_reserve::ticket_future"] [:: std :: mem :: offset_of ! (s3_pending_reserve , ticket_future) - 16usize] ; ["Offset of field: s3_pending_reserve::ticket"] [:: std :: mem :: offset_of ! (s3_pending_reserve , ticket) - 24usize] ; ["Offset of field: s3_pending_reserve::meta"] [:: std :: mem :: offset_of ! (s3_pending_reserve , meta) - 32usize] ; } ; impl Default for s3_pending_reserve { 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)] pub struct s3_buffer_pool_block { pub block_size : usize , pub block_ptr : * mut u8 , pub alloc_bit_mask : u16 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of s3_buffer_pool_block"] [:: std :: mem :: size_of :: < s3_buffer_pool_block > () - 24usize] ; ["Alignment of s3_buffer_pool_block"] [:: std :: mem :: align_of :: < s3_buffer_pool_block > () - 8usize] ; ["Offset of field: s3_buffer_pool_block::block_size"] [:: std :: mem :: offset_of ! (s3_buffer_pool_block , block_size) - 0usize] ; ["Offset of field: s3_buffer_pool_block::block_ptr"] [:: std :: mem :: offset_of ! (s3_buffer_pool_block , block_ptr) - 8usize] ; ["Offset of field: s3_buffer_pool_block::alloc_bit_mask"] [:: std :: mem :: offset_of ! (s3_buffer_pool_block , alloc_bit_mask) - 16usize] ; } ; impl Default for s3_buffer_pool_block { 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 () } } } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_new (allocator : * mut aws_allocator , config : aws_s3_buffer_pool_config) -> * mut aws_s3_buffer_pool ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_destroy (buffer_pool : * mut aws_s3_buffer_pool) ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_reserve (buffer_pool : * mut aws_s3_buffer_pool , meta : aws_s3_buffer_pool_reserve_meta) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_acquire_buffer (buffer_pool : * mut aws_s3_buffer_pool , ticket : * mut aws_s3_default_buffer_ticket) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_get_usage (buffer_pool : * mut aws_s3_buffer_pool) -> aws_s3_default_buffer_pool_usage_stats ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_trim (buffer_pool : * mut aws_s3_buffer_pool) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_signable { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_signing_result { _unused : [u8 ; 0] , } # [doc = " Gets called by the signing function when the signing is complete.\n\n Note that result will be destroyed after this function returns, so either copy it,\n or do all necessary adjustments inside the callback.\n\n When performing event or chunk signing, you will need to copy out the signature value in order\n to correctly configure the signable that wraps the event or chunk you want signed next.  The signature is\n found in the \"signature\" property on the signing result.  This value must be added as the\n \"previous-signature\" property on the next signable."] pub type aws_signing_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (result : * mut aws_signing_result , error_code : :: libc :: c_int , userdata : * mut :: libc :: c_void) > ; unsafe extern "C" { # [doc = " (Asynchronous) entry point to sign something (a request, a chunk, an event) with an AWS signing process.\n Depending on the configuration, the signing process may or may not complete synchronously.\n\n @param allocator memory allocator to use throughout the signing process\n @param signable the thing to be signed.  See signable.h for common constructors for signables that\n wrap different types.\n @param base_config pointer to a signing configuration, currently this must be of type aws_signing_config_aws\n @param on_complete completion callback to be invoked when signing has finished\n @param user_data opaque user data that will be passed to the completion callback\n\n @return AWS_OP_SUCCESS if the signing attempt was *initiated* successfully, AWS_OP_ERR otherwise"] pub fn aws_sign_request_aws (allocator : * mut aws_allocator , signable : * const aws_signable , base_config : * const aws_signing_config_base , on_complete : aws_signing_complete_fn , userdata : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Test-only API used for cross-library signing verification tests\n\n Verifies:\n  (1) The canonical request generated during sigv4a signing of the request matches what is passed in\n  (2) The signature passed in is a valid ECDSA signature of the hashed string-to-sign derived from the\n  canonical request\n\n  @param allocator memory allocator to use throughout the signing verification process\n  @param signable the thing to be signed.  See signable.h for common constructors for signables that\n wrap different types.\n  @param base_config pointer to a signing configuration, currently this must be of type aws_signing_config_aws\n  @param expected_canonical_request_cursor expected result when building the canonical request\n  @param signature_cursor the actual signature computed from a previous signing of the signable\n  @param ecc_key_pub_x the x coordinate of the public part of the ecc key to verify the signature\n  @param ecc_key_pub_y the y coordinate of the public part of the ecc key to verify the signature\n\n  @return AWS_OP_SUCCESS if the signing attempt was *initiated* successfully, AWS_OP_ERR otherwise"] pub fn aws_verify_sigv4a_signing (allocator : * mut aws_allocator , signable : * const aws_signable , base_config : * const aws_signing_config_base , expected_canonical_request_cursor : aws_byte_cursor , signature_cursor : aws_byte_cursor , ecc_key_pub_x : aws_byte_cursor , ecc_key_pub_y : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Another helper function to check a computed sigv4a signature."] pub fn aws_validate_v4a_authorization_value (allocator : * mut aws_allocator , ecc_key : * mut aws_ecc_key_pair , string_to_sign_cursor : aws_byte_cursor , signature_value_cursor : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes any padding added to the end of a sigv4a signature.  Signature must be hex-encoded.\n @param signature signature to remove padding from\n @return cursor that ranges over only the valid hex encoding of the sigv4a signature"] pub fn aws_trim_padded_sigv4a_signature (signature : aws_byte_cursor) -> aws_byte_cursor ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_request_checksum_context { _unused : [u8 ; 0] , } unsafe extern "C" { pub static s_checksum_algo_priority_list : [aws_s3_checksum_algorithm ; 5usize] ; } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_checksum_vtable { pub destroy : :: std :: option :: Option < unsafe extern "C" fn (checksum : * mut aws_s3_checksum) > , pub update : :: std :: option :: Option < unsafe extern "C" fn (checksum : * mut aws_s3_checksum , buf : * const aws_byte_cursor) -> :: libc :: c_int > , pub finalize : :: std :: option :: Option < unsafe extern "C" fn (checksum : * mut aws_s3_checksum , out : * mut aws_byte_buf) -> :: libc :: c_int > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_checksum_vtable"] [:: std :: mem :: size_of :: < aws_checksum_vtable > () - 24usize] ; ["Alignment of aws_checksum_vtable"] [:: std :: mem :: align_of :: < aws_checksum_vtable > () - 8usize] ; ["Offset of field: aws_checksum_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_checksum_vtable , destroy) - 0usize] ; ["Offset of field: aws_checksum_vtable::update"] [:: std :: mem :: offset_of ! (aws_checksum_vtable , update) - 8usize] ; ["Offset of field: aws_checksum_vtable::finalize"] [:: std :: mem :: offset_of ! (aws_checksum_vtable , finalize) - 16usize] ; } ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_s3_checksum { pub allocator : * mut aws_allocator , pub vtable : * mut aws_checksum_vtable , pub digest_size : usize , pub algorithm : aws_s3_checksum_algorithm , pub good : bool , pub impl_ : aws_s3_checksum__bindgen_ty_1 , } # [repr (C)] # [derive (Copy , Clone)] pub union aws_s3_checksum__bindgen_ty_1 { pub hash : * mut aws_hash , pub crc_val_32bit : u32 , pub crc_val_64bit : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_checksum__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_checksum__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_s3_checksum__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_checksum__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_checksum__bindgen_ty_1::hash"] [:: std :: mem :: offset_of ! (aws_s3_checksum__bindgen_ty_1 , hash) - 0usize] ; ["Offset of field: aws_s3_checksum__bindgen_ty_1::crc_val_32bit"] [:: std :: mem :: offset_of ! (aws_s3_checksum__bindgen_ty_1 , crc_val_32bit) - 0usize] ; ["Offset of field: aws_s3_checksum__bindgen_ty_1::crc_val_64bit"] [:: std :: mem :: offset_of ! (aws_s3_checksum__bindgen_ty_1 , crc_val_64bit) - 0usize] ; } ; impl Default for aws_s3_checksum__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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_checksum"] [:: std :: mem :: size_of :: < aws_s3_checksum > () - 40usize] ; ["Alignment of aws_s3_checksum"] [:: std :: mem :: align_of :: < aws_s3_checksum > () - 8usize] ; ["Offset of field: aws_s3_checksum::allocator"] [:: std :: mem :: offset_of ! (aws_s3_checksum , allocator) - 0usize] ; ["Offset of field: aws_s3_checksum::vtable"] [:: std :: mem :: offset_of ! (aws_s3_checksum , vtable) - 8usize] ; ["Offset of field: aws_s3_checksum::digest_size"] [:: std :: mem :: offset_of ! (aws_s3_checksum , digest_size) - 16usize] ; ["Offset of field: aws_s3_checksum::algorithm"] [:: std :: mem :: offset_of ! (aws_s3_checksum , algorithm) - 24usize] ; ["Offset of field: aws_s3_checksum::good"] [:: std :: mem :: offset_of ! (aws_s3_checksum , good) - 28usize] ; ["Offset of field: aws_s3_checksum::impl_"] [:: std :: mem :: offset_of ! (aws_s3_checksum , impl_) - 32usize] ; } ; impl Default for aws_s3_checksum { 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)] pub struct aws_s3_meta_request_checksum_config_storage { pub allocator : * mut aws_allocator , pub full_object_checksum : aws_byte_buf , pub has_full_object_checksum : bool , pub full_object_checksum_callback : aws_s3_meta_request_full_object_checksum_fn , pub user_data : * mut :: libc :: c_void , pub location : aws_s3_checksum_location , pub checksum_algorithm : aws_s3_checksum_algorithm , pub validate_response_checksum : bool , pub response_checksum_algorithms : aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 { pub crc64nvme : bool , pub crc32c : bool , pub crc32 : bool , pub sha1 : bool , pub sha256 : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_checksum_config_storage__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 > () - 5usize] ; ["Alignment of aws_s3_meta_request_checksum_config_storage__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 > () - 1usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::crc64nvme"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , crc64nvme) - 0usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::crc32c"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , crc32c) - 1usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::crc32"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , crc32) - 2usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::sha1"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , sha1) - 3usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::sha256"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , sha256) - 4usize] ; } ; # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_checksum_config_storage"] [:: std :: mem :: size_of :: < aws_s3_meta_request_checksum_config_storage > () - 80usize] ; ["Alignment of aws_s3_meta_request_checksum_config_storage"] [:: std :: mem :: align_of :: < aws_s3_meta_request_checksum_config_storage > () - 8usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::allocator"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , allocator) - 0usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::full_object_checksum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , full_object_checksum) - 8usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::has_full_object_checksum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , has_full_object_checksum) - 40usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::full_object_checksum_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , full_object_checksum_callback) - 48usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::user_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , user_data) - 56usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::location"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , location) - 64usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::checksum_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , checksum_algorithm) - 68usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::validate_response_checksum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , validate_response_checksum) - 72usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::response_checksum_algorithms"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , response_checksum_algorithms) - 73usize] ; } ; impl Default for aws_s3_meta_request_checksum_config_storage { 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 () } } } unsafe extern "C" { # [doc = " Helper stream that takes in a stream and the checksum context to help finalize the checksum from the underlying\n stream.\n The context will be only finalized when the checksum stream has read to the end of stream.\n\n Note: seek this stream will immediately fail, as it would prevent an accurate calculation of the\n checksum.\n\n @param allocator\n @param existing_stream The real content to read from. Destroying the checksum stream destroys the existing stream.\n                        outputs the checksum of existing stream to checksum_output upon destruction. Will be kept\n                        alive by the checksum stream\n @param context         Checksum context to keep and get checksum requirements from."] pub fn aws_checksum_stream_new_with_context (allocator : * mut aws_allocator , existing_stream : * mut aws_input_stream , context : * mut aws_s3_upload_request_checksum_context) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Helper stream that takes in a stream to keep track of the checksum of the underlying stream during read.\n Invoke `aws_checksum_stream_finalize_checksum` to get the checksum of the data has been read so far.\n\n Note: seek this stream will immediately fail, as it would prevent an accurate calculation of the\n checksum.\n\n @param allocator\n @param existing_stream The real content to read from. Destroying the checksum stream destroys the existing stream.\n                        outputs the checksum of existing stream to checksum_output upon destruction. Will be kept\n                        alive by the checksum stream\n @param algorithm       Checksum algorithm to use."] pub fn aws_checksum_stream_new (allocator : * mut aws_allocator , existing_stream : * mut aws_input_stream , algorithm : aws_s3_checksum_algorithm) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Finalize the checksum has read so far to the output checksum buf with base64 encoding.\n Not thread safe."] pub fn aws_checksum_stream_finalize_checksum (checksum_stream : * mut aws_input_stream , checksum_buf : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " TODO: properly support chunked encoding.\n Creates a chunked encoding stream that wraps an existing stream and adds checksum trailers.\n\n This function creates a stream that:\n 1. Encodes the input stream wraps the existing_stream with aws-chunked encoded.\n 2. Calculates a checksum of the stream content (if not already calculated)\n 3. Appends the checksum as a trailer at the end of the aws-chunked stream\n\n Note: This stream does not support seeking operations, as seeking would prevent\n accurate checksum calculation and corrupt the chunked encoding format.\n\n @param allocator         Memory allocator to use for stream creation and internal buffers\n @param existing_stream   The input stream to be chunked and checksummed. This stream\n                          will be acquired by the chunk stream and released when the\n                          chunk stream is destroyed. Must not be NULL.\n @param checksum_context  Context containing checksum configuration and state. Must not be NULL.\n                          The context contains:\n                          - algorithm: The checksum algorithm to use (CRC32, CRC32C, etc.)\n                          - base64_checksum: Buffer for the calculated checksum result\n                          - checksum_calculated: Whether checksum is pre-calculated or needs calculation\n                          - encoded_checksum_size: Expected size of the base64-encoded checksum\n\n                          If checksum_calculated is false, the stream will wrap existing_stream\n                          with a checksum stream to calculate the checksum during reading.\n                          If checksum_calculated is true, the existing checksum value will be used.\n\n @return A new input stream that provides chunked encoding with checksum trailers,\n         or NULL if creation fails. The returned stream must be released with\n         aws_input_stream_release() when no longer needed.\n\n @note The total length of the returned stream includes:\n       - Chunk size header (hex representation + \\r\\n)\n       - Original stream content\n       - Final chunk marker (0\\r\\n or \\r\\n0\\r\\n)\n       - Checksum trailer (header name + : + base64 checksum + \\r\\n\\r\\n)"] pub fn aws_chunk_stream_new (allocator : * mut aws_allocator , existing_stream : * mut aws_input_stream , context : * mut aws_s3_upload_request_checksum_context) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Get the size of the checksum output corresponding to the aws_s3_checksum_algorithm enum value."] pub fn aws_get_digest_size_from_checksum_algorithm (algorithm : aws_s3_checksum_algorithm) -> usize ; } unsafe extern "C" { # [doc = " Get header name to use for algorithm (e.g. \"x-amz-checksum-crc32\")"] pub fn aws_get_http_header_name_from_checksum_algorithm (algorithm : aws_s3_checksum_algorithm) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get algorithm's name (e.g. \"CRC32\"), to be used as the value of headers like `x-amz-checksum-algorithm`"] pub fn aws_get_checksum_algorithm_name (algorithm : aws_s3_checksum_algorithm) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the name of checksum algorithm to be used as the details of the parts were uploaded. Referring to\n https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompletedPart.html#AmazonS3-Type-CompletedPart"] pub fn aws_get_completed_part_name_from_checksum_algorithm (algorithm : aws_s3_checksum_algorithm) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " create a new aws_checksum corresponding to the aws_s3_checksum_algorithm enum value."] pub fn aws_checksum_new (allocator : * mut aws_allocator , algorithm : aws_s3_checksum_algorithm) -> * mut aws_s3_checksum ; } unsafe extern "C" { # [doc = " Compute an aws_checksum corresponding to the provided enum, passing a function pointer around instead of using a\n conditional would be faster, but would be a negligible improvement compared to the cost of processing data twice\n which would be the only time this function would be used, and would be harder to follow."] pub fn aws_checksum_compute (allocator : * mut aws_allocator , algorithm : aws_s3_checksum_algorithm , input : * const aws_byte_cursor , output : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Cleans up and deallocates checksum."] pub fn aws_checksum_destroy (checksum : * mut aws_s3_checksum) ; } unsafe extern "C" { # [doc = " Updates the running checksum with to_checksum. this can be called multiple times."] pub fn aws_checksum_update (checksum : * mut aws_s3_checksum , to_checksum : * const aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Completes the checksum computation and writes the final digest to output.\n Allocation of output is the caller's responsibility."] pub fn aws_checksum_finalize (checksum : * mut aws_s3_checksum , output : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_meta_request_checksum_config_storage_init (allocator : * mut aws_allocator , internal_config : * mut aws_s3_meta_request_checksum_config_storage , config : * const aws_s3_checksum_config , message : * const aws_http_message , log_id : * const :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_meta_request_checksum_config_storage_cleanup (internal_config : * mut aws_s3_meta_request_checksum_config_storage) ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_request_flags { AWS_S3_REQUEST_FLAG_RECORD_RESPONSE_HEADERS = 1 , AWS_S3_REQUEST_FLAG_ALWAYS_SEND = 2 , AWS_S3_REQUEST_FLAG_ALLOCATE_BUFFER_FROM_POOL = 4 , } # [doc = " Information sent in the telemetry_callback after each aws_s3_request finished/retried from meta request."] # [repr (C)] pub struct aws_s3_request_metrics { pub allocator : * mut aws_allocator , pub time_metrics : aws_s3_request_metrics__bindgen_ty_1 , pub req_resp_info_metrics : aws_s3_request_metrics__bindgen_ty_2 , pub crt_info_metrics : aws_s3_request_metrics__bindgen_ty_3 , pub part_info_metrics : aws_s3_request_metrics__bindgen_ty_4 , pub ref_count : aws_ref_count , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_request_metrics__bindgen_ty_1 { pub s3_request_first_attempt_start_timestamp_ns : i64 , pub s3_request_last_attempt_end_timestamp_ns : i64 , pub s3_request_total_duration_ns : i64 , pub start_timestamp_ns : i64 , pub end_timestamp_ns : i64 , pub total_duration_ns : i64 , pub send_start_timestamp_ns : i64 , pub send_end_timestamp_ns : i64 , pub sending_duration_ns : i64 , pub receive_start_timestamp_ns : i64 , pub receive_end_timestamp_ns : i64 , pub receiving_duration_ns : i64 , pub sign_start_timestamp_ns : i64 , pub sign_end_timestamp_ns : i64 , pub signing_duration_ns : i64 , pub mem_acquire_start_timestamp_ns : i64 , pub mem_acquire_end_timestamp_ns : i64 , pub mem_acquire_duration_ns : i64 , pub deliver_start_timestamp_ns : i64 , pub deliver_end_timestamp_ns : i64 , pub deliver_duration_ns : i64 , pub conn_acquire_start_timestamp_ns : i64 , pub conn_acquire_end_timestamp_ns : i64 , pub conn_acquire_duration_ns : i64 , pub retry_delay_start_timestamp_ns : i64 , pub retry_delay_end_timestamp_ns : i64 , pub retry_delay_duration_ns : i64 , pub service_call_duration_ns : i64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_request_metrics__bindgen_ty_1 > () - 224usize] ; ["Alignment of aws_s3_request_metrics__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_request_metrics__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::s3_request_first_attempt_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , s3_request_first_attempt_start_timestamp_ns) - 0usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::s3_request_last_attempt_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , s3_request_last_attempt_end_timestamp_ns) - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::s3_request_total_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , s3_request_total_duration_ns) - 16usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , start_timestamp_ns) - 24usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , end_timestamp_ns) - 32usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::total_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , total_duration_ns) - 40usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::send_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , send_start_timestamp_ns) - 48usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::send_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , send_end_timestamp_ns) - 56usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::sending_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , sending_duration_ns) - 64usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::receive_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , receive_start_timestamp_ns) - 72usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::receive_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , receive_end_timestamp_ns) - 80usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::receiving_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , receiving_duration_ns) - 88usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::sign_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , sign_start_timestamp_ns) - 96usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::sign_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , sign_end_timestamp_ns) - 104usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::signing_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , signing_duration_ns) - 112usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::mem_acquire_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , mem_acquire_start_timestamp_ns) - 120usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::mem_acquire_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , mem_acquire_end_timestamp_ns) - 128usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::mem_acquire_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , mem_acquire_duration_ns) - 136usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::deliver_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , deliver_start_timestamp_ns) - 144usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::deliver_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , deliver_end_timestamp_ns) - 152usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::deliver_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , deliver_duration_ns) - 160usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::conn_acquire_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , conn_acquire_start_timestamp_ns) - 168usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::conn_acquire_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , conn_acquire_end_timestamp_ns) - 176usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::conn_acquire_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , conn_acquire_duration_ns) - 184usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::retry_delay_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , retry_delay_start_timestamp_ns) - 192usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::retry_delay_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , retry_delay_end_timestamp_ns) - 200usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::retry_delay_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , retry_delay_duration_ns) - 208usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::service_call_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , service_call_duration_ns) - 216usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_request_metrics__bindgen_ty_2 { pub response_status : :: libc :: c_int , pub response_headers : * mut aws_http_headers , pub request_path_query : * mut aws_string , pub host_address : * mut aws_string , pub request_id : * mut aws_string , pub extended_request_id : * mut aws_string , pub operation_name : * mut aws_string , pub request_type : aws_s3_request_type , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_request_metrics__bindgen_ty_2 > () - 64usize] ; ["Alignment of aws_s3_request_metrics__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_request_metrics__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::response_status"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , response_status) - 0usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::response_headers"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , response_headers) - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::request_path_query"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , request_path_query) - 16usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::host_address"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , host_address) - 24usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::request_id"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , request_id) - 32usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::extended_request_id"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , extended_request_id) - 40usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::operation_name"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , operation_name) - 48usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::request_type"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , request_type) - 56usize] ; } ; impl Default for aws_s3_request_metrics__bindgen_ty_2 { 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)] pub struct aws_s3_request_metrics__bindgen_ty_3 { pub ip_address : * mut aws_string , pub connection_ptr : * mut :: libc :: c_void , pub request_ptr : * mut :: libc :: c_void , pub thread_id : aws_thread_id_t , pub stream_id : u32 , pub error_code : :: libc :: c_int , pub retry_attempt : u32 , pub memory_allocated_from_pool : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_request_metrics__bindgen_ty_3 > () - 48usize] ; ["Alignment of aws_s3_request_metrics__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_request_metrics__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::ip_address"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , ip_address) - 0usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::connection_ptr"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , connection_ptr) - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::request_ptr"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , request_ptr) - 16usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::thread_id"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , thread_id) - 24usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::stream_id"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , stream_id) - 32usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::error_code"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , error_code) - 36usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::retry_attempt"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , retry_attempt) - 40usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::memory_allocated_from_pool"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , memory_allocated_from_pool) - 44usize] ; } ; impl Default for aws_s3_request_metrics__bindgen_ty_3 { 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)] pub struct aws_s3_request_metrics__bindgen_ty_4 { pub part_range_start : u64 , pub part_range_end : u64 , pub part_number : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics__bindgen_ty_4"] [:: std :: mem :: size_of :: < aws_s3_request_metrics__bindgen_ty_4 > () - 24usize] ; ["Alignment of aws_s3_request_metrics__bindgen_ty_4"] [:: std :: mem :: align_of :: < aws_s3_request_metrics__bindgen_ty_4 > () - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_4::part_range_start"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_4 , part_range_start) - 0usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_4::part_range_end"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_4 , part_range_end) - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_4::part_number"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_4 , part_number) - 16usize] ; } ; # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics"] [:: std :: mem :: size_of :: < aws_s3_request_metrics > () - 392usize] ; ["Alignment of aws_s3_request_metrics"] [:: std :: mem :: align_of :: < aws_s3_request_metrics > () - 8usize] ; ["Offset of field: aws_s3_request_metrics::allocator"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , allocator) - 0usize] ; ["Offset of field: aws_s3_request_metrics::time_metrics"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , time_metrics) - 8usize] ; ["Offset of field: aws_s3_request_metrics::req_resp_info_metrics"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , req_resp_info_metrics) - 232usize] ; ["Offset of field: aws_s3_request_metrics::crt_info_metrics"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , crt_info_metrics) - 296usize] ; ["Offset of field: aws_s3_request_metrics::part_info_metrics"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , part_info_metrics) - 344usize] ; ["Offset of field: aws_s3_request_metrics::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , ref_count) - 368usize] ; } ; impl Default for aws_s3_request_metrics { 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)] pub struct aws_s3_request { pub node : aws_linked_list_node , pub retry_start_timestamp_ns : i64 , pub retry_end_timestamp_ns : i64 , pub cancellable_http_streams_list_node : aws_linked_list_node , pub pending_buffer_future_list_node : aws_linked_list_node , pub synced_data : aws_s3_request__bindgen_ty_1 , pub ref_count : aws_ref_count , pub allocator : * mut aws_allocator , pub meta_request : * mut aws_s3_meta_request , pub buffer_size : usize , pub request_body : aws_byte_buf , pub fio_streaming : bool , pub request_body_stream : * mut aws_input_stream , pub content_length : u64 , # [doc = " Ticket to acquire the buffer."] pub ticket : * mut aws_s3_buffer_ticket , pub part_range_start : u64 , pub part_range_end : u64 , pub part_number : u32 , pub upload_timeout_ms : usize , pub num_times_prepared : u32 , pub request_level_response_header_checksum : aws_byte_buf , pub request_level_running_response_sum : * mut aws_s3_checksum , pub validation_algorithm : aws_s3_checksum_algorithm , pub did_validate : bool , pub checksum_match : bool , pub request_tag : :: libc :: c_int , pub request_type : aws_s3_request_type , pub operation_name : * mut aws_string , pub send_data : aws_s3_request__bindgen_ty_2 , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub __bindgen_padding_0 : [u8 ; 7usize] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_request__bindgen_ty_1 { pub cancellable_http_stream : * mut aws_http_stream , pub buffer_future : * mut aws_future_s3_buffer_ticket , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_request__bindgen_ty_1 > () - 16usize] ; ["Alignment of aws_s3_request__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_request__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_request__bindgen_ty_1::cancellable_http_stream"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_1 , cancellable_http_stream) - 0usize] ; ["Offset of field: aws_s3_request__bindgen_ty_1::buffer_future"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_1 , buffer_future) - 8usize] ; } ; impl Default for aws_s3_request__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 () } } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_request__bindgen_ty_2 { pub message : * mut aws_http_message , pub signable : * mut aws_signable , pub response_headers : * mut aws_http_headers , pub response_body : aws_byte_buf , pub response_status : :: libc :: c_int , pub request_id : * mut aws_string , pub amz_id_2 : * mut aws_string , pub metrics : * mut aws_s3_request_metrics , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub __bindgen_padding_0 : [u8 ; 7usize] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_request__bindgen_ty_2 > () - 96usize] ; ["Alignment of aws_s3_request__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_request__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::message"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , message) - 0usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::signable"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , signable) - 8usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::response_headers"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , response_headers) - 16usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::response_body"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , response_body) - 24usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::response_status"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , response_status) - 56usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::request_id"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , request_id) - 64usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::amz_id_2"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , amz_id_2) - 72usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::metrics"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , metrics) - 80usize] ; } ; impl Default for aws_s3_request__bindgen_ty_2 { 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 () } } } impl aws_s3_request__bindgen_ty_2 { # [inline] pub fn require_streaming_unsigned_payload_header (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_require_streaming_unsigned_payload_header (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn require_streaming_unsigned_payload_header_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_require_streaming_unsigned_payload_header_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (require_streaming_unsigned_payload_header : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let require_streaming_unsigned_payload_header : u32 = unsafe { :: std :: mem :: transmute (require_streaming_unsigned_payload_header) } ; require_streaming_unsigned_payload_header as u64 }) ; __bindgen_bitfield_unit } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request"] [:: std :: mem :: size_of :: < aws_s3_request > () - 400usize] ; ["Alignment of aws_s3_request"] [:: std :: mem :: align_of :: < aws_s3_request > () - 8usize] ; ["Offset of field: aws_s3_request::node"] [:: std :: mem :: offset_of ! (aws_s3_request , node) - 0usize] ; ["Offset of field: aws_s3_request::retry_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request , retry_start_timestamp_ns) - 16usize] ; ["Offset of field: aws_s3_request::retry_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request , retry_end_timestamp_ns) - 24usize] ; ["Offset of field: aws_s3_request::cancellable_http_streams_list_node"] [:: std :: mem :: offset_of ! (aws_s3_request , cancellable_http_streams_list_node) - 32usize] ; ["Offset of field: aws_s3_request::pending_buffer_future_list_node"] [:: std :: mem :: offset_of ! (aws_s3_request , pending_buffer_future_list_node) - 48usize] ; ["Offset of field: aws_s3_request::synced_data"] [:: std :: mem :: offset_of ! (aws_s3_request , synced_data) - 64usize] ; ["Offset of field: aws_s3_request::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_request , ref_count) - 80usize] ; ["Offset of field: aws_s3_request::allocator"] [:: std :: mem :: offset_of ! (aws_s3_request , allocator) - 104usize] ; ["Offset of field: aws_s3_request::meta_request"] [:: std :: mem :: offset_of ! (aws_s3_request , meta_request) - 112usize] ; ["Offset of field: aws_s3_request::buffer_size"] [:: std :: mem :: offset_of ! (aws_s3_request , buffer_size) - 120usize] ; ["Offset of field: aws_s3_request::request_body"] [:: std :: mem :: offset_of ! (aws_s3_request , request_body) - 128usize] ; ["Offset of field: aws_s3_request::fio_streaming"] [:: std :: mem :: offset_of ! (aws_s3_request , fio_streaming) - 160usize] ; ["Offset of field: aws_s3_request::request_body_stream"] [:: std :: mem :: offset_of ! (aws_s3_request , request_body_stream) - 168usize] ; ["Offset of field: aws_s3_request::content_length"] [:: std :: mem :: offset_of ! (aws_s3_request , content_length) - 176usize] ; ["Offset of field: aws_s3_request::ticket"] [:: std :: mem :: offset_of ! (aws_s3_request , ticket) - 184usize] ; ["Offset of field: aws_s3_request::part_range_start"] [:: std :: mem :: offset_of ! (aws_s3_request , part_range_start) - 192usize] ; ["Offset of field: aws_s3_request::part_range_end"] [:: std :: mem :: offset_of ! (aws_s3_request , part_range_end) - 200usize] ; ["Offset of field: aws_s3_request::part_number"] [:: std :: mem :: offset_of ! (aws_s3_request , part_number) - 208usize] ; ["Offset of field: aws_s3_request::upload_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_request , upload_timeout_ms) - 216usize] ; ["Offset of field: aws_s3_request::num_times_prepared"] [:: std :: mem :: offset_of ! (aws_s3_request , num_times_prepared) - 224usize] ; ["Offset of field: aws_s3_request::request_level_response_header_checksum"] [:: std :: mem :: offset_of ! (aws_s3_request , request_level_response_header_checksum) - 232usize] ; ["Offset of field: aws_s3_request::request_level_running_response_sum"] [:: std :: mem :: offset_of ! (aws_s3_request , request_level_running_response_sum) - 264usize] ; ["Offset of field: aws_s3_request::validation_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_request , validation_algorithm) - 272usize] ; ["Offset of field: aws_s3_request::did_validate"] [:: std :: mem :: offset_of ! (aws_s3_request , did_validate) - 276usize] ; ["Offset of field: aws_s3_request::checksum_match"] [:: std :: mem :: offset_of ! (aws_s3_request , checksum_match) - 277usize] ; ["Offset of field: aws_s3_request::request_tag"] [:: std :: mem :: offset_of ! (aws_s3_request , request_tag) - 280usize] ; ["Offset of field: aws_s3_request::request_type"] [:: std :: mem :: offset_of ! (aws_s3_request , request_type) - 284usize] ; ["Offset of field: aws_s3_request::operation_name"] [:: std :: mem :: offset_of ! (aws_s3_request , operation_name) - 288usize] ; ["Offset of field: aws_s3_request::send_data"] [:: std :: mem :: offset_of ! (aws_s3_request , send_data) - 296usize] ; } ; impl Default for aws_s3_request { 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 () } } } impl aws_s3_request { # [inline] pub fn record_response_headers (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_record_response_headers (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn record_response_headers_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_record_response_headers_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn should_allocate_buffer_from_pool (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_should_allocate_buffer_from_pool (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub unsafe fn should_allocate_buffer_from_pool_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 1usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_should_allocate_buffer_from_pool_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 1usize , 1u8 , val as u64 ,) } } # [inline] pub fn tracked_by_client (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_tracked_by_client (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub unsafe fn tracked_by_client_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 2usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_tracked_by_client_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 2usize , 1u8 , val as u64 ,) } } # [inline] pub fn always_send (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_always_send (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (3usize , 1u8 , val as u64) } } # [inline] pub unsafe fn always_send_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 3usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_always_send_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 3usize , 1u8 , val as u64 ,) } } # [inline] pub fn discovers_object_size (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (4usize , 1u8) as u32) } } # [inline] pub fn set_discovers_object_size (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (4usize , 1u8 , val as u64) } } # [inline] pub unsafe fn discovers_object_size_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 4usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_discovers_object_size_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 4usize , 1u8 , val as u64 ,) } } # [inline] pub fn is_noop (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (5usize , 1u8) as u32) } } # [inline] pub fn set_is_noop (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (5usize , 1u8 , val as u64) } } # [inline] pub unsafe fn is_noop_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 5usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_is_noop_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 5usize , 1u8 , val as u64 ,) } } # [inline] pub fn was_previously_uploaded (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 1u8) as u32) } } # [inline] pub fn set_was_previously_uploaded (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (6usize , 1u8 , val as u64) } } # [inline] pub unsafe fn was_previously_uploaded_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 6usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_was_previously_uploaded_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 6usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (record_response_headers : u32 , should_allocate_buffer_from_pool : u32 , tracked_by_client : u32 , always_send : u32 , discovers_object_size : u32 , is_noop : u32 , was_previously_uploaded : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let record_response_headers : u32 = unsafe { :: std :: mem :: transmute (record_response_headers) } ; record_response_headers as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let should_allocate_buffer_from_pool : u32 = unsafe { :: std :: mem :: transmute (should_allocate_buffer_from_pool) } ; should_allocate_buffer_from_pool as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let tracked_by_client : u32 = unsafe { :: std :: mem :: transmute (tracked_by_client) } ; tracked_by_client as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let always_send : u32 = unsafe { :: std :: mem :: transmute (always_send) } ; always_send as u64 }) ; __bindgen_bitfield_unit . set (4usize , 1u8 , { let discovers_object_size : u32 = unsafe { :: std :: mem :: transmute (discovers_object_size) } ; discovers_object_size as u64 }) ; __bindgen_bitfield_unit . set (5usize , 1u8 , { let is_noop : u32 = unsafe { :: std :: mem :: transmute (is_noop) } ; is_noop as u64 }) ; __bindgen_bitfield_unit . set (6usize , 1u8 , { let was_previously_uploaded : u32 = unsafe { :: std :: mem :: transmute (was_previously_uploaded) } ; was_previously_uploaded as u64 }) ; __bindgen_bitfield_unit } } unsafe extern "C" { pub fn aws_s3_request_new (meta_request : * mut aws_s3_meta_request , request_tag : :: libc :: c_int , request_type : aws_s3_request_type , part_number : u32 , flags : u32) -> * mut aws_s3_request ; } unsafe extern "C" { pub fn aws_s3_request_setup_send_data (request : * mut aws_s3_request , message : * mut aws_http_message) ; } unsafe extern "C" { pub fn aws_s3_request_clean_up_send_data (request : * mut aws_s3_request) ; } unsafe extern "C" { pub fn aws_s3_request_acquire (request : * mut aws_s3_request) -> * mut aws_s3_request ; } unsafe extern "C" { pub fn aws_s3_request_release (request : * mut aws_s3_request) -> * mut aws_s3_request ; } unsafe extern "C" { pub fn aws_s3_request_metrics_new (allocator : * mut aws_allocator) -> * mut aws_s3_request_metrics ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_state { AWS_S3_META_REQUEST_STATE_ACTIVE = 0 , AWS_S3_META_REQUEST_STATE_FINISHED = 1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_update_flags { AWS_S3_META_REQUEST_UPDATE_FLAG_CONSERVATIVE = 2 , } pub type aws_s3_meta_request_prepare_request_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_s3_prepare_request_payload { pub allocator : * mut aws_allocator , pub request : * mut aws_s3_request , pub task : aws_task , pub asyncstep_prepare_request : * mut aws_future_void , pub callback : aws_s3_meta_request_prepare_request_callback_fn , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_prepare_request_payload"] [:: std :: mem :: size_of :: < aws_s3_prepare_request_payload > () - 104usize] ; ["Alignment of aws_s3_prepare_request_payload"] [:: std :: mem :: align_of :: < aws_s3_prepare_request_payload > () - 8usize] ; ["Offset of field: aws_s3_prepare_request_payload::allocator"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , allocator) - 0usize] ; ["Offset of field: aws_s3_prepare_request_payload::request"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , request) - 8usize] ; ["Offset of field: aws_s3_prepare_request_payload::task"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , task) - 16usize] ; ["Offset of field: aws_s3_prepare_request_payload::asyncstep_prepare_request"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , asyncstep_prepare_request) - 80usize] ; ["Offset of field: aws_s3_prepare_request_payload::callback"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , callback) - 88usize] ; ["Offset of field: aws_s3_prepare_request_payload::user_data"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , user_data) - 96usize] ; } ; impl Default for aws_s3_prepare_request_payload { 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 (Copy , Clone)] pub struct aws_s3_meta_request_event { pub type_ : aws_s3_meta_request_event_aws_s3_meta_request_event_type , pub u : aws_s3_meta_request_event__bindgen_ty_1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_event_aws_s3_meta_request_event_type { AWS_S3_META_REQUEST_EVENT_RESPONSE_BODY = 0 , AWS_S3_META_REQUEST_EVENT_PROGRESS = 1 , AWS_S3_META_REQUEST_EVENT_TELEMETRY = 2 , } # [repr (C)] # [derive (Copy , Clone)] pub union aws_s3_meta_request_event__bindgen_ty_1 { pub response_body : aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 , pub progress : aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 , pub telemetry : aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 { pub completed_request : * mut aws_s3_request , pub bytes_delivered : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 > () - 16usize] ; ["Alignment of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1::completed_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 , completed_request) - 0usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1::bytes_delivered"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 , bytes_delivered) - 8usize] ; } ; impl Default for aws_s3_meta_request_event__bindgen_ty_1__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 () } } } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 { pub info : aws_s3_meta_request_progress , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 > () - 16usize] ; ["Alignment of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2::info"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 , info) - 0usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 { pub metrics : * mut aws_s3_request_metrics , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 > () - 8usize] ; ["Alignment of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3::metrics"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 , metrics) - 0usize] ; } ; impl Default for aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 { 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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event__bindgen_ty_1 > () - 16usize] ; ["Alignment of aws_s3_meta_request_event__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1::response_body"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1 , response_body) - 0usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1::progress"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1 , progress) - 0usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1::telemetry"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1 , telemetry) - 0usize] ; } ; impl Default for aws_s3_meta_request_event__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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event > () - 24usize] ; ["Alignment of aws_s3_meta_request_event"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event::type_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event , type_) - 0usize] ; ["Offset of field: aws_s3_meta_request_event::u"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event , u) - 8usize] ; } ; impl Default for aws_s3_meta_request_event { 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)] pub struct aws_s3_meta_request_vtable { pub update : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , flags : u32 , out_request : * mut * mut aws_s3_request) -> bool > , pub schedule_prepare_request : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , callback : aws_s3_meta_request_prepare_request_callback_fn , user_data : * mut :: libc :: c_void) > , pub prepare_request : :: std :: option :: Option < unsafe extern "C" fn (request : * mut aws_s3_request) -> * mut aws_future_void > , pub init_signing_date_time : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , date_time : * mut aws_date_time) > , pub sign_request : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , on_signing_complete : aws_signing_complete_fn , user_data : * mut :: libc :: c_void) > , pub send_request_finish : :: std :: option :: Option < unsafe extern "C" fn (connection : * mut aws_s3_connection , stream : * mut aws_http_stream , error_code : :: libc :: c_int) > , pub finished_request : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , error_code : :: libc :: c_int) > , pub finish : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request) > , pub destroy : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut aws_s3_meta_request) > , pub pause : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , resume_token : * mut * mut aws_s3_meta_request_resume_token) -> :: libc :: c_int > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_vtable"] [:: std :: mem :: size_of :: < aws_s3_meta_request_vtable > () - 80usize] ; ["Alignment of aws_s3_meta_request_vtable"] [:: std :: mem :: align_of :: < aws_s3_meta_request_vtable > () - 8usize] ; ["Offset of field: aws_s3_meta_request_vtable::update"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , update) - 0usize] ; ["Offset of field: aws_s3_meta_request_vtable::schedule_prepare_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , schedule_prepare_request) - 8usize] ; ["Offset of field: aws_s3_meta_request_vtable::prepare_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , prepare_request) - 16usize] ; ["Offset of field: aws_s3_meta_request_vtable::init_signing_date_time"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , init_signing_date_time) - 24usize] ; ["Offset of field: aws_s3_meta_request_vtable::sign_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , sign_request) - 32usize] ; ["Offset of field: aws_s3_meta_request_vtable::send_request_finish"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , send_request_finish) - 40usize] ; ["Offset of field: aws_s3_meta_request_vtable::finished_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , finished_request) - 48usize] ; ["Offset of field: aws_s3_meta_request_vtable::finish"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , finish) - 56usize] ; ["Offset of field: aws_s3_meta_request_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , destroy) - 64usize] ; ["Offset of field: aws_s3_meta_request_vtable::pause"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , pause) - 72usize] ; } ; # [doc = " This represents one meta request, ie, one accelerated file transfer.  One S3 meta request can represent multiple S3\n requests."] # [repr (C)] pub struct aws_s3_meta_request { pub allocator : * mut aws_allocator , pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , pub vtable : * mut aws_s3_meta_request_vtable , pub initial_request_message : * mut aws_http_message , pub request_body_async_stream : * mut aws_async_input_stream , pub request_body_parallel_stream : * mut aws_parallel_input_stream , pub request_body_using_async_writes : bool , pub part_size : usize , pub max_active_connections_override : u32 , pub cached_signing_config : * mut aws_cached_signing_config_aws , pub client : * mut aws_s3_client , pub endpoint : * mut aws_s3_endpoint , pub num_requests_network : aws_atomic_var , pub io_event_loop : * mut aws_event_loop , pub user_data : * mut :: libc :: c_void , pub headers_callback : aws_s3_meta_request_headers_callback_fn , pub body_callback : aws_s3_meta_request_receive_body_callback_fn , pub body_callback_ex : aws_s3_meta_request_receive_body_callback_ex_fn , pub finish_callback : aws_s3_meta_request_finish_fn , pub shutdown_callback : aws_s3_meta_request_shutdown_fn , pub progress_callback : aws_s3_meta_request_progress_fn , pub telemetry_callback : aws_s3_meta_request_telemetry_fn , pub upload_review_callback : aws_s3_meta_request_upload_review_fn , pub type_ : aws_s3_meta_request_type , pub s3express_session_host : * mut aws_string , pub is_express : bool , pub buffer_pool_optimized : bool , pub num_request_being_prepared : aws_atomic_var , pub synced_data : aws_s3_meta_request__bindgen_ty_1 , pub client_process_work_threaded_data : aws_s3_meta_request__bindgen_ty_2 , pub io_threaded_data : aws_s3_meta_request__bindgen_ty_3 , pub should_compute_content_md5 : bool , pub checksum_config : aws_s3_meta_request_checksum_config_storage , pub meta_request_level_response_header_checksum : aws_byte_buf , pub meta_request_level_running_response_sum : * mut aws_s3_checksum , pub recv_file : * mut FILE , pub recv_filepath : * mut aws_string , pub recv_file_delete_on_failure : bool , pub fio_opts : aws_s3_file_io_options , } # [repr (C)] pub struct aws_s3_meta_request__bindgen_ty_1 { pub lock : aws_mutex , pub pending_body_streaming_requests : aws_priority_queue , pub state : aws_s3_meta_request_state , pub read_window_running_total : u64 , pub next_streaming_part : u32 , pub num_parts_delivery_sent : u32 , pub num_parts_delivery_completed : u32 , pub event_delivery_task : aws_task , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub event_delivery_array : aws_array_list , pub event_delivery_active : bool , pub finish_result : aws_s3_meta_request_result , pub _bitfield_align_2 : [u8 ; 0] , pub _bitfield_2 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub cancellable_http_streams_list : aws_linked_list , pub pending_buffer_futures : aws_linked_list , pub async_write : aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data { pub ready_to_send : bool , pub eof : bool , pub buffered_data : aws_byte_buf , pub buffered_data_ticket : * mut aws_s3_buffer_ticket , pub waker : aws_simple_completion_callback , pub waker_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data"] [:: std :: mem :: size_of :: < aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data > () - 64usize] ; ["Alignment of aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data"] [:: std :: mem :: align_of :: < aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data > () - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::ready_to_send"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , ready_to_send) - 0usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::eof"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , eof) - 1usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::buffered_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , buffered_data) - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::buffered_data_ticket"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , buffered_data_ticket) - 40usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::waker"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , waker) - 48usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::waker_user_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , waker_user_data) - 56usize] ; } ; impl Default for aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_meta_request__bindgen_ty_1 > () - 464usize] ; ["Alignment of aws_s3_meta_request__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_meta_request__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::lock"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , lock) - 0usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::pending_body_streaming_requests"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , pending_body_streaming_requests) - 48usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::state"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , state) - 136usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::read_window_running_total"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , read_window_running_total) - 144usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::next_streaming_part"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , next_streaming_part) - 152usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::num_parts_delivery_sent"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , num_parts_delivery_sent) - 156usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::num_parts_delivery_completed"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , num_parts_delivery_completed) - 160usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::event_delivery_task"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , event_delivery_task) - 168usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::event_delivery_array"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , event_delivery_array) - 240usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::event_delivery_active"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , event_delivery_active) - 280usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::finish_result"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , finish_result) - 288usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::cancellable_http_streams_list"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , cancellable_http_streams_list) - 336usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::pending_buffer_futures"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , pending_buffer_futures) - 368usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::async_write"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , async_write) - 400usize] ; } ; impl Default for aws_s3_meta_request__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 () } } } impl aws_s3_meta_request__bindgen_ty_1 { # [inline] pub fn event_delivery_task_scheduled (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_event_delivery_task_scheduled (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn event_delivery_task_scheduled_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_event_delivery_task_scheduled_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (event_delivery_task_scheduled : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let event_delivery_task_scheduled : u32 = unsafe { :: std :: mem :: transmute (event_delivery_task_scheduled) } ; event_delivery_task_scheduled as u64 }) ; __bindgen_bitfield_unit } # [inline] pub fn finish_result_set (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_2 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_finish_result_set (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_2 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn finish_result_set_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_2) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_finish_result_set_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_2) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_2 (finish_result_set : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let finish_result_set : u32 = unsafe { :: std :: mem :: transmute (finish_result_set) } ; finish_result_set as u64 }) ; __bindgen_bitfield_unit } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request__bindgen_ty_2 { pub node : aws_linked_list_node , pub scheduled : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_meta_request__bindgen_ty_2 > () - 24usize] ; ["Alignment of aws_s3_meta_request__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_meta_request__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_2::node"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_2 , node) - 0usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_2::scheduled"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_2 , scheduled) - 16usize] ; } ; impl Default for aws_s3_meta_request__bindgen_ty_2 { 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)] pub struct aws_s3_meta_request__bindgen_ty_3 { pub event_delivery_array : aws_array_list , pub next_deliver_range_start : u64 , pub num_bytes_delivery_completed : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_meta_request__bindgen_ty_3 > () - 56usize] ; ["Alignment of aws_s3_meta_request__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_meta_request__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_3::event_delivery_array"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_3 , event_delivery_array) - 0usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_3::next_deliver_range_start"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_3 , next_deliver_range_start) - 40usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_3::num_bytes_delivery_completed"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_3 , num_bytes_delivery_completed) - 48usize] ; } ; impl Default for aws_s3_meta_request__bindgen_ty_3 { 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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request"] [:: std :: mem :: size_of :: < aws_s3_meta_request > () - 960usize] ; ["Alignment of aws_s3_meta_request"] [:: std :: mem :: align_of :: < aws_s3_meta_request > () - 8usize] ; ["Offset of field: aws_s3_meta_request::allocator"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , allocator) - 0usize] ; ["Offset of field: aws_s3_meta_request::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , ref_count) - 8usize] ; ["Offset of field: aws_s3_meta_request::impl_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , impl_) - 32usize] ; ["Offset of field: aws_s3_meta_request::vtable"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , vtable) - 40usize] ; ["Offset of field: aws_s3_meta_request::initial_request_message"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , initial_request_message) - 48usize] ; ["Offset of field: aws_s3_meta_request::request_body_async_stream"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , request_body_async_stream) - 56usize] ; ["Offset of field: aws_s3_meta_request::request_body_parallel_stream"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , request_body_parallel_stream) - 64usize] ; ["Offset of field: aws_s3_meta_request::request_body_using_async_writes"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , request_body_using_async_writes) - 72usize] ; ["Offset of field: aws_s3_meta_request::part_size"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , part_size) - 80usize] ; ["Offset of field: aws_s3_meta_request::max_active_connections_override"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , max_active_connections_override) - 88usize] ; ["Offset of field: aws_s3_meta_request::cached_signing_config"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , cached_signing_config) - 96usize] ; ["Offset of field: aws_s3_meta_request::client"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , client) - 104usize] ; ["Offset of field: aws_s3_meta_request::endpoint"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , endpoint) - 112usize] ; ["Offset of field: aws_s3_meta_request::num_requests_network"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , num_requests_network) - 120usize] ; ["Offset of field: aws_s3_meta_request::io_event_loop"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , io_event_loop) - 128usize] ; ["Offset of field: aws_s3_meta_request::user_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , user_data) - 136usize] ; ["Offset of field: aws_s3_meta_request::headers_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , headers_callback) - 144usize] ; ["Offset of field: aws_s3_meta_request::body_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , body_callback) - 152usize] ; ["Offset of field: aws_s3_meta_request::body_callback_ex"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , body_callback_ex) - 160usize] ; ["Offset of field: aws_s3_meta_request::finish_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , finish_callback) - 168usize] ; ["Offset of field: aws_s3_meta_request::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , shutdown_callback) - 176usize] ; ["Offset of field: aws_s3_meta_request::progress_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , progress_callback) - 184usize] ; ["Offset of field: aws_s3_meta_request::telemetry_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , telemetry_callback) - 192usize] ; ["Offset of field: aws_s3_meta_request::upload_review_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , upload_review_callback) - 200usize] ; ["Offset of field: aws_s3_meta_request::type_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , type_) - 208usize] ; ["Offset of field: aws_s3_meta_request::s3express_session_host"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , s3express_session_host) - 216usize] ; ["Offset of field: aws_s3_meta_request::is_express"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , is_express) - 224usize] ; ["Offset of field: aws_s3_meta_request::buffer_pool_optimized"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , buffer_pool_optimized) - 225usize] ; ["Offset of field: aws_s3_meta_request::num_request_being_prepared"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , num_request_being_prepared) - 232usize] ; ["Offset of field: aws_s3_meta_request::synced_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , synced_data) - 240usize] ; ["Offset of field: aws_s3_meta_request::client_process_work_threaded_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , client_process_work_threaded_data) - 704usize] ; ["Offset of field: aws_s3_meta_request::io_threaded_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , io_threaded_data) - 728usize] ; ["Offset of field: aws_s3_meta_request::should_compute_content_md5"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , should_compute_content_md5) - 784usize] ; ["Offset of field: aws_s3_meta_request::checksum_config"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , checksum_config) - 792usize] ; ["Offset of field: aws_s3_meta_request::meta_request_level_response_header_checksum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , meta_request_level_response_header_checksum) - 872usize] ; ["Offset of field: aws_s3_meta_request::meta_request_level_running_response_sum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , meta_request_level_running_response_sum) - 904usize] ; ["Offset of field: aws_s3_meta_request::recv_file"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , recv_file) - 912usize] ; ["Offset of field: aws_s3_meta_request::recv_filepath"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , recv_filepath) - 920usize] ; ["Offset of field: aws_s3_meta_request::recv_file_delete_on_failure"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , recv_file_delete_on_failure) - 928usize] ; ["Offset of field: aws_s3_meta_request::fio_opts"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , fio_opts) - 936usize] ; } ; impl Default for aws_s3_meta_request { 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)] pub struct aws_s3_mpu_part_info { pub size : u64 , pub etag : * mut aws_string , pub checksum_context : * mut aws_s3_upload_request_checksum_context , pub was_previously_uploaded : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_mpu_part_info"] [:: std :: mem :: size_of :: < aws_s3_mpu_part_info > () - 32usize] ; ["Alignment of aws_s3_mpu_part_info"] [:: std :: mem :: align_of :: < aws_s3_mpu_part_info > () - 8usize] ; ["Offset of field: aws_s3_mpu_part_info::size"] [:: std :: mem :: offset_of ! (aws_s3_mpu_part_info , size) - 0usize] ; ["Offset of field: aws_s3_mpu_part_info::etag"] [:: std :: mem :: offset_of ! (aws_s3_mpu_part_info , etag) - 8usize] ; ["Offset of field: aws_s3_mpu_part_info::checksum_context"] [:: std :: mem :: offset_of ! (aws_s3_mpu_part_info , checksum_context) - 16usize] ; ["Offset of field: aws_s3_mpu_part_info::was_previously_uploaded"] [:: std :: mem :: offset_of ! (aws_s3_mpu_part_info , was_previously_uploaded) - 24usize] ; } ; impl Default for aws_s3_mpu_part_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 () } } } unsafe extern "C" { pub fn aws_s3_meta_request_init_base (allocator : * mut aws_allocator , client : * mut aws_s3_client , part_size : usize , should_compute_content_md5 : bool , should_default_streaming : bool , options : * const aws_s3_meta_request_options , impl_ : * mut :: libc :: c_void , vtable : * mut aws_s3_meta_request_vtable , base_type : * mut aws_s3_meta_request) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_meta_request_is_active (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_is_finished (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_has_finish_result (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_lock_synced_data (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_unlock_synced_data (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_update (meta_request : * mut aws_s3_meta_request , flags : u32 , out_request : * mut * mut aws_s3_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_prepare_request (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , callback : aws_s3_meta_request_prepare_request_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_s3_meta_request_send_request (meta_request : * mut aws_s3_meta_request , connection : * mut aws_s3_connection) ; } unsafe extern "C" { pub fn aws_s3_meta_request_init_signing_date_time_default (meta_request : * mut aws_s3_meta_request , date_time : * mut aws_date_time) ; } unsafe extern "C" { pub fn aws_s3_meta_request_sign_request_default_impl (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , on_signing_complete : aws_signing_complete_fn , user_data : * mut :: libc :: c_void , disable_s3_express_signing : bool) ; } unsafe extern "C" { pub fn aws_s3_meta_request_sign_request_default (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , on_signing_complete : aws_signing_complete_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_s3_meta_request_send_request_finish_default (connection : * mut aws_s3_connection , stream : * mut aws_http_stream , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_finished_request (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_stream_response_body_synced (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_add_event_for_delivery_synced (meta_request : * mut aws_s3_meta_request , event : * const aws_s3_meta_request_event) ; } unsafe extern "C" { pub fn aws_s3_meta_request_are_events_out_for_delivery_synced (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_cancel_cancellable_requests_synced (meta_request : * mut aws_s3_meta_request , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_cancel_pending_buffer_futures_synced (meta_request : * mut aws_s3_meta_request , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_read_body (meta_request : * mut aws_s3_meta_request , offset : u64 , buffer : * mut aws_byte_buf) -> * mut aws_future_bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_set_fail_synced (meta_request : * mut aws_s3_meta_request , failed_request : * mut aws_s3_request , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_set_success_synced (meta_request : * mut aws_s3_meta_request , response_status : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_has_finish_result_synced (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_finish (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_finish_default (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_result_setup (meta_request : * mut aws_s3_meta_request , result : * mut aws_s3_meta_request_result , failed_request : * mut aws_s3_request , response_status : :: libc :: c_int , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_result_clean_up (meta_request : * mut aws_s3_meta_request , result : * mut aws_s3_meta_request_result) ; } unsafe extern "C" { pub fn aws_s3_meta_request_checksum_config_has_algorithm (meta_request : * mut aws_s3_meta_request , algorithm : aws_s3_checksum_algorithm) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_schedule_prepare_request_default_impl (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , parallel : bool , callback : aws_s3_meta_request_prepare_request_callback_fn , user_data : * mut :: libc :: c_void) ; } pub type __builtin_va_list = [__va_list_tag ; 1usize] ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct __va_list_tag { pub gp_offset : :: libc :: c_uint , pub fp_offset : :: libc :: c_uint , pub overflow_arg_area : * mut :: libc :: c_void , pub reg_save_area : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of __va_list_tag"] [:: std :: mem :: size_of :: < __va_list_tag > () - 24usize] ; ["Alignment of __va_list_tag"] [:: std :: mem :: align_of :: < __va_list_tag > () - 8usize] ; ["Offset of field: __va_list_tag::gp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , gp_offset) - 0usize] ; ["Offset of field: __va_list_tag::fp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , fp_offset) - 4usize] ; ["Offset of field: __va_list_tag::overflow_arg_area"] [:: std :: mem :: offset_of ! (__va_list_tag , overflow_arg_area) - 8usize] ; ["Offset of field: __va_list_tag::reg_save_area"] [:: std :: mem :: offset_of ! (__va_list_tag , reg_save_area) - 16usize] ; } ; impl Default for __va_list_tag { 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 = " (Optional)\n Use a cached merged profile collection. A merge collection has both config file\n (~/.aws/config) and credentials file based profile collection (~/.aws/credentials) using\n `aws_profile_collection_new_from_merge`.\n If this option is provided, `config_file_name_override` and `credentials_file_name_override` will be ignored."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_profile_collection { pub _address : u8 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_tls_ctx { pub _address : u8 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_parallel_input_stream { pub _address : u8 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_cached_signing_config_aws { pub _address : u8 , }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 +                +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unclosed HTML tag `bool`
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/mountpoint-s3-crt-sys-ba8805edaea6a745/out/bindings.rs:5:165626
[INFO] [stdout]   |
[INFO] [stdout] 5 | ... aws_future_bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_rele...
[INFO] [stdout]   |                                                                  ^^^^^^
[INFO] [stdout]   |
[INFO] [stdout] help: try marking as source code
[INFO] [stdout]   |
[INFO] [stdout] 5 | # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > where Storage : AsRef < [u8] > + AsMut < [u8] >, { # [inline] fn extract_bit (byte : u8 , index : usize) -> bool { let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn get_bit (& self , index : usize) -> bool { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = self . storage . as_ref () [byte_index] ; Self :: extract_bit (byte , index) } # [inline] pub unsafe fn raw_get_bit (this : * const Self , index : usize) -> bool { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { * (core :: ptr :: addr_of ! ((* this) . storage) as * const u8) . offset (byte_index as isize) } ; Self :: extract_bit (byte , index) } # [inline] fn change_bit (byte : u8 , index : usize , val : bool) -> u8 { let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { byte | mask } else { byte & ! mask } } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; * byte = Self :: change_bit (* byte , index , val) ; } # [inline] pub unsafe fn raw_set_bit (this : * mut Self , index : usize , val : bool) { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { (core :: ptr :: addr_of_mut ! ((* this) . storage) as * mut u8) . offset (byte_index as isize) } ; unsafe { * byte = Self :: change_bit (* byte , index , val) } ; } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; val |= 1 << index ; } } val } # [inline] pub unsafe fn raw_get (this : * const Self , bit_offset : usize , bit_width : u8 ,) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if unsafe { Self :: raw_get_bit (this , i + bit_offset) } { let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; val |= 1 << index ; } } val } # [inline] pub fn set (& mut self , bit_offset : usize , bit_width : u8 , val : u64) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } # [inline] pub unsafe fn raw_set (this : * mut Self , bit_offset : usize , bit_width : u8 , val : u64 ,) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; unsafe { Self :: raw_set_bit (this , index + bit_offset , val_bit_is_set) } ; } } } pub const PRInSTR : & [u8 ; 5] = b"%.*s\0" ; pub const AWS_PACKAGE_SLOTS : i32 = 32 ; pub const AWS_C_COMMON_PACKAGE_ID : i32 = 0 ; pub const AWS_OP_SUCCESS : i32 = 0 ; pub const AWS_OP_ERR : i32 = - 1 ; pub const AWS_ERROR_ENUM_STRIDE_BITS : i32 = 10 ; pub const AWS_ERROR_ENUM_STRIDE : i32 = 1024 ; pub const SIZE_BITS : i32 = 64 ; pub const AWS_C_IO_PACKAGE_ID : i32 = 1 ; pub const AWS_THREAD_NAME_RECOMMENDED_STRLEN : i32 = 15 ; pub const AWS_THREAD_ONCE_STATIC_INIT : i32 = 0 ; pub const AWS_LOG_LEVEL_NONE : i32 = 0 ; pub const AWS_LOG_LEVEL_FATAL : i32 = 1 ; pub const AWS_LOG_LEVEL_ERROR : i32 = 2 ; pub const AWS_LOG_LEVEL_WARN : i32 = 3 ; pub const AWS_LOG_LEVEL_INFO : i32 = 4 ; pub const AWS_LOG_LEVEL_DEBUG : i32 = 5 ; pub const AWS_LOG_LEVEL_TRACE : i32 = 6 ; pub const AWS_C_SDKUTILS_PACKAGE_ID : i32 = 15 ; pub const AWS_C_AUTH_PACKAGE_ID : i32 = 6 ; pub const AWS_C_HTTP_PACKAGE_ID : i32 = 2 ; pub const AWS_SHA512_LEN : i32 = 64 ; pub const AWS_SHA256_LEN : i32 = 32 ; pub const AWS_SHA1_LEN : i32 = 20 ; pub const AWS_MD5_LEN : i32 = 16 ; pub const AWS_HTTP2_DEFAULT_MAX_CLOSED_STREAMS : i32 = 32 ; pub const AWS_HTTP2_PING_DATA_SIZE : i32 = 8 ; pub const AWS_HTTP2_SETTINGS_COUNT : i32 = 6 ; pub const AWS_C_S3_PACKAGE_ID : i32 = 14 ; pub const AWS_S3_CLIENT_VERSION : & [u8 ; 6] = b"0.1.x\0" ; pub const AWS_CACHE_LINE : _bindgen_ty_18 = _bindgen_ty_18 :: AWS_CACHE_LINE ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_18 { AWS_CACHE_LINE = 64 , } pub type __gnuc_va_list = __builtin_va_list ; pub type va_list = __gnuc_va_list ; unsafe extern "C" { pub fn aws_fatal_assert (cond_str : * const :: libc :: c_char , file : * const :: libc :: c_char , line : :: libc :: c_int) -> ! ; } pub type pthread_once_t = :: libc :: 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)] pub struct aws_allocator { pub mem_acquire : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , size : usize) -> * mut :: libc :: c_void > , pub mem_release : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , ptr : * mut :: libc :: c_void) > , pub mem_realloc : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , oldptr : * mut :: libc :: c_void , oldsize : usize , newsize : usize) -> * mut :: libc :: c_void > , pub mem_calloc : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , num : usize , size : usize) -> * mut :: libc :: c_void > , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_allocator"] [:: std :: mem :: size_of :: < aws_allocator > () - 40usize] ; ["Alignment of aws_allocator"] [:: std :: mem :: align_of :: < aws_allocator > () - 8usize] ; ["Offset of field: aws_allocator::mem_acquire"] [:: std :: mem :: offset_of ! (aws_allocator , mem_acquire) - 0usize] ; ["Offset of field: aws_allocator::mem_release"] [:: std :: mem :: offset_of ! (aws_allocator , mem_release) - 8usize] ; ["Offset of field: aws_allocator::mem_realloc"] [:: std :: mem :: offset_of ! (aws_allocator , mem_realloc) - 16usize] ; ["Offset of field: aws_allocator::mem_calloc"] [:: std :: mem :: offset_of ! (aws_allocator , mem_calloc) - 24usize] ; ["Offset of field: aws_allocator::impl_"] [:: std :: mem :: offset_of ! (aws_allocator , impl_) - 32usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Inexpensive (constant time) check of data-structure invariants."] pub fn aws_allocator_is_valid (alloc : * const aws_allocator) -> bool ; } unsafe extern "C" { pub fn aws_default_allocator () -> * mut aws_allocator ; } unsafe extern "C" { pub fn aws_aligned_allocator () -> * mut aws_allocator ; } unsafe 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\n NULL. In later versions, if allocator->mem_acquire() returns NULL, this function will assert and exit. To handle\n conditions where OOM is not a fatal error, allocator->mem_acquire() is responsible for finding/reclaiming/running a\n GC etc...before returning."] pub fn aws_mem_acquire (allocator : * mut aws_allocator , size : usize) -> * mut :: libc :: c_void ; } unsafe 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\n to zero. In versions v0.6.8 and prior, this function was allowed to return NULL.\n In later versions, if allocator->mem_calloc() returns NULL, this function will assert and exit. To handle\n conditions where OOM is not a fatal error, allocator->mem_calloc() is responsible for finding/reclaiming/running a\n GC etc...before returning."] pub fn aws_mem_calloc (allocator : * mut aws_allocator , num : usize , size : usize) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Allocates many chunks of bytes into a single block. Expects to be called with alternating void ** (dest), size_t\n (size). The first void ** will be set to the root of the allocation. Alignment is assumed to be sizeof(intmax_t).\n\n This is useful for allocating structs using the pimpl pattern, as you may allocate the public object and impl object\n in the same contiguous block of memory.\n\n Returns a pointer to the allocation.\n\n In versions v0.6.8 and prior, this function was allowed to return\n NULL. In later versions, if allocator->mem_acquire() returns NULL, this function will assert and exit. To handle\n conditions where OOM is not a fatal error, allocator->mem_acquire() is responsible for finding/reclaiming/running a\n GC etc...before returning."] pub fn aws_mem_acquire_many (allocator : * mut aws_allocator , count : usize , ...) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Releases ptr back to whatever allocated it.\n Nothing happens if ptr is NULL."] pub fn aws_mem_release (allocator : * mut aws_allocator , ptr : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Attempts to adjust the size of the pointed-to memory buffer from oldsize to\n newsize. The pointer (*ptr) may be changed if the memory needs to be\n reallocated.\n\n In versions v0.6.8 and prior, this function was allowed to return\n NULL. In later versions, if allocator->mem_realloc() returns NULL, this function will assert and exit. To handle\n conditions where OOM is not a fatal error, allocator->mem_realloc() is responsible for finding/reclaiming/running a\n GC etc...before returning."] pub fn aws_mem_realloc (allocator : * mut aws_allocator , ptr : * mut * mut :: libc :: c_void , oldsize : usize , newsize : usize) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_mem_trace_level { AWS_MEMTRACE_NONE = 0 , AWS_MEMTRACE_BYTES = 1 , AWS_MEMTRACE_STACKS = 2 , } unsafe 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 ; } unsafe extern "C" { pub fn aws_mem_tracer_destroy (trace_allocator : * mut aws_allocator) -> * mut aws_allocator ; } unsafe extern "C" { pub fn aws_mem_tracer_dump (trace_allocator : * mut aws_allocator) ; } unsafe extern "C" { pub fn aws_mem_tracer_bytes (trace_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_mem_tracer_count (trace_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_small_block_allocator_new (allocator : * mut aws_allocator , multi_threaded : bool) -> * mut aws_allocator ; } unsafe extern "C" { pub fn aws_small_block_allocator_destroy (sba_allocator : * mut aws_allocator) ; } unsafe extern "C" { pub fn aws_small_block_allocator_bytes_active (sba_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_small_block_allocator_bytes_reserved (sba_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_small_block_allocator_page_size (sba_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_small_block_allocator_page_size_available (sba_allocator : * mut aws_allocator) -> usize ; } unsafe extern "C" { pub fn aws_explicit_aligned_allocator_new (alignment : usize) -> * mut aws_allocator ; } unsafe extern "C" { pub fn aws_explicit_aligned_allocator_destroy (aligned_alloc : * mut aws_allocator) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_error_info { pub error_code : :: libc :: c_int , pub literal_name : * const :: libc :: c_char , pub error_str : * const :: libc :: c_char , pub lib_name : * const :: libc :: c_char , pub formatted_name : * const :: libc :: c_char , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_error_info"] [:: std :: mem :: size_of :: < aws_error_info > () - 40usize] ; ["Alignment of aws_error_info"] [:: std :: mem :: align_of :: < aws_error_info > () - 8usize] ; ["Offset of field: aws_error_info::error_code"] [:: std :: mem :: offset_of ! (aws_error_info , error_code) - 0usize] ; ["Offset of field: aws_error_info::literal_name"] [:: std :: mem :: offset_of ! (aws_error_info , literal_name) - 8usize] ; ["Offset of field: aws_error_info::error_str"] [:: std :: mem :: offset_of ! (aws_error_info , error_str) - 16usize] ; ["Offset of field: aws_error_info::lib_name"] [:: std :: mem :: offset_of ! (aws_error_info , lib_name) - 24usize] ; ["Offset of field: aws_error_info::formatted_name"] [:: std :: mem :: offset_of ! (aws_error_info , formatted_name) - 32usize] ; } ; 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)] pub struct aws_error_info_list { pub error_list : * const aws_error_info , pub count : u16 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_error_info_list"] [:: std :: mem :: size_of :: < aws_error_info_list > () - 16usize] ; ["Alignment of aws_error_info_list"] [:: std :: mem :: align_of :: < aws_error_info_list > () - 8usize] ; ["Offset of field: aws_error_info_list::error_list"] [:: std :: mem :: offset_of ! (aws_error_info_list , error_list) - 0usize] ; ["Offset of field: aws_error_info_list::count"] [:: std :: mem :: offset_of ! (aws_error_info_list , count) - 8usize] ; } ; 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 : :: libc :: c_int , ctx : * mut :: libc :: c_void) > ; unsafe extern "C" { pub fn aws_last_error () -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_error_str (err : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { pub fn aws_error_name (err : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { pub fn aws_error_lib_name (err : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { pub fn aws_error_debug_str (err : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { pub fn aws_raise_error_private (err : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_raise_error (err : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_reset_error () ; } unsafe extern "C" { pub fn aws_restore_error (err : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_set_global_error_handler_fn (handler : aws_error_handler_fn , ctx : * mut :: libc :: c_void) -> aws_error_handler_fn ; } unsafe extern "C" { pub fn aws_set_thread_local_error_handler_fn (handler : aws_error_handler_fn , ctx : * mut :: libc :: c_void) -> aws_error_handler_fn ; } unsafe extern "C" { # [doc = " TODO: this needs to be a private function (wait till we have the cmake story\n better before moving it though). It should be external for the purpose of\n other libs we own, but customers should not be able to hit it without going\n out of their way to do so."] pub fn aws_register_error_info (error_info : * const aws_error_info_list) ; } unsafe extern "C" { pub fn aws_unregister_error_info (error_info : * const aws_error_info_list) ; } unsafe extern "C" { # [doc = " Convert a c library io error into an aws error, and raise it.\n If no conversion is found, fallback_aws_error_code is raised.\n Always returns AWS_OP_ERR."] pub fn aws_translate_and_raise_io_error_or (error_no : :: libc :: c_int , fallback_aws_error_code : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Convert a c library io error into an aws error, and raise it.\n If no conversion is found, AWS_ERROR_SYS_CALL_FAILURE is raised.\n Always returns AWS_OP_ERR."] pub fn aws_translate_and_raise_io_error (error_no : :: libc :: c_int) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_common_error { AWS_ERROR_SUCCESS = 0 , AWS_ERROR_OOM = 1 , AWS_ERROR_NO_SPACE = 2 , AWS_ERROR_UNKNOWN = 3 , AWS_ERROR_SHORT_BUFFER = 4 , AWS_ERROR_OVERFLOW_DETECTED = 5 , AWS_ERROR_UNSUPPORTED_OPERATION = 6 , AWS_ERROR_INVALID_BUFFER_SIZE = 7 , AWS_ERROR_INVALID_HEX_STR = 8 , AWS_ERROR_INVALID_BASE64_STR = 9 , AWS_ERROR_INVALID_INDEX = 10 , AWS_ERROR_THREAD_INVALID_SETTINGS = 11 , AWS_ERROR_THREAD_INSUFFICIENT_RESOURCE = 12 , AWS_ERROR_THREAD_NO_PERMISSIONS = 13 , AWS_ERROR_THREAD_NOT_JOINABLE = 14 , AWS_ERROR_THREAD_NO_SUCH_THREAD_ID = 15 , AWS_ERROR_THREAD_DEADLOCK_DETECTED = 16 , AWS_ERROR_MUTEX_NOT_INIT = 17 , AWS_ERROR_MUTEX_TIMEOUT = 18 , AWS_ERROR_MUTEX_CALLER_NOT_OWNER = 19 , AWS_ERROR_MUTEX_FAILED = 20 , AWS_ERROR_COND_VARIABLE_INIT_FAILED = 21 , AWS_ERROR_COND_VARIABLE_TIMED_OUT = 22 , AWS_ERROR_COND_VARIABLE_ERROR_UNKNOWN = 23 , AWS_ERROR_CLOCK_FAILURE = 24 , AWS_ERROR_LIST_EMPTY = 25 , AWS_ERROR_DEST_COPY_TOO_SMALL = 26 , AWS_ERROR_LIST_EXCEEDS_MAX_SIZE = 27 , AWS_ERROR_LIST_STATIC_MODE_CANT_SHRINK = 28 , AWS_ERROR_PRIORITY_QUEUE_FULL = 29 , AWS_ERROR_PRIORITY_QUEUE_EMPTY = 30 , AWS_ERROR_PRIORITY_QUEUE_BAD_NODE = 31 , AWS_ERROR_HASHTBL_ITEM_NOT_FOUND = 32 , AWS_ERROR_INVALID_DATE_STR = 33 , AWS_ERROR_INVALID_ARGUMENT = 34 , AWS_ERROR_RANDOM_GEN_FAILED = 35 , AWS_ERROR_MALFORMED_INPUT_STRING = 36 , AWS_ERROR_UNIMPLEMENTED = 37 , AWS_ERROR_INVALID_STATE = 38 , AWS_ERROR_ENVIRONMENT_GET = 39 , AWS_ERROR_ENVIRONMENT_SET = 40 , AWS_ERROR_ENVIRONMENT_UNSET = 41 , AWS_ERROR_STREAM_UNSEEKABLE = 42 , AWS_ERROR_NO_PERMISSION = 43 , AWS_ERROR_FILE_INVALID_PATH = 44 , AWS_ERROR_MAX_FDS_EXCEEDED = 45 , AWS_ERROR_SYS_CALL_FAILURE = 46 , AWS_ERROR_C_STRING_BUFFER_NOT_NULL_TERMINATED = 47 , AWS_ERROR_STRING_MATCH_NOT_FOUND = 48 , AWS_ERROR_DIVIDE_BY_ZERO = 49 , AWS_ERROR_INVALID_FILE_HANDLE = 50 , AWS_ERROR_OPERATION_INTERUPTED = 51 , AWS_ERROR_DIRECTORY_NOT_EMPTY = 52 , AWS_ERROR_PLATFORM_NOT_SUPPORTED = 53 , AWS_ERROR_INVALID_UTF8 = 54 , AWS_ERROR_GET_HOME_DIRECTORY_FAILED = 55 , AWS_ERROR_INVALID_XML = 56 , AWS_ERROR_FILE_OPEN_FAILURE = 57 , AWS_ERROR_FILE_READ_FAILURE = 58 , AWS_ERROR_FILE_WRITE_FAILURE = 59 , AWS_ERROR_INVALID_CBOR = 60 , AWS_ERROR_CBOR_UNEXPECTED_TYPE = 61 , AWS_ERROR_END_COMMON_RANGE = 1023 , } unsafe extern "C" { # [doc = " Returns whether each byte is zero."] pub fn aws_is_mem_zeroed (buf : * const :: libc :: c_void , bufsize : usize) -> bool ; } unsafe extern "C" { # [doc = " Securely zeroes a memory buffer. This function will attempt to ensure that\n the compiler will not optimize away this zeroing operation."] pub fn aws_secure_zero (pBuf : * mut :: libc :: c_void , bufsize : usize) ; } unsafe extern "C" { # [doc = " Initializes internal data structures used by aws-c-common.\n Must be called before using any functionality in aws-c-common."] pub fn aws_common_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Shuts down the internal data structures used by aws-c-common."] pub fn aws_common_library_clean_up () ; } unsafe extern "C" { pub fn aws_common_fatal_assert_library_initialized () ; } unsafe extern "C" { # [doc = " Multiplies a * b. If the result overflows, returns 2^64 - 1."] pub fn aws_mul_u64_saturating (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { # [doc = " If a * b overflows, returns AWS_OP_ERR; otherwise multiplies\n a * b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_mul_u64_checked (a : u64 , b : u64 , r : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Multiplies a * b. If the result overflows, returns 2^32 - 1."] pub fn aws_mul_u32_saturating (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { # [doc = " If a * b overflows, returns AWS_OP_ERR; otherwise multiplies\n a * b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_mul_u32_checked (a : u32 , b : u32 , r : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Adds a + b.  If the result overflows returns 2^64 - 1."] pub fn aws_add_u64_saturating (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { # [doc = " If a + b overflows, returns AWS_OP_ERR; otherwise adds\n a + b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_add_u64_checked (a : u64 , b : u64 , r : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Adds a + b. If the result overflows returns 2^32 - 1."] pub fn aws_add_u32_saturating (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { # [doc = " If a + b overflows, returns AWS_OP_ERR; otherwise adds\n a + b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_add_u32_checked (a : u32 , b : u32 , r : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Subtracts a - b. If the result overflows returns 0."] pub fn aws_sub_u64_saturating (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { # [doc = " If a - b overflows, returns AWS_OP_ERR; otherwise subtracts\n a - b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_sub_u64_checked (a : u64 , b : u64 , r : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Subtracts a - b. If the result overflows returns 0."] pub fn aws_sub_u32_saturating (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { # [doc = " If a - b overflows, returns AWS_OP_ERR; otherwise subtracts\n a - b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_sub_u32_checked (a : u32 , b : u32 , r : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Multiplies a * b. If the result overflows, returns SIZE_MAX."] pub fn aws_mul_size_saturating (a : usize , b : usize) -> usize ; } unsafe extern "C" { # [doc = " Multiplies a * b and returns the result in *r. If the result\n overflows, returns AWS_OP_ERR; otherwise returns AWS_OP_SUCCESS."] pub fn aws_mul_size_checked (a : usize , b : usize , r : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Adds a + b.  If the result overflows returns SIZE_MAX."] pub fn aws_add_size_saturating (a : usize , b : usize) -> usize ; } unsafe extern "C" { # [doc = " Adds a + b and returns the result in *r. If the result\n overflows, returns AWS_OP_ERR; otherwise returns AWS_OP_SUCCESS."] pub fn aws_add_size_checked (a : usize , b : usize , r : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Adds [num] arguments (expected to be of size_t), and returns the result in *r.\n 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 , ...) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Subtracts a - b. If the result overflows returns 0."] pub fn aws_sub_size_saturating (a : usize , b : usize) -> usize ; } unsafe extern "C" { # [doc = " If a - b overflows, returns AWS_OP_ERR; otherwise subtracts\n a - b, returns the result in *r, and returns AWS_OP_SUCCESS."] pub fn aws_sub_size_checked (a : usize , b : usize , r : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Function to check if x is power of 2"] pub fn aws_is_power_of_two (x : usize) -> bool ; } unsafe extern "C" { # [doc = " Function to find the smallest result that is power of 2 >= n. Returns AWS_OP_ERR if this cannot\n be done without overflow"] pub fn aws_round_up_to_power_of_two (n : usize , result : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Counts the number of leading 0 bits in an integer. 0 will return the size of the integer in bits."] pub fn aws_clz_u32 (n : u32) -> usize ; } unsafe extern "C" { pub fn aws_clz_i32 (n : i32) -> usize ; } unsafe extern "C" { pub fn aws_clz_u64 (n : u64) -> usize ; } unsafe extern "C" { pub fn aws_clz_i64 (n : i64) -> usize ; } unsafe extern "C" { pub fn aws_clz_size (n : usize) -> usize ; } unsafe extern "C" { # [doc = " Counts the number of trailing 0 bits in an integer. 0 will return the size of the integer in bits."] pub fn aws_ctz_u32 (n : u32) -> usize ; } unsafe extern "C" { pub fn aws_ctz_i32 (n : i32) -> usize ; } unsafe extern "C" { pub fn aws_ctz_u64 (n : u64) -> usize ; } unsafe extern "C" { pub fn aws_ctz_i64 (n : i64) -> usize ; } unsafe extern "C" { pub fn aws_ctz_size (n : usize) -> usize ; } unsafe extern "C" { pub fn aws_min_u8 (a : u8 , b : u8) -> u8 ; } unsafe extern "C" { pub fn aws_max_u8 (a : u8 , b : u8) -> u8 ; } unsafe extern "C" { pub fn aws_min_i8 (a : i8 , b : i8) -> i8 ; } unsafe extern "C" { pub fn aws_max_i8 (a : i8 , b : i8) -> i8 ; } unsafe extern "C" { pub fn aws_min_u16 (a : u16 , b : u16) -> u16 ; } unsafe extern "C" { pub fn aws_max_u16 (a : u16 , b : u16) -> u16 ; } unsafe extern "C" { pub fn aws_min_i16 (a : i16 , b : i16) -> i16 ; } unsafe extern "C" { pub fn aws_max_i16 (a : i16 , b : i16) -> i16 ; } unsafe extern "C" { pub fn aws_min_u32 (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { pub fn aws_max_u32 (a : u32 , b : u32) -> u32 ; } unsafe extern "C" { pub fn aws_min_i32 (a : i32 , b : i32) -> i32 ; } unsafe extern "C" { pub fn aws_max_i32 (a : i32 , b : i32) -> i32 ; } unsafe extern "C" { pub fn aws_min_u64 (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { pub fn aws_max_u64 (a : u64 , b : u64) -> u64 ; } unsafe extern "C" { pub fn aws_min_i64 (a : i64 , b : i64) -> i64 ; } unsafe extern "C" { pub fn aws_max_i64 (a : i64 , b : i64) -> i64 ; } unsafe extern "C" { pub fn aws_min_size (a : usize , b : usize) -> usize ; } unsafe extern "C" { pub fn aws_max_size (a : usize , b : usize) -> usize ; } unsafe extern "C" { pub fn aws_min_int (a : :: libc :: c_int , b : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_max_int (a : :: libc :: c_int , b : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_min_float (a : f32 , b : f32) -> f32 ; } unsafe extern "C" { pub fn aws_max_float (a : f32 , b : f32) -> f32 ; } unsafe extern "C" { pub fn aws_min_double (a : f64 , b : f64) -> f64 ; } unsafe extern "C" { pub fn aws_max_double (a : f64 , b : f64) -> f64 ; } pub const AWS_ARRAY_LIST_DEBUG_FILL : _bindgen_ty_19 = _bindgen_ty_19 :: AWS_ARRAY_LIST_DEBUG_FILL ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_19 { AWS_ARRAY_LIST_DEBUG_FILL = 221 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_array_list { pub alloc : * mut aws_allocator , pub current_size : usize , pub length : usize , pub item_size : usize , pub data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_array_list"] [:: std :: mem :: size_of :: < aws_array_list > () - 40usize] ; ["Alignment of aws_array_list"] [:: std :: mem :: align_of :: < aws_array_list > () - 8usize] ; ["Offset of field: aws_array_list::alloc"] [:: std :: mem :: offset_of ! (aws_array_list , alloc) - 0usize] ; ["Offset of field: aws_array_list::current_size"] [:: std :: mem :: offset_of ! (aws_array_list , current_size) - 8usize] ; ["Offset of field: aws_array_list::length"] [:: std :: mem :: offset_of ! (aws_array_list , length) - 16usize] ; ["Offset of field: aws_array_list::item_size"] [:: std :: mem :: offset_of ! (aws_array_list , item_size) - 24usize] ; ["Offset of field: aws_array_list::data"] [:: std :: mem :: offset_of ! (aws_array_list , data) - 32usize] ; } ; 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.\n\n a and b should be cast to pointers to the element type held in the list\n before being dereferenced. The function should compare the elements and\n return a positive number if a > b, zero if a = b, and a negative number\n if a < b."] pub type aws_array_list_comparator_fn = :: std :: option :: Option < unsafe extern "C" fn (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> :: libc :: c_int > ; unsafe extern "C" { # [doc = " Initializes an array list with an array of size initial_item_allocation * item_size. In this mode, the array size\n will grow by a factor of 2 upon insertion if space is not available. initial_item_allocation is the number of\n elements you want space allocated for. item_size is the size of each element in bytes. Mixing items types is not\n supported by this API."] pub fn aws_array_list_init_dynamic (list : * mut aws_array_list , alloc : * mut aws_allocator , initial_item_allocation : usize , item_size : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes an array list with a preallocated array of void *. item_count is the number of elements in the array,\n and item_size is the size in bytes of each element. Mixing items types is not supported\n by this API. Once this list is full, new items will be rejected."] pub fn aws_array_list_init_static (list : * mut aws_array_list , raw_array : * mut :: libc :: c_void , item_count : usize , item_size : usize) ; } unsafe extern "C" { # [doc = " Initializes an array list with a preallocated array of *already-initialized* elements. item_count is the number of\n elements in the array, and item_size is the size in bytes of each element.\n\n Once initialized, nothing further can be added to the list, since it will be full and cannot resize.\n\n Primary use case is to treat an already-initialized C array as an array list."] pub fn aws_array_list_init_static_from_initialized (list : * mut aws_array_list , raw_array : * mut :: libc :: c_void , item_count : usize , item_size : usize) ; } unsafe extern "C" { # [doc = " Set of properties of a valid aws_array_list."] pub fn aws_array_list_is_valid (list : * const aws_array_list) -> bool ; } unsafe extern "C" { # [doc = " Deallocates any memory that was allocated for this list, and resets list for reuse or deletion."] pub fn aws_array_list_clean_up (list : * mut aws_array_list) ; } unsafe extern "C" { # [doc = " Erases and then deallocates any memory that was allocated for this list, and resets list for reuse or deletion."] pub fn aws_array_list_clean_up_secure (list : * mut aws_array_list) ; } unsafe extern "C" { # [doc = " Pushes the memory pointed to by val onto the end of internal list"] pub fn aws_array_list_push_back (list : * mut aws_array_list , val : * const :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the element at the front of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised"] pub fn aws_array_list_front (list : * const aws_array_list , val : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Pushes the memory pointed to by val onto the front of internal list.\n This call results in shifting all of the elements in the list. Avoid this call unless that\n is intended behavior."] pub fn aws_array_list_push_front (list : * mut aws_array_list , val : * const :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Deletes the element at the front of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised.\n This call results in shifting all of the elements at the end of the array to the front. Avoid this call unless that\n is intended behavior."] pub fn aws_array_list_pop_front (list : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Delete N elements from the front of the list.\n Remaining elements are shifted to the front of the list.\n If the list has less than N elements, the list is cleared.\n This call is more efficient than calling aws_array_list_pop_front() N times."] pub fn aws_array_list_pop_front_n (list : * mut aws_array_list , n : usize) ; } unsafe extern "C" { # [doc = " Deletes the element this index in the list if it exists.\n If element does not exist, AWS_ERROR_INVALID_INDEX will be raised.\n This call results in shifting all remaining elements towards the front.\n Avoid this call unless that is intended behavior."] pub fn aws_array_list_erase (list : * mut aws_array_list , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the element at the end of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised."] pub fn aws_array_list_back (list : * const aws_array_list , val : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Deletes the element at the end of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised."] pub fn aws_array_list_pop_back (list : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Clears all elements in the array and resets length to zero. Size does not change in this operation."] pub fn aws_array_list_clear (list : * mut aws_array_list) ; } unsafe 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) -> :: libc :: c_int ; } unsafe 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\n in to will be overwritten in this copy."] pub fn aws_array_list_copy (from : * const aws_array_list , to : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Swap contents between two dynamic lists. Both lists must use the same allocator."] pub fn aws_array_list_swap_contents (list_a : * mut aws_array_list , list_b : * mut aws_array_list) ; } unsafe extern "C" { # [doc = " Returns the number of elements that can fit in the internal array. If list is initialized in dynamic mode,\n the capacity changes over time."] pub fn aws_array_list_capacity (list : * const aws_array_list) -> usize ; } unsafe extern "C" { # [doc = " Returns the number of elements in the internal array."] pub fn aws_array_list_length (list : * const aws_array_list) -> usize ; } unsafe extern "C" { # [doc = " Copies the memory at index to val. If element does not exist, AWS_ERROR_INVALID_INDEX will be raised."] pub fn aws_array_list_get_at (list : * const aws_array_list , val : * mut :: libc :: c_void , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the memory address of the element at index to *val. If element does not exist, AWS_ERROR_INVALID_INDEX will be\n raised."] pub fn aws_array_list_get_at_ptr (list : * const aws_array_list , val : * mut * mut :: libc :: c_void , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Ensures that the array list has enough capacity to store a value at the specified index. If there is not already\n enough capacity, and the list is in dynamic mode, this function will attempt to allocate more memory, expanding the\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the the memory pointed to by val into the array at index. If in dynamic mode, the size will grow by a factor\n of two when the array is full. In static mode, AWS_ERROR_INVALID_INDEX will be raised if the index is past the bounds\n of the array."] pub fn aws_array_list_set_at (list : * mut aws_array_list , val : * const :: libc :: c_void , index : usize) -> :: libc :: c_int ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Sort elements in the list in-place according to the comparator function."] pub fn aws_array_list_sort (list : * mut aws_array_list , compare_fn : aws_array_list_comparator_fn) ; } unsafe extern "C" { # [doc = " Returns 1 if machine is big endian, 0 if little endian.\n If you compile with even -O1 optimization, this check is completely optimized\n out at compile time and code which calls \"if (aws_is_big_endian())\" will do\n the right thing without branching."] pub fn aws_is_big_endian () -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Convert 64 bit integer from host to network byte order."] pub fn aws_hton64 (x : u64) -> u64 ; } unsafe extern "C" { # [doc = " Convert 64 bit integer from network to host byte order."] pub fn aws_ntoh64 (x : u64) -> u64 ; } unsafe extern "C" { # [doc = " Convert 32 bit integer from host to network byte order."] pub fn aws_hton32 (x : u32) -> u32 ; } unsafe extern "C" { # [doc = " Convert 32 bit float from host to network byte order."] pub fn aws_htonf32 (x : f32) -> f32 ; } unsafe extern "C" { # [doc = " Convert 64 bit double from host to network byte order."] pub fn aws_htonf64 (x : f64) -> f64 ; } unsafe extern "C" { # [doc = " Convert 32 bit integer from network to host byte order."] pub fn aws_ntoh32 (x : u32) -> u32 ; } unsafe extern "C" { # [doc = " Convert 32 bit float from network to host byte order."] pub fn aws_ntohf32 (x : f32) -> f32 ; } unsafe extern "C" { # [doc = " Convert 32 bit float from network to host byte order."] pub fn aws_ntohf64 (x : f64) -> f64 ; } unsafe extern "C" { # [doc = " Convert 16 bit integer from host to network byte order."] pub fn aws_hton16 (x : u16) -> u16 ; } unsafe extern "C" { # [doc = " Convert 16 bit integer from network to host byte order."] pub fn aws_ntoh16 (x : u16) -> u16 ; } # [doc = " Represents a length-delimited binary string or buffer. If byte buffer points\n to constant memory or memory that should otherwise not be freed by this\n struct, set allocator to NULL and free function will be a no-op.\n\n This structure used to define the output for all functions that write to a buffer.\n\n Note that this structure allocates memory at the buffer pointer only. The\n struct itself does not get dynamically allocated and must be either\n maintained or copied to avoid losing access to the memory."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_byte_buf { pub len : usize , pub buffer : * mut u8 , pub capacity : usize , pub allocator : * mut aws_allocator , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_byte_buf"] [:: std :: mem :: size_of :: < aws_byte_buf > () - 32usize] ; ["Alignment of aws_byte_buf"] [:: std :: mem :: align_of :: < aws_byte_buf > () - 8usize] ; ["Offset of field: aws_byte_buf::len"] [:: std :: mem :: offset_of ! (aws_byte_buf , len) - 0usize] ; ["Offset of field: aws_byte_buf::buffer"] [:: std :: mem :: offset_of ! (aws_byte_buf , buffer) - 8usize] ; ["Offset of field: aws_byte_buf::capacity"] [:: std :: mem :: offset_of ! (aws_byte_buf , capacity) - 16usize] ; ["Offset of field: aws_byte_buf::allocator"] [:: std :: mem :: offset_of ! (aws_byte_buf , allocator) - 24usize] ; } ; 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.\n\n This structure is used to define buffers for reading."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_byte_cursor { pub len : usize , pub ptr : * mut u8 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_byte_cursor"] [:: std :: mem :: size_of :: < aws_byte_cursor > () - 16usize] ; ["Alignment of aws_byte_cursor"] [:: std :: mem :: align_of :: < aws_byte_cursor > () - 8usize] ; ["Offset of field: aws_byte_cursor::len"] [:: std :: mem :: offset_of ! (aws_byte_cursor , len) - 0usize] ; ["Offset of field: aws_byte_cursor::ptr"] [:: std :: mem :: offset_of ! (aws_byte_cursor , ptr) - 8usize] ; } ; 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 > ; unsafe extern "C" { # [doc = " Compare two arrays.\n Return whether their contents are equivalent.\n NULL may be passed as the array pointer if its length is declared to be 0."] pub fn aws_array_eq (array_a : * const :: libc :: c_void , len_a : usize , array_b : * const :: libc :: c_void , len_b : usize) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of two arrays.\n Return whether their contents are equivalent.\n NULL may be passed as the array pointer if its length is declared to be 0.\n The \"C\" locale is used for comparing upper and lowercase letters.\n Data is assumed to be ASCII text, UTF-8 will work fine too."] pub fn aws_array_eq_ignore_case (array_a : * const :: libc :: c_void , len_a : usize , array_b : * const :: libc :: c_void , len_b : usize) -> bool ; } unsafe extern "C" { # [doc = " Compare an array and a null-terminated string.\n Returns true if their contents are equivalent.\n The array should NOT contain a null-terminator, or the comparison will always return false.\n 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 :: libc :: c_void , array_len : usize , c_str : * const :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of an array and a null-terminated string.\n Return whether their contents are equivalent.\n The array should NOT contain a null-terminator, or the comparison will always return false.\n NULL may be passed as the array pointer if its length is declared to be 0.\n The \"C\" locale is used for comparing upper and lowercase letters.\n Data is assumed to be ASCII text, UTF-8 will work fine too."] pub fn aws_array_eq_c_str_ignore_case (array : * const :: libc :: c_void , array_len : usize , c_str : * const :: libc :: c_char) -> bool ; } unsafe extern "C" { pub fn aws_byte_buf_init (buf : * mut aws_byte_buf , allocator : * mut aws_allocator , capacity : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes an aws_byte_buf structure base on another valid one.\n Requires: *src and *allocator are valid objects.\n Ensures: *dest is a valid aws_byte_buf with a new backing array dest->buffer\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Reads 'filename' into 'out_buf'. If successful, 'out_buf' is allocated and filled with the data;\n It is your responsibility to call 'aws_byte_buf_clean_up()' on it. Otherwise, 'out_buf' remains\n unused. In the very unfortunate case where some API needs to treat out_buf as a c_string, a null terminator\n 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 :: libc :: c_char) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Same as aws_byte_buf_init_from_file(), but for reading \"special files\" like /proc/cpuinfo.\n These files don't accurately report their size, so size_hint is used as initial buffer size,\n and the buffer grows until the while file is read."] pub fn aws_byte_buf_init_from_file_with_size_hint (out_buf : * mut aws_byte_buf , alloc : * mut aws_allocator , filename : * const :: libc :: c_char , size_hint : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Evaluates the set of properties that define the shape of all valid aws_byte_buf structures.\n 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 ; } unsafe extern "C" { # [doc = " Evaluates the set of properties that define the shape of all valid aws_byte_cursor structures.\n 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 ; } unsafe extern "C" { # [doc = " Copies src buffer into dest and sets the correct len and capacity.\n A new memory zone is allocated for dest->buffer. When dest is no longer needed it will have to be cleaned-up using\n aws_byte_buf_clean_up(dest).\n Dest capacity and len will be equal to the src len. Allocator of the dest will be identical with parameter allocator.\n If src buffer is null the dest will have a null buffer with a len and a capacity of 0\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Init buffer with contents of multiple cursors, and update cursors to reference the memory stored in the buffer.\n Each cursor arg must be an `struct aws_byte_cursor *`. NULL must be passed as the final arg.\n NOTE: Do not append/grow/resize buffers initialized this way, or the cursors will end up referencing invalid memory.\n Returns AWS_OP_SUCCESS in case of success.\n 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 , ...) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_byte_buf_clean_up (buf : * mut aws_byte_buf) ; } unsafe extern "C" { # [doc = " Equivalent to calling aws_byte_buf_secure_zero and then aws_byte_buf_clean_up\n on the buffer."] pub fn aws_byte_buf_clean_up_secure (buf : * mut aws_byte_buf) ; } unsafe extern "C" { # [doc = " Resets the len of the buffer to 0, but does not free the memory. The buffer can then be reused.\n 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) ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Compare two aws_byte_buf structures.\n Return whether their contents are equivalent."] pub fn aws_byte_buf_eq (a : * const aws_byte_buf , b : * const aws_byte_buf) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of two aws_byte_buf structures.\n Return whether their contents are equivalent.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 ; } unsafe extern "C" { # [doc = " Compare an aws_byte_buf and a null-terminated string.\n Returns true if their contents are equivalent.\n 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 :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of an aws_byte_buf and a null-terminated string.\n Return whether their contents are equivalent.\n The buffer should NOT contain a null-terminator, or the comparison will always return false.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " No copies, no buffer allocations. Iterates over input_str, and returns the\n next substring between split_on instances relative to previous substr.\n Behaves similar to strtok with substr being used as state for next split.\n\n Returns true each time substr is set and false when there is no more splits\n (substr is set to empty in that case).\n\n Example usage.\n struct aws_byte_cursor substr = {0};\n while (aws_byte_cursor_next_split(&input_str, ';', &substr)) {\n   // ...use substr...\n }\n\n Note: It is the user's responsibility zero-initialize substr before the first call.\n\n Edge case rules are as follows:\n empty input will have single empty split. ex. \"\" splits into \"\"\n if input starts with split_on then first split is empty. ex \";A\" splits into \"\", \"A\"\n adjacent split tokens result in empty split. ex \"A;;B\" splits into \"A\", \"\", \"B\"\n If the input ends with split_on, last split is empty. ex. \"A;\" splits into \"A\", \"\"\n\n It is the user's responsibility to make sure the input buffer stays in memory\n long enough to use the results."] pub fn aws_byte_cursor_next_split (input_str : * const aws_byte_cursor , split_on : :: libc :: c_char , substr : * mut aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " No copies, no buffer allocations. Fills in output with a list of\n aws_byte_cursor instances where buffer is an offset into the input_str and\n len is the length of that string in the original buffer.\n\n Edge case rules are as follows:\n if the input begins with split_on, an empty cursor will be the first entry in\n output. if the input has two adjacent split_on tokens, an empty cursor will\n be inserted into the output. if the input ends with split_on, an empty cursor\n will be appended to the output.\n\n It is the user's responsibility to properly initialize output. Recommended number of preallocated elements from\n output is your most likely guess for the upper bound of the number of elements resulting from the split.\n\n The type that will be stored in output is struct aws_byte_cursor (you'll need\n this for the item size param).\n\n It is the user's responsibility to make sure the input buffer stays in memory\n long enough to use the results."] pub fn aws_byte_cursor_split_on_char (input_str : * const aws_byte_cursor , split_on : :: libc :: c_char , output : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " No copies, no buffer allocations. Fills in output with a list of aws_byte_cursor instances where buffer is\n an offset into the input_str and len is the length of that string in the original buffer. N is the max number of\n splits, if this value is zero, it will add all splits to the output.\n\n Edge case rules are as follows:\n if the input begins with split_on, an empty cursor will be the first entry in output\n if the input has two adjacent split_on tokens, an empty cursor will be inserted into the output.\n if the input ends with split_on, an empty cursor will be appended to the output.\n\n It is the user's responsibility to properly initialize output. Recommended number of preallocated elements from\n output is your most likely guess for the upper bound of the number of elements resulting from the split.\n\n If the output array is not large enough, input_str will be updated to point to the first character after the last\n processed split_on instance.\n\n The type that will be stored in output is struct aws_byte_cursor (you'll need this for the item size param).\n\n 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 : :: libc :: c_char , n : usize , output : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Search for an exact byte match inside a cursor. The first match will be returned. Returns AWS_OP_SUCCESS\n on successful match and first_find will be set to the offset in input_str, and length will be the remaining length\n from input_str past the returned offset. If the match was not found, AWS_OP_ERR will be returned and\n 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) -> :: libc :: c_int ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Copies from to to. If to is too small, AWS_ERROR_DEST_COPY_TOO_SMALL will be\n returned. dest->len will contain the amount of data actually copied to dest.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies from to to while converting bytes via the passed in lookup table.\n If to is too small, AWS_ERROR_DEST_COPY_TOO_SMALL will be\n returned. to->len will contain its original size plus the amount of data actually copied to to.\n\n from and to should not be the same buffer (overlap is not handled)\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies from to to. If to is too small, the buffer will be grown appropriately and\n the old contents copied to, before the new contents are appended.\n\n If the grow fails (overflow or OOM), then an error will be returned.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies `from` to `to`. If `to` is too small, the buffer will be grown appropriately and\n the old contents copied over, before the new contents are appended.\n\n If the grow fails (overflow or OOM), then an error will be returned.\n\n If the buffer is grown, the old buffer will be securely cleared before getting freed.\n\n `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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies a single byte into `to`. If `to` is too small, the buffer will be grown appropriately and\n the old contents copied over, before the byte is appended.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies a single byte into `to`. If `to` is too small, the buffer will be grown appropriately and\n the old contents copied over, before the byte is appended.\n\n If the grow fails (overflow or OOM), then an error will be returned.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copy contents of cursor to buffer, then update cursor to reference the memory stored in the buffer.\n If buffer is too small, AWS_ERROR_DEST_COPY_TOO_SMALL will be returned.\n\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Appends '\\0' at the end of the buffer."] pub fn aws_byte_buf_append_null_terminator (buf : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Attempts to increase the capacity of a buffer to the requested capacity\n\n If the the buffer's capacity is currently larger than the request capacity, the\n function does nothing (no shrink is performed)."] pub fn aws_byte_buf_reserve (buffer : * mut aws_byte_buf , requested_capacity : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Convenience function that attempts to increase the capacity of a buffer relative to the current\n length.\n\n  aws_byte_buf_reserve_relative(buf, x) ~~ aws_byte_buf_reserve(buf, buf->len + x)\n"] pub fn aws_byte_buf_reserve_relative (buffer : * mut aws_byte_buf , additional_length : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Concatenates a variable number of struct aws_byte_buf * into destination.\n Number of args must be greater than 1. If dest is too small,\n AWS_ERROR_DEST_COPY_TOO_SMALL will be returned. dest->len will contain the\n amount of data actually copied to dest."] pub fn aws_byte_buf_cat (dest : * mut aws_byte_buf , number_of_args : usize , ...) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Compare two aws_byte_cursor structures.\n Return whether their contents are equivalent."] pub fn aws_byte_cursor_eq (a : * const aws_byte_cursor , b : * const aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of two aws_byte_cursor structures.\n Return whether their contents are equivalent.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 ; } unsafe extern "C" { # [doc = " Compare an aws_byte_cursor and an aws_byte_buf.\n 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 ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of an aws_byte_cursor and an aws_byte_buf.\n Return whether their contents are equivalent.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 ; } unsafe extern "C" { # [doc = " Compare an aws_byte_cursor and a null-terminated string.\n Returns true if their contents are equivalent.\n 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 :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " Perform a case-insensitive string comparison of an aws_byte_cursor and a null-terminated string.\n Return whether their contents are equivalent.\n The cursor should NOT contain a null-terminator, or the comparison will always return false.\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 :: libc :: c_char) -> bool ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Return true if the input starts with the prefix (case-insensitive).\n The \"C\" locale is used for comparing upper and lowercase letters.\n 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 ; } unsafe extern "C" { # [doc = " Case-insensitive hash function for array containing ASCII or UTF-8 text."] pub fn aws_hash_array_ignore_case (array : * const :: libc :: c_void , len : usize) -> u64 ; } unsafe extern "C" { # [doc = " Case-insensitive hash function for aws_byte_cursors stored in an aws_hash_table.\n For case-sensitive hashing, use aws_hash_byte_cursor_ptr()."] pub fn aws_hash_byte_cursor_ptr_ignore_case (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Returns a lookup table for bytes that is the identity transformation with the exception\n of uppercase ascii characters getting replaced with lowercase characters.  Used in\n caseless comparisons."] pub fn aws_lookup_table_to_lower_get () -> * const u8 ; } unsafe extern "C" { # [doc = " Returns lookup table to go from ASCII/UTF-8 hex character to a number (0-15).\n Non-hex characters map to 255.\n Valid examples:\n '0' -> 0\n 'F' -> 15\n 'f' -> 15\n Invalid examples:\n ' ' -> 255\n 'Z' -> 255\n '\\0' -> 255"] pub fn aws_lookup_table_hex_to_num_get () -> * const u8 ; } unsafe 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) -> :: libc :: c_int ; } unsafe 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) -> :: libc :: c_int ; } unsafe 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 :: libc :: c_char) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_byte_buf_from_array (bytes : * const :: libc :: c_void , len : usize) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_byte_buf_from_empty_array (bytes : * const :: libc :: c_void , capacity : usize) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_byte_cursor_from_buf (buf : * const aws_byte_buf) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_byte_cursor_from_c_str (c_str : * const :: libc :: c_char) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_byte_cursor_from_array (bytes : * const :: libc :: c_void , len : usize) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Tests if the given aws_byte_cursor has at least len bytes remaining. If so,\n *buf is advanced by len bytes (incrementing ->ptr and decrementing ->len),\n and an aws_byte_cursor referring to the first len bytes of the original *buf\n is returned. Otherwise, an aws_byte_cursor with ->ptr = NULL, ->len = 0 is\n returned.\n\n Note that if len is above (SIZE_MAX / 2), this function will also treat it as\n 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 ; } unsafe extern "C" { # [doc = " Behaves identically to aws_byte_cursor_advance, but avoids speculative\n execution potentially reading out-of-bounds pointers (by returning an\n empty ptr in such speculated paths).\n\n This should generally be done when using an untrusted or\n data-dependent value for 'len', to avoid speculating into a path where\n 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 ; } unsafe extern "C" { # [doc = " Reads specified length of data from byte cursor and copies it to the\n destination array.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read (cur : * mut aws_byte_cursor , dest : * mut :: libc :: c_void , len : usize) -> bool ; } unsafe extern "C" { # [doc = " Reads as many bytes from cursor as size of buffer, and copies them to buffer.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_and_fill_buffer (cur : * mut aws_byte_cursor , dest : * mut aws_byte_buf) -> bool ; } unsafe extern "C" { # [doc = " Reads a single byte from cursor, placing it in *var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_u8 (cur : * mut aws_byte_cursor , var : * mut u8) -> bool ; } unsafe extern "C" { # [doc = " Reads a 16-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_be16 (cur : * mut aws_byte_cursor , var : * mut u16) -> bool ; } unsafe extern "C" { # [doc = " Reads an unsigned 24-bit value (3 bytes) in network byte order from cur,\n and places it in host byte order into 32-bit var.\n Ex: if cur's next 3 bytes are {0xAA, 0xBB, 0xCC}, then var becomes 0x00AABBCC.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_be24 (cur : * mut aws_byte_cursor , var : * mut u32) -> bool ; } unsafe extern "C" { # [doc = " Reads a 32-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_be32 (cur : * mut aws_byte_cursor , var : * mut u32) -> bool ; } unsafe extern "C" { # [doc = " Reads a 64-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_be64 (cur : * mut aws_byte_cursor , var : * mut u64) -> bool ; } unsafe extern "C" { # [doc = " Reads a 32-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_float_be32 (cur : * mut aws_byte_cursor , var : * mut f32) -> bool ; } unsafe extern "C" { # [doc = " Reads a 64-bit value in network byte order from cur, and places it in host\n byte order into var.\n\n On success, returns true and updates the cursor pointer/length accordingly.\n If there is insufficient space in the cursor, returns false, leaving the\n cursor unchanged."] pub fn aws_byte_cursor_read_float_be64 (cur : * mut aws_byte_cursor , var : * mut f64) -> bool ; } unsafe extern "C" { # [doc = " Reads 2 hex characters from ASCII/UTF-8 text to produce an 8-bit number.\n Accepts both lowercase 'a'-'f' and uppercase 'A'-'F'.\n For example: \"0F\" produces 15.\n\n On success, returns true and advances the cursor by 2.\n If there is insufficient space in the cursor or an invalid character\n 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 ; } unsafe extern "C" { # [doc = " Appends a sub-buffer to the specified buffer.\n\n If the buffer has at least `len' bytes remaining (buffer->capacity - buffer->len >= len),\n then buffer->len is incremented by len, and an aws_byte_buf is assigned to *output corresponding\n to the last len bytes of the input buffer. The aws_byte_buf at *output will have a null\n allocator, a zero initial length, and a capacity of 'len'. The function then returns true.\n\n If there is insufficient space, then this function nulls all fields in *output and returns\n false."] pub fn aws_byte_buf_advance (buffer : * mut aws_byte_buf , output : * mut aws_byte_buf , len : usize) -> bool ; } unsafe extern "C" { # [doc = " Write specified number of bytes from array to byte buffer.\n\n On success, returns true and updates the buffer length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write (buf : * mut aws_byte_buf , src : * const u8 , len : usize) -> bool ; } unsafe extern "C" { # [doc = " Copies all bytes from buffer to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_from_whole_buffer (buf : * mut aws_byte_buf , src : aws_byte_buf) -> bool ; } unsafe extern "C" { # [doc = " Copies all bytes from buffer to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_from_whole_cursor (buf : * mut aws_byte_buf , src : aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " Without increasing buf's capacity, write as much as possible from advancing_cursor into buf.\n\n buf's len is updated accordingly.\n advancing_cursor is advanced so it contains the remaining unwritten parts.\n Returns the section of advancing_cursor which was written.\n\n This function cannot fail. If buf is full (len == capacity) or advancing_len has 0 length,\n then buf and advancing_cursor are not altered and a cursor with 0 length is returned.\n\n Example: Given a buf with 2 bytes of space available and advancing_cursor with contents \"abc\".\n \"ab\" will be written to buf and buf->len will increase 2 and become equal to buf->capacity.\n advancing_cursor will advance so its contents become the unwritten \"c\".\n 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 ; } unsafe extern "C" { # [doc = " Copies one byte to buffer.\n\n On success, returns true and updates the cursor /length\naccordingly.\n\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_u8 (buf : * mut aws_byte_buf , c : u8) -> bool ; } unsafe extern "C" { # [doc = " Writes one byte repeatedly to buffer (like memset)\n\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_u8_n (buf : * mut aws_byte_buf , c : u8 , count : usize) -> bool ; } unsafe extern "C" { # [doc = " Writes a 16-bit integer in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_be16 (buf : * mut aws_byte_buf , x : u16) -> bool ; } unsafe extern "C" { # [doc = " Writes low 24-bits (3 bytes) of an unsigned integer in network byte order (big endian) to buffer.\n Ex: If x is 0x00AABBCC then {0xAA, 0xBB, 0xCC} is written to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, or x's value cannot fit in 3 bytes,\n returns false, leaving the buffer unchanged."] pub fn aws_byte_buf_write_be24 (buf : * mut aws_byte_buf , x : u32) -> bool ; } unsafe extern "C" { # [doc = " Writes a 32-bit integer in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_be32 (buf : * mut aws_byte_buf , x : u32) -> bool ; } unsafe extern "C" { # [doc = " Writes a 32-bit float in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_float_be32 (buf : * mut aws_byte_buf , x : f32) -> bool ; } unsafe extern "C" { # [doc = " Writes a 64-bit integer in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_be64 (buf : * mut aws_byte_buf , x : u64) -> bool ; } unsafe extern "C" { # [doc = " Writes a 64-bit float in network byte order (big endian) to buffer.\n\n On success, returns true and updates the buffer /length accordingly.\n If there is insufficient space in the buffer, returns false, leaving the\n buffer unchanged."] pub fn aws_byte_buf_write_float_be64 (buf : * mut aws_byte_buf , x : f64) -> bool ; } unsafe extern "C" { # [doc = " Like isalnum(), but ignores C locale.\n 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 ; } unsafe extern "C" { # [doc = " Like isalpha(), but ignores C locale.\n Returns true if ch has the value of ASCII/UTF-8: 'a'-'z' or 'A'-'Z'."] pub fn aws_isalpha (ch : u8) -> bool ; } unsafe extern "C" { # [doc = " Like isdigit().\n Returns true if ch has the value of ASCII/UTF-8: '0'-'9'.\n\n Note: C's built-in isdigit() is also supposed to ignore the C locale,\n but cppreference.com claims \"some implementations (e.g. Microsoft in 1252 codepage)\n may classify additional single-byte characters as digits\""] pub fn aws_isdigit (ch : u8) -> bool ; } unsafe extern "C" { # [doc = " Like isxdigit().\n Returns true if ch has the value of ASCII/UTF-8: '0'-'9', 'a'-'f', or 'A'-'F'.\n\n Note: C's built-in isxdigit() is also supposed to ignore the C locale,\n but cppreference.com claims \"some implementations (e.g. Microsoft in 1252 codepage)\n may classify additional single-byte characters as digits\""] pub fn aws_isxdigit (ch : u8) -> bool ; } unsafe extern "C" { # [doc = " Like isspace(), but ignores C locale.\n Return true if ch has the value of ASCII/UTF-8: space (0x20), form feed (0x0C),\n line feed (0x0A), carriage return (0x0D), horizontal tab (0x09), or vertical tab (0x0B)."] pub fn aws_isspace (ch : u8) -> bool ; } unsafe extern "C" { # [doc = " Read entire cursor as ASCII/UTF-8 unsigned base-10 number.\n Stricter than strtoull(), which allows whitespace and inputs that start with \"0x\"\n\n Examples:\n \"0\" -> 0\n \"123\" -> 123\n \"00004\" -> 4 // leading zeros ok\n\n Rejects things like:\n \"-1\" // negative numbers not allowed\n \"1,000\" // only characters 0-9 allowed\n \"\" // blank string not allowed\n \" 0 \" // whitespace not allowed\n \"0x0\" // hex not allowed\n \"FF\" // hex not allowed\n \"999999999999999999999999999999999999999999\" // larger than max u64"] pub fn aws_byte_cursor_utf8_parse_u64 (cursor : aws_byte_cursor , dst : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Read entire cursor as ASCII/UTF-8 unsigned base-16 number with NO \"0x\" prefix.\n\n Examples:\n \"F\" -> 15\n \"000000ff\" -> 255 // leading zeros ok\n \"Ff\" -> 255 // mixed case ok\n \"123\" -> 291\n \"FFFFFFFFFFFFFFFF\" -> 18446744073709551616 // max u64\n\n Rejects things like:\n \"0x0\" // 0x prefix not allowed\n \"\" // blank string not allowed\n \" F \" // whitespace not allowed\n \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\" // larger than max u64"] pub fn aws_byte_cursor_utf8_parse_u64_hex (cursor : aws_byte_cursor , dst : * mut u64) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_linked_list_node { pub next : * mut aws_linked_list_node , pub prev : * mut aws_linked_list_node , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_linked_list_node"] [:: std :: mem :: size_of :: < aws_linked_list_node > () - 16usize] ; ["Alignment of aws_linked_list_node"] [:: std :: mem :: align_of :: < aws_linked_list_node > () - 8usize] ; ["Offset of field: aws_linked_list_node::next"] [:: std :: mem :: offset_of ! (aws_linked_list_node , next) - 0usize] ; ["Offset of field: aws_linked_list_node::prev"] [:: std :: mem :: offset_of ! (aws_linked_list_node , prev) - 8usize] ; } ; 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)] pub struct aws_linked_list { pub head : aws_linked_list_node , pub tail : aws_linked_list_node , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_linked_list"] [:: std :: mem :: size_of :: < aws_linked_list > () - 32usize] ; ["Alignment of aws_linked_list"] [:: std :: mem :: align_of :: < aws_linked_list > () - 8usize] ; ["Offset of field: aws_linked_list::head"] [:: std :: mem :: offset_of ! (aws_linked_list , head) - 0usize] ; ["Offset of field: aws_linked_list::tail"] [:: std :: mem :: offset_of ! (aws_linked_list , tail) - 16usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Set node's next and prev pointers to NULL."] pub fn aws_linked_list_node_reset (node : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Tests if the list is empty."] pub fn aws_linked_list_empty (list : * const aws_linked_list) -> bool ; } unsafe extern "C" { # [doc = " Checks that a linked list is valid."] pub fn aws_linked_list_is_valid (list : * const aws_linked_list) -> bool ; } unsafe extern "C" { # [doc = " Checks that the prev of the next pointer of a node points to the\n node. As this checks whether the [next] connection of a node is\n bidirectional, it returns false if used for the list tail."] pub fn aws_linked_list_node_next_is_valid (node : * const aws_linked_list_node) -> bool ; } unsafe extern "C" { # [doc = " Checks that the next of the prev pointer of a node points to the\n node. Similarly to the above, this returns false if used for the\n head of a list."] pub fn aws_linked_list_node_prev_is_valid (node : * const aws_linked_list_node) -> bool ; } unsafe extern "C" { # [doc = " Checks that a linked list satisfies double linked list connectivity\n constraints. This check is O(n) as it traverses the whole linked\n list to ensure that tail is reachable from head (and vice versa)\n and that every connection is bidirectional.\n\n Note: This check *cannot* go into an infinite loop, because we\n ensure that the connection to the next node is\n bidirectional. Therefore, if a node's [a] a.next is a previous node\n [b] in the list, b.prev != &a and so this check would fail, thus\n terminating the loop."] pub fn aws_linked_list_is_valid_deep (list : * const aws_linked_list) -> bool ; } unsafe extern "C" { # [doc = " Initializes the list. List will be empty after this call."] pub fn aws_linked_list_init (list : * mut aws_linked_list) ; } unsafe extern "C" { # [doc = " Returns an iteration pointer for the first element in the list."] pub fn aws_linked_list_begin (list : * const aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns an iteration pointer for one past the last element in the list."] pub fn aws_linked_list_end (list : * const aws_linked_list) -> * const aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns a pointer for the last element in the list.\n Used to begin iterating the list in reverse. Ex:\n   for (i = aws_linked_list_rbegin(list); i != aws_linked_list_rend(list); i = aws_linked_list_prev(i)) {...}"] pub fn aws_linked_list_rbegin (list : * const aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the pointer to one before the first element in the list.\n Used to end iterating the list in reverse."] pub fn aws_linked_list_rend (list : * const aws_linked_list) -> * const aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the next element in the list."] pub fn aws_linked_list_next (node : * const aws_linked_list_node) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the previous element in the list."] pub fn aws_linked_list_prev (node : * const aws_linked_list_node) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Inserts to_add immediately after after."] pub fn aws_linked_list_insert_after (after : * mut aws_linked_list_node , to_add : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Swaps the order two nodes in the linked list."] pub fn aws_linked_list_swap_nodes (a : * mut aws_linked_list_node , b : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Inserts to_add immediately before before."] pub fn aws_linked_list_insert_before (before : * mut aws_linked_list_node , to_add : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Removes the specified node from the list (prev/next point to each other) and\n returns the next node in the list."] pub fn aws_linked_list_remove (node : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Append new_node."] pub fn aws_linked_list_push_back (list : * mut aws_linked_list , node : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Returns the element in the back of the list."] pub fn aws_linked_list_back (list : * const aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the element in the back of the list and removes it"] pub fn aws_linked_list_pop_back (list : * mut aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Prepend new_node."] pub fn aws_linked_list_push_front (list : * mut aws_linked_list , node : * mut aws_linked_list_node) ; } unsafe extern "C" { # [doc = " Returns the element in the front of the list."] pub fn aws_linked_list_front (list : * const aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { # [doc = " Returns the element in the front of the list and removes it"] pub fn aws_linked_list_pop_front (list : * mut aws_linked_list) -> * mut aws_linked_list_node ; } unsafe extern "C" { pub fn aws_linked_list_swap_contents (a : * mut aws_linked_list , b : * mut aws_linked_list) ; } unsafe extern "C" { # [doc = " Remove all nodes from one list, and add them to the back of another.\n\n Example: if dst={1,2} and src={3,4}, they become dst={1,2,3,4} and src={}"] pub fn aws_linked_list_move_all_back (dst : * mut aws_linked_list , src : * mut aws_linked_list) ; } unsafe extern "C" { # [doc = " Remove all nodes from one list, and add them to the front of another.\n\n Example: if dst={2,1} and src={4,3}, they become dst={4,3,2,1} and src={}"] pub fn aws_linked_list_move_all_front (dst : * mut aws_linked_list , src : * mut aws_linked_list) ; } unsafe extern "C" { # [doc = " Returns true if the node is currently in a list, false otherwise."] pub fn aws_linked_list_node_is_in_list (node : * mut aws_linked_list_node) -> bool ; } pub type aws_io_set_queue_on_handle_fn = :: std :: option :: Option < unsafe extern "C" fn (handle : * mut aws_io_handle , queue : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_io_handle { pub data : aws_io_handle__bindgen_ty_1 , pub additional_data : * mut :: libc :: c_void , pub set_queue : aws_io_set_queue_on_handle_fn , } # [repr (C)] # [derive (Copy , Clone)] pub union aws_io_handle__bindgen_ty_1 { pub fd : :: libc :: c_int , pub handle : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_io_handle__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_io_handle__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_io_handle__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_io_handle__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_io_handle__bindgen_ty_1::fd"] [:: std :: mem :: offset_of ! (aws_io_handle__bindgen_ty_1 , fd) - 0usize] ; ["Offset of field: aws_io_handle__bindgen_ty_1::handle"] [:: std :: mem :: offset_of ! (aws_io_handle__bindgen_ty_1 , handle) - 0usize] ; } ; impl Default for aws_io_handle__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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_io_handle"] [:: std :: mem :: size_of :: < aws_io_handle > () - 24usize] ; ["Alignment of aws_io_handle"] [:: std :: mem :: align_of :: < aws_io_handle > () - 8usize] ; ["Offset of field: aws_io_handle::data"] [:: std :: mem :: offset_of ! (aws_io_handle , data) - 0usize] ; ["Offset of field: aws_io_handle::additional_data"] [:: std :: mem :: offset_of ! (aws_io_handle , additional_data) - 8usize] ; ["Offset of field: aws_io_handle::set_queue"] [:: std :: mem :: offset_of ! (aws_io_handle , set_queue) - 16usize] ; } ; impl Default for aws_io_handle { 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 (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_io_message_type { AWS_IO_MESSAGE_APPLICATION_DATA = 0 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_channel { _unused : [u8 ; 0] , } pub type aws_channel_on_message_write_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (channel : * mut aws_channel , message : * mut aws_io_message , err_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_io_message { # [doc = " Allocator used for the message and message data. If this is null, the message belongs to a pool or some other\n message manager."] pub allocator : * mut aws_allocator , # [doc = " Buffer containing the data for message"] pub message_data : aws_byte_buf , # [doc = " type of the message. This is used for framework control messages. Currently the only type is\n AWS_IO_MESSAGE_APPLICATION_DATA"] pub message_type : aws_io_message_type , # [doc = " Conveys information about the contents of message_data (e.g. cast the ptr to some type). If 0, it's just opaque\n data."] pub message_tag : :: libc :: c_int , # [doc = " In order to avoid excess allocations/copies, on a partial read or write, the copy mark is set to indicate how\n much of this message has already been processed or copied."] pub copy_mark : usize , # [doc = " The channel that the message is bound to."] pub owning_channel : * mut aws_channel , # [doc = " Invoked by the channel once the entire message has been written to the data sink."] pub on_completion : aws_channel_on_message_write_completed_fn , # [doc = " arbitrary user data for the on_completion callback"] pub user_data : * mut :: libc :: c_void , # [doc = " it's incredibly likely something is going to need to queue this,\n go ahead and make sure the list info is part of the original allocation."] pub queueing_handle : aws_linked_list_node , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_io_message"] [:: std :: mem :: size_of :: < aws_io_message > () - 96usize] ; ["Alignment of aws_io_message"] [:: std :: mem :: align_of :: < aws_io_message > () - 8usize] ; ["Offset of field: aws_io_message::allocator"] [:: std :: mem :: offset_of ! (aws_io_message , allocator) - 0usize] ; ["Offset of field: aws_io_message::message_data"] [:: std :: mem :: offset_of ! (aws_io_message , message_data) - 8usize] ; ["Offset of field: aws_io_message::message_type"] [:: std :: mem :: offset_of ! (aws_io_message , message_type) - 40usize] ; ["Offset of field: aws_io_message::message_tag"] [:: std :: mem :: offset_of ! (aws_io_message , message_tag) - 44usize] ; ["Offset of field: aws_io_message::copy_mark"] [:: std :: mem :: offset_of ! (aws_io_message , copy_mark) - 48usize] ; ["Offset of field: aws_io_message::owning_channel"] [:: std :: mem :: offset_of ! (aws_io_message , owning_channel) - 56usize] ; ["Offset of field: aws_io_message::on_completion"] [:: std :: mem :: offset_of ! (aws_io_message , on_completion) - 64usize] ; ["Offset of field: aws_io_message::user_data"] [:: std :: mem :: offset_of ! (aws_io_message , user_data) - 72usize] ; ["Offset of field: aws_io_message::queueing_handle"] [:: std :: mem :: offset_of ! (aws_io_message , queueing_handle) - 80usize] ; } ; impl Default for aws_io_message { 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_io_clock_fn = :: std :: option :: Option < unsafe extern "C" fn (timestamp : * mut u64) -> :: libc :: c_int > ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_io_errors { AWS_IO_CHANNEL_ERROR_ERROR_CANT_ACCEPT_INPUT = 1024 , AWS_IO_CHANNEL_UNKNOWN_MESSAGE_TYPE = 1025 , AWS_IO_CHANNEL_READ_WOULD_EXCEED_WINDOW = 1026 , AWS_IO_EVENT_LOOP_ALREADY_ASSIGNED = 1027 , AWS_IO_EVENT_LOOP_SHUTDOWN = 1028 , AWS_IO_TLS_ERROR_NEGOTIATION_FAILURE = 1029 , AWS_IO_TLS_ERROR_NOT_NEGOTIATED = 1030 , AWS_IO_TLS_ERROR_WRITE_FAILURE = 1031 , AWS_IO_TLS_ERROR_ALERT_RECEIVED = 1032 , AWS_IO_TLS_CTX_ERROR = 1033 , AWS_IO_TLS_VERSION_UNSUPPORTED = 1034 , AWS_IO_TLS_CIPHER_PREF_UNSUPPORTED = 1035 , AWS_IO_MISSING_ALPN_MESSAGE = 1036 , AWS_IO_UNHANDLED_ALPN_PROTOCOL_MESSAGE = 1037 , AWS_IO_FILE_VALIDATION_FAILURE = 1038 , AWS_ERROR_IO_EVENT_LOOP_THREAD_ONLY = 1039 , AWS_ERROR_IO_ALREADY_SUBSCRIBED = 1040 , AWS_ERROR_IO_NOT_SUBSCRIBED = 1041 , AWS_ERROR_IO_OPERATION_CANCELLED = 1042 , AWS_IO_READ_WOULD_BLOCK = 1043 , AWS_IO_BROKEN_PIPE = 1044 , AWS_IO_SOCKET_UNSUPPORTED_ADDRESS_FAMILY = 1045 , AWS_IO_SOCKET_INVALID_OPERATION_FOR_TYPE = 1046 , AWS_IO_SOCKET_CONNECTION_REFUSED = 1047 , AWS_IO_SOCKET_TIMEOUT = 1048 , AWS_IO_SOCKET_NO_ROUTE_TO_HOST = 1049 , AWS_IO_SOCKET_NETWORK_DOWN = 1050 , AWS_IO_SOCKET_CLOSED = 1051 , AWS_IO_SOCKET_NOT_CONNECTED = 1052 , AWS_IO_SOCKET_INVALID_OPTIONS = 1053 , AWS_IO_SOCKET_ADDRESS_IN_USE = 1054 , AWS_IO_SOCKET_INVALID_ADDRESS = 1055 , AWS_IO_SOCKET_ILLEGAL_OPERATION_FOR_STATE = 1056 , AWS_IO_SOCKET_CONNECT_ABORTED = 1057 , AWS_IO_DNS_QUERY_FAILED = 1058 , AWS_IO_DNS_INVALID_NAME = 1059 , AWS_IO_DNS_NO_ADDRESS_FOR_HOST = 1060 , AWS_IO_DNS_HOST_REMOVED_FROM_CACHE = 1061 , AWS_IO_STREAM_INVALID_SEEK_POSITION = 1062 , AWS_IO_STREAM_READ_FAILED = 1063 , DEPRECATED_AWS_IO_INVALID_FILE_HANDLE = 1064 , AWS_IO_SHARED_LIBRARY_LOAD_FAILURE = 1065 , AWS_IO_SHARED_LIBRARY_FIND_SYMBOL_FAILURE = 1066 , AWS_IO_TLS_NEGOTIATION_TIMEOUT = 1067 , AWS_IO_TLS_ALERT_NOT_GRACEFUL = 1068 , AWS_IO_MAX_RETRIES_EXCEEDED = 1069 , AWS_IO_RETRY_PERMISSION_DENIED = 1070 , AWS_IO_TLS_DIGEST_ALGORITHM_UNSUPPORTED = 1071 , AWS_IO_TLS_SIGNATURE_ALGORITHM_UNSUPPORTED = 1072 , AWS_ERROR_PKCS11_VERSION_UNSUPPORTED = 1073 , AWS_ERROR_PKCS11_TOKEN_NOT_FOUND = 1074 , AWS_ERROR_PKCS11_KEY_NOT_FOUND = 1075 , AWS_ERROR_PKCS11_KEY_TYPE_UNSUPPORTED = 1076 , AWS_ERROR_PKCS11_UNKNOWN_CRYPTOKI_RETURN_VALUE = 1077 , AWS_ERROR_PKCS11_CKR_CANCEL = 1078 , AWS_ERROR_PKCS11_CKR_HOST_MEMORY = 1079 , AWS_ERROR_PKCS11_CKR_SLOT_ID_INVALID = 1080 , AWS_ERROR_PKCS11_CKR_GENERAL_ERROR = 1081 , AWS_ERROR_PKCS11_CKR_FUNCTION_FAILED = 1082 , AWS_ERROR_PKCS11_CKR_ARGUMENTS_BAD = 1083 , AWS_ERROR_PKCS11_CKR_NO_EVENT = 1084 , AWS_ERROR_PKCS11_CKR_NEED_TO_CREATE_THREADS = 1085 , AWS_ERROR_PKCS11_CKR_CANT_LOCK = 1086 , AWS_ERROR_PKCS11_CKR_ATTRIBUTE_READ_ONLY = 1087 , AWS_ERROR_PKCS11_CKR_ATTRIBUTE_SENSITIVE = 1088 , AWS_ERROR_PKCS11_CKR_ATTRIBUTE_TYPE_INVALID = 1089 , AWS_ERROR_PKCS11_CKR_ATTRIBUTE_VALUE_INVALID = 1090 , AWS_ERROR_PKCS11_CKR_ACTION_PROHIBITED = 1091 , AWS_ERROR_PKCS11_CKR_DATA_INVALID = 1092 , AWS_ERROR_PKCS11_CKR_DATA_LEN_RANGE = 1093 , AWS_ERROR_PKCS11_CKR_DEVICE_ERROR = 1094 , AWS_ERROR_PKCS11_CKR_DEVICE_MEMORY = 1095 , AWS_ERROR_PKCS11_CKR_DEVICE_REMOVED = 1096 , AWS_ERROR_PKCS11_CKR_ENCRYPTED_DATA_INVALID = 1097 , AWS_ERROR_PKCS11_CKR_ENCRYPTED_DATA_LEN_RANGE = 1098 , AWS_ERROR_PKCS11_CKR_FUNCTION_CANCELED = 1099 , AWS_ERROR_PKCS11_CKR_FUNCTION_NOT_PARALLEL = 1100 , AWS_ERROR_PKCS11_CKR_FUNCTION_NOT_SUPPORTED = 1101 , AWS_ERROR_PKCS11_CKR_KEY_HANDLE_INVALID = 1102 , AWS_ERROR_PKCS11_CKR_KEY_SIZE_RANGE = 1103 , AWS_ERROR_PKCS11_CKR_KEY_TYPE_INCONSISTENT = 1104 , AWS_ERROR_PKCS11_CKR_KEY_NOT_NEEDED = 1105 , AWS_ERROR_PKCS11_CKR_KEY_CHANGED = 1106 , AWS_ERROR_PKCS11_CKR_KEY_NEEDED = 1107 , AWS_ERROR_PKCS11_CKR_KEY_INDIGESTIBLE = 1108 , AWS_ERROR_PKCS11_CKR_KEY_FUNCTION_NOT_PERMITTED = 1109 , AWS_ERROR_PKCS11_CKR_KEY_NOT_WRAPPABLE = 1110 , AWS_ERROR_PKCS11_CKR_KEY_UNEXTRACTABLE = 1111 , AWS_ERROR_PKCS11_CKR_MECHANISM_INVALID = 1112 , AWS_ERROR_PKCS11_CKR_MECHANISM_PARAM_INVALID = 1113 , AWS_ERROR_PKCS11_CKR_OBJECT_HANDLE_INVALID = 1114 , AWS_ERROR_PKCS11_CKR_OPERATION_ACTIVE = 1115 , AWS_ERROR_PKCS11_CKR_OPERATION_NOT_INITIALIZED = 1116 , AWS_ERROR_PKCS11_CKR_PIN_INCORRECT = 1117 , AWS_ERROR_PKCS11_CKR_PIN_INVALID = 1118 , AWS_ERROR_PKCS11_CKR_PIN_LEN_RANGE = 1119 , AWS_ERROR_PKCS11_CKR_PIN_EXPIRED = 1120 , AWS_ERROR_PKCS11_CKR_PIN_LOCKED = 1121 , AWS_ERROR_PKCS11_CKR_SESSION_CLOSED = 1122 , AWS_ERROR_PKCS11_CKR_SESSION_COUNT = 1123 , AWS_ERROR_PKCS11_CKR_SESSION_HANDLE_INVALID = 1124 , AWS_ERROR_PKCS11_CKR_SESSION_PARALLEL_NOT_SUPPORTED = 1125 , AWS_ERROR_PKCS11_CKR_SESSION_READ_ONLY = 1126 , AWS_ERROR_PKCS11_CKR_SESSION_EXISTS = 1127 , AWS_ERROR_PKCS11_CKR_SESSION_READ_ONLY_EXISTS = 1128 , AWS_ERROR_PKCS11_CKR_SESSION_READ_WRITE_SO_EXISTS = 1129 , AWS_ERROR_PKCS11_CKR_SIGNATURE_INVALID = 1130 , AWS_ERROR_PKCS11_CKR_SIGNATURE_LEN_RANGE = 1131 , AWS_ERROR_PKCS11_CKR_TEMPLATE_INCOMPLETE = 1132 , AWS_ERROR_PKCS11_CKR_TEMPLATE_INCONSISTENT = 1133 , AWS_ERROR_PKCS11_CKR_TOKEN_NOT_PRESENT = 1134 , AWS_ERROR_PKCS11_CKR_TOKEN_NOT_RECOGNIZED = 1135 , AWS_ERROR_PKCS11_CKR_TOKEN_WRITE_PROTECTED = 1136 , AWS_ERROR_PKCS11_CKR_UNWRAPPING_KEY_HANDLE_INVALID = 1137 , AWS_ERROR_PKCS11_CKR_UNWRAPPING_KEY_SIZE_RANGE = 1138 , AWS_ERROR_PKCS11_CKR_UNWRAPPING_KEY_TYPE_INCONSISTENT = 1139 , AWS_ERROR_PKCS11_CKR_USER_ALREADY_LOGGED_IN = 1140 , AWS_ERROR_PKCS11_CKR_USER_NOT_LOGGED_IN = 1141 , AWS_ERROR_PKCS11_CKR_USER_PIN_NOT_INITIALIZED = 1142 , AWS_ERROR_PKCS11_CKR_USER_TYPE_INVALID = 1143 , AWS_ERROR_PKCS11_CKR_USER_ANOTHER_ALREADY_LOGGED_IN = 1144 , AWS_ERROR_PKCS11_CKR_USER_TOO_MANY_TYPES = 1145 , AWS_ERROR_PKCS11_CKR_WRAPPED_KEY_INVALID = 1146 , AWS_ERROR_PKCS11_CKR_WRAPPED_KEY_LEN_RANGE = 1147 , AWS_ERROR_PKCS11_CKR_WRAPPING_KEY_HANDLE_INVALID = 1148 , AWS_ERROR_PKCS11_CKR_WRAPPING_KEY_SIZE_RANGE = 1149 , AWS_ERROR_PKCS11_CKR_WRAPPING_KEY_TYPE_INCONSISTENT = 1150 , AWS_ERROR_PKCS11_CKR_RANDOM_SEED_NOT_SUPPORTED = 1151 , AWS_ERROR_PKCS11_CKR_RANDOM_NO_RNG = 1152 , AWS_ERROR_PKCS11_CKR_DOMAIN_PARAMS_INVALID = 1153 , AWS_ERROR_PKCS11_CKR_CURVE_NOT_SUPPORTED = 1154 , AWS_ERROR_PKCS11_CKR_BUFFER_TOO_SMALL = 1155 , AWS_ERROR_PKCS11_CKR_SAVED_STATE_INVALID = 1156 , AWS_ERROR_PKCS11_CKR_INFORMATION_SENSITIVE = 1157 , AWS_ERROR_PKCS11_CKR_STATE_UNSAVEABLE = 1158 , AWS_ERROR_PKCS11_CKR_CRYPTOKI_NOT_INITIALIZED = 1159 , AWS_ERROR_PKCS11_CKR_CRYPTOKI_ALREADY_INITIALIZED = 1160 , AWS_ERROR_PKCS11_CKR_MUTEX_BAD = 1161 , AWS_ERROR_PKCS11_CKR_MUTEX_NOT_LOCKED = 1162 , AWS_ERROR_PKCS11_CKR_NEW_PIN_MODE = 1163 , AWS_ERROR_PKCS11_CKR_NEXT_OTP = 1164 , AWS_ERROR_PKCS11_CKR_EXCEEDED_MAX_ITERATIONS = 1165 , AWS_ERROR_PKCS11_CKR_FIPS_SELF_TEST_FAILED = 1166 , AWS_ERROR_PKCS11_CKR_LIBRARY_LOAD_FAILED = 1167 , AWS_ERROR_PKCS11_CKR_PIN_TOO_WEAK = 1168 , AWS_ERROR_PKCS11_CKR_PUBLIC_KEY_INVALID = 1169 , AWS_ERROR_PKCS11_CKR_FUNCTION_REJECTED = 1170 , AWS_ERROR_IO_PINNED_EVENT_LOOP_MISMATCH = 1171 , AWS_ERROR_PKCS11_ENCODING_ERROR = 1172 , AWS_IO_TLS_ERROR_DEFAULT_TRUST_STORE_NOT_FOUND = 1173 , AWS_IO_STREAM_SEEK_FAILED = 1174 , AWS_IO_STREAM_GET_LENGTH_FAILED = 1175 , AWS_IO_STREAM_SEEK_UNSUPPORTED = 1176 , AWS_IO_STREAM_GET_LENGTH_UNSUPPORTED = 1177 , AWS_IO_TLS_ERROR_READ_FAILURE = 1178 , AWS_ERROR_PEM_MALFORMED = 1179 , AWS_IO_SOCKET_MISSING_EVENT_LOOP = 1180 , AWS_IO_TLS_UNKNOWN_ROOT_CERTIFICATE = 1181 , AWS_IO_TLS_NO_ROOT_CERTIFICATE_FOUND = 1182 , AWS_IO_TLS_CERTIFICATE_EXPIRED = 1183 , AWS_IO_TLS_CERTIFICATE_NOT_YET_VALID = 1184 , AWS_IO_TLS_BAD_CERTIFICATE = 1185 , AWS_IO_TLS_PEER_CERTIFICATE_EXPIRED = 1186 , AWS_IO_TLS_BAD_PEER_CERTIFICATE = 1187 , AWS_IO_TLS_PEER_CERTIFICATE_REVOKED = 1188 , AWS_IO_TLS_PEER_CERTIFICATE_UNKNOWN = 1189 , AWS_IO_TLS_INTERNAL_ERROR = 1190 , AWS_IO_TLS_CLOSED_GRACEFUL = 1191 , AWS_IO_TLS_CLOSED_ABORT = 1192 , AWS_IO_TLS_INVALID_CERTIFICATE_CHAIN = 1193 , AWS_IO_TLS_HOST_NAME_MISMATCH = 1194 , AWS_IO_DNS_QUERY_AGAIN = 1195 , AWS_IO_ERROR_END_RANGE = 2047 , AWS_IO_INVALID_FILE_HANDLE = 50 , } unsafe extern "C" { # [doc = " Initializes internal datastructures used by aws-c-io.\n Must be called before using any functionality in aws-c-io."] pub fn aws_io_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Shuts down the internal datastructures used by aws-c-io."] pub fn aws_io_library_clean_up () ; } unsafe extern "C" { pub fn aws_io_fatal_assert_library_initialized () ; } unsafe extern "C" { pub fn aws_io_error_code_is_retryable (error_code : :: libc :: c_int) -> bool ; } # [doc = " struct aws_atomic_var represents an atomic variable - a value which can hold an integer or pointer\n that can be manipulated atomically. struct aws_atomic_vars should normally only be manipulated\n with atomics methods defined in this header."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_atomic_var { pub value : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_atomic_var"] [:: std :: mem :: size_of :: < aws_atomic_var > () - 8usize] ; ["Alignment of aws_atomic_var"] [:: std :: mem :: align_of :: < aws_atomic_var > () - 8usize] ; ["Offset of field: aws_atomic_var::value"] [:: std :: mem :: offset_of ! (aws_atomic_var , value) - 0usize] ; } ; 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 () } } } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_memory_order { # [doc = " No particular ordering constraints are guaranteed relative to other\n operations at all; we merely ensure that the operation itself is atomic."] aws_memory_order_relaxed = 0 , # [doc = " Specifies acquire ordering. No reads or writes on the current thread can be\n reordered to happen before this operation. This is typically paired with a release\n ordering; any writes that happened on the releasing operation will be visible\n after the paired acquire operation.\n\n Acquire ordering is only meaningful on load or load-store operations."] aws_memory_order_acquire = 2 , # [doc = " Specifies release order. No reads or writes can be reordered to come after this\n operation. Typically paired with an acquire operation.\n\n Release ordering is only meaningful on store or load-store operations."] aws_memory_order_release = 3 , # [doc = " Specifies acquire-release order; if this operation acts as a load, it acts as an\n acquire operation; if it acts as a store, it acts as a release operation; if it's\n a load-store, it does both."] aws_memory_order_acq_rel = 4 , # [doc = " Specifies acquire-release order; if this operation acts as a load, it acts as an\n acquire operation; if it acts as a store, it acts as a release operation; if it's\n a load-store, it does both."] aws_memory_order_seq_cst = 5 , } unsafe extern "C" { # [doc = " Initializes an atomic variable with an integer value. This operation should be done before any\n other operations on this atomic variable, and must be done before attempting any parallel operations.\n\n This operation does not imply a barrier. Ensure that you use an acquire-release barrier (or stronger)\n when communicating the fact that initialization is complete to the other thread. Launching the thread\n implies a sufficiently strong barrier."] pub fn aws_atomic_init_int (var : * mut aws_atomic_var , n : usize) ; } unsafe extern "C" { # [doc = " Initializes an atomic variable with a pointer value. This operation should be done before any\n other operations on this atomic variable, and must be done before attempting any parallel operations.\n\n This operation does not imply a barrier. Ensure that you use an acquire-release barrier (or stronger)\n when communicating the fact that initialization is complete to the other thread. Launching the thread\n implies a sufficiently strong barrier."] pub fn aws_atomic_init_ptr (var : * mut aws_atomic_var , p : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Reads an atomic var as an integer, using the specified ordering, and returns the result."] pub fn aws_atomic_load_int_explicit (var : * const aws_atomic_var , memory_order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Reads an atomic var as an integer, using sequentially consistent ordering, and returns the result."] pub fn aws_atomic_load_int (var : * const aws_atomic_var) -> usize ; } unsafe extern "C" { # [doc = " Reads an atomic var as a pointer, using the specified ordering, and returns the result."] pub fn aws_atomic_load_ptr_explicit (var : * const aws_atomic_var , memory_order : aws_memory_order) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Reads an atomic var as a pointer, using sequentially consistent ordering, and returns the result."] pub fn aws_atomic_load_ptr (var : * const aws_atomic_var) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Stores an integer into an atomic var, using the specified ordering."] pub fn aws_atomic_store_int_explicit (var : * mut aws_atomic_var , n : usize , memory_order : aws_memory_order) ; } unsafe extern "C" { # [doc = " Stores an integer into an atomic var, using sequentially consistent ordering."] pub fn aws_atomic_store_int (var : * mut aws_atomic_var , n : usize) ; } unsafe extern "C" { # [doc = " Stores a pointer into an atomic var, using the specified ordering."] pub fn aws_atomic_store_ptr_explicit (var : * mut aws_atomic_var , p : * mut :: libc :: c_void , memory_order : aws_memory_order) ; } unsafe extern "C" { # [doc = " Stores a pointer into an atomic var, using sequentially consistent ordering."] pub fn aws_atomic_store_ptr (var : * mut aws_atomic_var , p : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Exchanges an integer with the value in an atomic_var, using the specified ordering.\n Returns the value that was previously in the atomic_var."] pub fn aws_atomic_exchange_int_explicit (var : * mut aws_atomic_var , n : usize , memory_order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Exchanges an integer with the value in an atomic_var, using sequentially consistent ordering.\n Returns the value that was previously in the atomic_var."] pub fn aws_atomic_exchange_int (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Exchanges a pointer with the value in an atomic_var, using the specified ordering.\n Returns the value that was previously in the atomic_var."] pub fn aws_atomic_exchange_ptr_explicit (var : * mut aws_atomic_var , p : * mut :: libc :: c_void , memory_order : aws_memory_order) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Exchanges an integer with the value in an atomic_var, using sequentially consistent ordering.\n Returns the value that was previously in the atomic_var."] pub fn aws_atomic_exchange_ptr (var : * mut aws_atomic_var , p : * mut :: libc :: c_void) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set\n to the value in *var. On success, the memory ordering used was order_success; otherwise, it was order_failure.\n order_failure must be no stronger than order_success, and must not be release or acq_rel.\n Returns true if the compare was successful and the variable updated to desired."] pub fn aws_atomic_compare_exchange_int_explicit (var : * mut aws_atomic_var , expected : * mut usize , desired : usize , order_success : aws_memory_order , order_failure : aws_memory_order) -> bool ; } unsafe extern "C" { # [doc = " Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set\n to the value in *var. Uses sequentially consistent memory ordering, regardless of success or failure.\n Returns true if the compare was successful and the variable updated to desired."] pub fn aws_atomic_compare_exchange_int (var : * mut aws_atomic_var , expected : * mut usize , desired : usize) -> bool ; } unsafe extern "C" { # [doc = " Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set\n to the value in *var. On success, the memory ordering used was order_success; otherwise, it was order_failure.\n order_failure must be no stronger than order_success, and must not be release or acq_rel.\n Returns true if the compare was successful and the variable updated to desired."] pub fn aws_atomic_compare_exchange_ptr_explicit (var : * mut aws_atomic_var , expected : * mut * mut :: libc :: c_void , desired : * mut :: libc :: c_void , order_success : aws_memory_order , order_failure : aws_memory_order) -> bool ; } unsafe extern "C" { # [doc = " Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set\n to the value in *var. Uses sequentially consistent memory ordering, regardless of success or failure.\n Returns true if the compare was successful and the variable updated to desired."] pub fn aws_atomic_compare_exchange_ptr (var : * mut aws_atomic_var , expected : * mut * mut :: libc :: c_void , desired : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " Atomically adds n to *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_add_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically subtracts n from *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_sub_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically ORs n with *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_or_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically ANDs n with *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_and_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically XORs n with *var, and returns the previous value of *var."] pub fn aws_atomic_fetch_xor_explicit (var : * mut aws_atomic_var , n : usize , order : aws_memory_order) -> usize ; } unsafe extern "C" { # [doc = " Atomically adds n to *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_add (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Atomically subtracts n from *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_sub (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Atomically ands n into *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_and (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Atomically ors n into *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_or (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Atomically xors n into *var, and returns the previous value of *var.\n Uses sequentially consistent ordering."] pub fn aws_atomic_fetch_xor (var : * mut aws_atomic_var , n : usize) -> usize ; } unsafe extern "C" { # [doc = " Provides the same reordering guarantees as an atomic operation with the specified memory order, without\n needing to actually perform an atomic operation."] pub fn aws_atomic_thread_fence (order : aws_memory_order) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_string { pub allocator : * mut aws_allocator , pub len : usize , pub bytes : [u8 ; 1usize] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_string"] [:: std :: mem :: size_of :: < aws_string > () - 24usize] ; ["Alignment of aws_string"] [:: std :: mem :: align_of :: < aws_string > () - 8usize] ; ["Offset of field: aws_string::allocator"] [:: std :: mem :: offset_of ! (aws_string , allocator) - 0usize] ; ["Offset of field: aws_string::len"] [:: std :: mem :: offset_of ! (aws_string , len) - 8usize] ; ["Offset of field: aws_string::bytes"] [:: std :: mem :: offset_of ! (aws_string , bytes) - 16usize] ; } ; 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 () } } } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn aws_string_eq_c_str (str_ : * const aws_string , c_str : * const :: libc :: c_char) -> bool ; } unsafe 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 :: libc :: c_char) -> bool ; } unsafe 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 :: libc :: c_char) -> * mut aws_string ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Deallocate string."] pub fn aws_string_destroy (str_ : * mut aws_string) ; } unsafe extern "C" { # [doc = " Zeroes out the data bytes of string and then deallocates the memory.\n Not safe to run on a string created with AWS_STATIC_STRING_FROM_LITERAL."] pub fn aws_string_destroy_secure (str_ : * mut aws_string) ; } unsafe extern "C" { # [doc = " Compares lexicographical ordering of two strings. This is a binary\n byte-by-byte comparison, treating bytes as unsigned integers. It is suitable\n for either textual or binary data and is unaware of unicode or any other byte\n encoding. If both strings are identical in the bytes of the shorter string,\n then the longer string is lexicographically after the shorter.\n\n Returns a positive number if string a > string b. (i.e., string a is\n lexicographically after string b.) Returns zero if string a = string b.\n Returns negative number if string a < string b."] pub fn aws_string_compare (a : * const aws_string , b : * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " A convenience function for sorting lists of (const struct aws_string *) elements. This can be used as a\n 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 :: libc :: c_void , b : * const :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies all bytes from string to buf.\n\n On success, returns true and updates the buf pointer/length\n accordingly. If there is insufficient space in the buf, returns\n false, leaving the buf unchanged."] pub fn aws_byte_buf_write_from_whole_string (buf : * mut aws_byte_buf , src : * const aws_string) -> bool ; } unsafe extern "C" { # [doc = " Creates an aws_byte_cursor from an existing string.\n If the src is NULL, it returns an empty cursor"] pub fn aws_byte_cursor_from_string (src : * const aws_string) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " If the string was dynamically allocated, clones it. If the string was statically allocated (i.e. has no allocator),\n returns the original string."] pub fn aws_string_clone_or_reuse (allocator : * mut aws_allocator , str_ : * const aws_string) -> * mut aws_string ; } unsafe 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\n is found within max_read_len of str, AWS_ERROR_C_STRING_BUFFER_NOT_NULL_TERMINATED is raised. Otherwise, str_len\n will contain the string length minus the NULL character, and AWS_OP_SUCCESS will be returned."] pub fn aws_secure_strlen (str_ : * const :: libc :: c_char , max_read_len : usize , str_len : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Equivalent to str->bytes."] pub fn aws_string_bytes (str_ : * const aws_string) -> * const u8 ; } unsafe extern "C" { # [doc = " Equivalent to `(const char *)str->bytes`."] pub fn aws_string_c_str (str_ : * const aws_string) -> * const :: libc :: c_char ; } unsafe extern "C" { # [doc = " Evaluates the set of properties that define the shape of all valid aws_string structures.\n It is also a cheap check, in the sense it run in constant time (i.e., no loops or recursion)."] pub fn aws_string_is_valid (str_ : * const aws_string) -> bool ; } unsafe extern "C" { # [doc = " Best-effort checks aws_string invariants, when the str->len is unknown"] pub fn aws_c_string_is_valid (str_ : * const :: libc :: c_char) -> bool ; } unsafe extern "C" { # [doc = " Evaluates if a char is a white character."] pub fn aws_char_is_space (c : u8) -> bool ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_thread_detach_state { AWS_THREAD_NOT_CREATED = 1 , AWS_THREAD_JOINABLE = 2 , AWS_THREAD_JOIN_COMPLETED = 3 , AWS_THREAD_MANAGED = 4 , } # [repr (u32)] # [non_exhaustive] # [doc = " Specifies the join strategy used on an aws_thread, which in turn controls whether or not a thread participates\n in the managed thread system.  The managed thread system provides logic to guarantee a join on all participating\n threads at the cost of laziness (the user cannot control when joins happen).\n\n Manual - thread does not participate in the managed thread system; any joins must be done by the user.  This\n is the default.  The user must call aws_thread_clean_up(), but only after any desired join operation has completed.\n Not doing so will cause the windows handle to leak.\n\n Managed - the managed thread system will automatically perform a join some time after the thread's run function\n has completed.  It is an error to call aws_thread_join on a thread configured with the managed join strategy.  The\n managed thread system will call aws_thread_clean_up() on the thread after the background join has completed.\n\n Additionally, an API exists, aws_thread_join_all_managed(), which blocks and returns when all outstanding threads\n with the managed strategy have fully joined.  This API is useful for tests (rather than waiting for many individual\n signals) and program shutdown or DLL unload.  This API is automatically invoked by the common library clean up\n function.  If the common library clean up is called from a managed thread, this will cause deadlock.\n\n Lazy thread joining is done only when threads finish their run function or when the user calls\n aws_thread_join_all_managed().  This means it may be a long time between thread function completion and the join\n being applied, but the queue of unjoined threads is always one or fewer so there is no critical resource\n backlog.\n\n Currently, only event loop group async cleanup and host resolver threads participate in the managed thread system.\n Additionally, event loop threads will increment and decrement the pending join count (they are manually joined\n internally) in order to have an accurate view of internal thread usage and also to prevent failure to release\n an event loop group fully from allowing aws_thread_join_all_managed() from running to completion when its\n intent is such that it should block instead."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_thread_join_strategy { AWS_TJS_MANUAL = 0 , AWS_TJS_MANAGED = 1 , } # [repr (C)] # [derive (Debug , Copy , Clone)] 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.\n The length should not exceed AWS_THREAD_NAME_RECOMMENDED_STRLEN(15)\n if you want it to display properly on all platforms."] pub name : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_thread_options"] [:: std :: mem :: size_of :: < aws_thread_options > () - 32usize] ; ["Alignment of aws_thread_options"] [:: std :: mem :: align_of :: < aws_thread_options > () - 8usize] ; ["Offset of field: aws_thread_options::stack_size"] [:: std :: mem :: offset_of ! (aws_thread_options , stack_size) - 0usize] ; ["Offset of field: aws_thread_options::cpu_id"] [:: std :: mem :: offset_of ! (aws_thread_options , cpu_id) - 8usize] ; ["Offset of field: aws_thread_options::join_strategy"] [:: std :: mem :: offset_of ! (aws_thread_options , join_strategy) - 12usize] ; ["Offset of field: aws_thread_options::name"] [:: std :: mem :: offset_of ! (aws_thread_options , name) - 16usize] ; } ; 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_thread"] [:: std :: mem :: size_of :: < aws_thread > () - 24usize] ; ["Alignment of aws_thread"] [:: std :: mem :: align_of :: < aws_thread > () - 8usize] ; ["Offset of field: aws_thread::allocator"] [:: std :: mem :: offset_of ! (aws_thread , allocator) - 0usize] ; ["Offset of field: aws_thread::detach_state"] [:: std :: mem :: offset_of ! (aws_thread , detach_state) - 8usize] ; ["Offset of field: aws_thread::thread_id"] [:: std :: mem :: offset_of ! (aws_thread , thread_id) - 16usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Returns an instance of system default thread options."] pub fn aws_default_thread_options () -> * const aws_thread_options ; } unsafe extern "C" { pub fn aws_thread_call_once (flag : * mut aws_thread_once , call_once : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: libc :: c_void) > , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Initializes a new platform specific thread object struct (not the os-level\n thread itself)."] pub fn aws_thread_init (thread : * mut aws_thread , allocator : * mut aws_allocator) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Creates an OS level thread and associates it with func. context will be passed to func when it is executed.\n options will be applied to the thread if they are applicable for the platform.\n\n After launch, you may join on the thread.  A successfully launched thread must have clean_up called on it in order\n to avoid a handle leak.  If you do not join before calling clean_up, the thread will become detached.\n\n 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 :: libc :: c_void) > , arg : * mut :: libc :: c_void , options : * const aws_thread_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the id of thread"] pub fn aws_thread_get_id (thread : * mut aws_thread) -> aws_thread_id_t ; } unsafe extern "C" { # [doc = " Gets the detach state of the thread. For example, is it safe to call join on\n this thread? Has it been detached()?"] pub fn aws_thread_get_detach_state (thread : * mut aws_thread) -> aws_thread_detach_state ; } unsafe extern "C" { # [doc = " Joins the calling thread to a thread instance. Returns when thread is\n finished.  Calling this from the associated OS thread will cause a deadlock."] pub fn aws_thread_join (thread : * mut aws_thread) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Blocking call that waits for all managed threads to complete their join call.  This can only be called\n from the main thread or a non-managed thread.\n\n This gets called automatically from library cleanup.\n\n 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 () -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Overrides how long, in nanoseconds, that aws_thread_join_all_managed will wait for threads to complete.\n A value of zero will result in an unbounded wait."] pub fn aws_thread_set_managed_join_timeout_ns (timeout_in_ns : u64) ; } unsafe 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\n before calling this function."] pub fn aws_thread_clean_up (thread : * mut aws_thread) ; } unsafe extern "C" { # [doc = " Returns the thread id of the calling thread."] pub fn aws_thread_current_thread_id () -> aws_thread_id_t ; } unsafe extern "C" { # [doc = " Compare thread ids."] pub fn aws_thread_thread_id_equal (t1 : aws_thread_id_t , t2 : aws_thread_id_t) -> bool ; } unsafe 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 :: libc :: c_void) > ; unsafe extern "C" { # [doc = " Adds a callback to the chain to be called when the current thread joins.\n Callbacks are called from the current thread, in the reverse order they\n were added, after the thread function returns.\n 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 :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Increments the count of unjoined threads in the managed thread system.  Used by managed threads and\n event loop threads.  Additional usage requires the user to join corresponding threads themselves and\n correctly increment/decrement even in the face of launch/join errors.\n\n aws_thread_join_all_managed() will not return until this count has gone to zero."] pub fn aws_thread_increment_unjoined_count () ; } unsafe extern "C" { # [doc = " Decrements the count of unjoined threads in the managed thread system.  Used by managed threads and\n event loop threads.  Additional usage requires the user to join corresponding threads themselves and\n correctly increment/decrement even in the face of launch/join errors.\n\n aws_thread_join_all_managed() will not return until this count has gone to zero."] pub fn aws_thread_decrement_unjoined_count () ; } unsafe extern "C" { # [doc = " Gets name of the current thread.\n Caller is responsible for destroying returned string.\n If thread does not have a name, AWS_OP_SUCCESS is returned and out_name is\n set to NULL.\n If underlying OS call fails,  AWS_ERROR_SYS_CALL_FAILURE will be raised\n If OS does not support getting thread name, AWS_ERROR_PLATFORM_NOT_SUPPORTED\n will be raised"] pub fn aws_thread_current_name (allocator : * mut aws_allocator , out_name : * mut * mut aws_string) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets name of the thread.\n Caller is responsible for destroying returned string.\n If thread does not have a name, AWS_OP_SUCCESS is returned and out_name is\n set to NULL.\n If underlying OS call fails,  AWS_ERROR_SYS_CALL_FAILURE will be raised\n If OS does not support getting thread name, AWS_ERROR_PLATFORM_NOT_SUPPORTED\n will be raised"] pub fn aws_thread_name (allocator : * mut aws_allocator , thread_id : aws_thread_id_t , out_name : * mut * mut aws_string) -> :: libc :: c_int ; } pub mod aws_log_level { # [doc = " Controls what log calls pass through the logger and what log calls get filtered out.\n If a log level has a value of X, then all log calls using a level <= X will appear, while\n those using a value > X will not occur.\n\n You can filter both dynamically (by setting the log level on the logger object) or statically\n (by defining AWS_STATIC_LOG_LEVEL to be an appropriate integer module-wide).  Statically filtered\n log calls will be completely compiled out but require a rebuild if you want to get more detail\n about what's happening."] pub type Type = :: libc :: c_uint ; pub const AWS_LL_NONE : Type = 0 ; pub const AWS_LL_FATAL : Type = 1 ; pub const AWS_LL_ERROR : Type = 2 ; pub const AWS_LL_WARN : Type = 3 ; pub const AWS_LL_INFO : Type = 4 ; pub const AWS_LL_DEBUG : Type = 5 ; pub const AWS_LL_TRACE : Type = 6 ; pub const AWS_LL_COUNT : Type = 7 ; } # [doc = " Log subject is a way of designating the topic of logging.\n\n The general idea is to support a finer-grained approach to log level control.  The primary use case\n is for situations that require more detailed logging within a specific domain, where enabling that detail\n globally leads to an untenable flood of information.\n\n For example, enable TRACE logging for tls-related log statements (handshake binary payloads), but\n only WARN logging everywhere else (because http payloads would blow up the log files).\n\n Log subject is an enum similar to aws error: each library has its own value-space and someone is\n responsible for registering the value <-> string connections."] pub type aws_log_subject_t = u32 ; pub const AWS_LOG_SUBJECT_STRIDE_BITS : _bindgen_ty_20 = _bindgen_ty_20 :: AWS_LOG_SUBJECT_STRIDE_BITS ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_20 { AWS_LOG_SUBJECT_STRIDE_BITS = 10 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_log_subject_info { pub subject_id : aws_log_subject_t , pub subject_name : * const :: libc :: c_char , pub subject_description : * const :: libc :: c_char , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_subject_info"] [:: std :: mem :: size_of :: < aws_log_subject_info > () - 24usize] ; ["Alignment of aws_log_subject_info"] [:: std :: mem :: align_of :: < aws_log_subject_info > () - 8usize] ; ["Offset of field: aws_log_subject_info::subject_id"] [:: std :: mem :: offset_of ! (aws_log_subject_info , subject_id) - 0usize] ; ["Offset of field: aws_log_subject_info::subject_name"] [:: std :: mem :: offset_of ! (aws_log_subject_info , subject_name) - 8usize] ; ["Offset of field: aws_log_subject_info::subject_description"] [:: std :: mem :: offset_of ! (aws_log_subject_info , subject_description) - 16usize] ; } ; 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)] pub struct aws_log_subject_info_list { pub subject_list : * mut aws_log_subject_info , pub count : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_subject_info_list"] [:: std :: mem :: size_of :: < aws_log_subject_info_list > () - 16usize] ; ["Alignment of aws_log_subject_info_list"] [:: std :: mem :: align_of :: < aws_log_subject_info_list > () - 8usize] ; ["Offset of field: aws_log_subject_info_list::subject_list"] [:: std :: mem :: offset_of ! (aws_log_subject_info_list , subject_list) - 0usize] ; ["Offset of field: aws_log_subject_info_list::count"] [:: std :: mem :: offset_of ! (aws_log_subject_info_list , count) - 8usize] ; } ; 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 () } } } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_common_log_subject { AWS_LS_COMMON_GENERAL = 0 , AWS_LS_COMMON_TASK_SCHEDULER = 1 , AWS_LS_COMMON_THREAD = 2 , AWS_LS_COMMON_MEMTRACE = 3 , AWS_LS_COMMON_XML_PARSER = 4 , AWS_LS_COMMON_IO = 5 , AWS_LS_COMMON_BUS = 6 , AWS_LS_COMMON_TEST = 7 , AWS_LS_COMMON_JSON_PARSER = 8 , AWS_LS_COMMON_CBOR = 9 , AWS_LS_COMMON_LAST = 1023 , } # [doc = " We separate the log level function from the log call itself so that we can do the filter check in the macros (see\n below)\n\n By doing so, we make it so that the variadic format arguments are not even evaluated if the filter check does not\n succeed."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_logger_vtable { pub log : :: std :: option :: Option < unsafe extern "C" fn (logger : * mut aws_logger , log_level : aws_log_level :: Type , subject : aws_log_subject_t , format : * const :: libc :: c_char , ...) -> :: libc :: 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 :: Type > , 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 :: Type) -> :: libc :: c_int > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logger_vtable"] [:: std :: mem :: size_of :: < aws_logger_vtable > () - 32usize] ; ["Alignment of aws_logger_vtable"] [:: std :: mem :: align_of :: < aws_logger_vtable > () - 8usize] ; ["Offset of field: aws_logger_vtable::log"] [:: std :: mem :: offset_of ! (aws_logger_vtable , log) - 0usize] ; ["Offset of field: aws_logger_vtable::get_log_level"] [:: std :: mem :: offset_of ! (aws_logger_vtable , get_log_level) - 8usize] ; ["Offset of field: aws_logger_vtable::clean_up"] [:: std :: mem :: offset_of ! (aws_logger_vtable , clean_up) - 16usize] ; ["Offset of field: aws_logger_vtable::set_log_level"] [:: std :: mem :: offset_of ! (aws_logger_vtable , set_log_level) - 24usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_logger { pub vtable : * mut aws_logger_vtable , pub allocator : * mut aws_allocator , pub p_impl : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logger"] [:: std :: mem :: size_of :: < aws_logger > () - 24usize] ; ["Alignment of aws_logger"] [:: std :: mem :: align_of :: < aws_logger > () - 8usize] ; ["Offset of field: aws_logger::vtable"] [:: std :: mem :: offset_of ! (aws_logger , vtable) - 0usize] ; ["Offset of field: aws_logger::allocator"] [:: std :: mem :: offset_of ! (aws_logger , allocator) - 8usize] ; ["Offset of field: aws_logger::p_impl"] [:: std :: mem :: offset_of ! (aws_logger , p_impl) - 16usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logger_pipeline"] [:: std :: mem :: size_of :: < aws_logger_pipeline > () - 40usize] ; ["Alignment of aws_logger_pipeline"] [:: std :: mem :: align_of :: < aws_logger_pipeline > () - 8usize] ; ["Offset of field: aws_logger_pipeline::formatter"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , formatter) - 0usize] ; ["Offset of field: aws_logger_pipeline::channel"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , channel) - 8usize] ; ["Offset of field: aws_logger_pipeline::writer"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , writer) - 16usize] ; ["Offset of field: aws_logger_pipeline::allocator"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , allocator) - 24usize] ; ["Offset of field: aws_logger_pipeline::level"] [:: std :: mem :: offset_of ! (aws_logger_pipeline , level) - 32usize] ; } ; 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().\n Set `filename` to open a file for logging and close it when the logger cleans up.\n Set `file` to use a file that is already open, such as `stderr` or `stdout`."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_logger_standard_options { pub level : aws_log_level :: Type , pub filename : * const :: libc :: c_char , pub file : * mut FILE , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logger_standard_options"] [:: std :: mem :: size_of :: < aws_logger_standard_options > () - 24usize] ; ["Alignment of aws_logger_standard_options"] [:: std :: mem :: align_of :: < aws_logger_standard_options > () - 8usize] ; ["Offset of field: aws_logger_standard_options::level"] [:: std :: mem :: offset_of ! (aws_logger_standard_options , level) - 0usize] ; ["Offset of field: aws_logger_standard_options::filename"] [:: std :: mem :: offset_of ! (aws_logger_standard_options , filename) - 8usize] ; ["Offset of field: aws_logger_standard_options::file"] [:: std :: mem :: offset_of ! (aws_logger_standard_options , file) - 16usize] ; } ; 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 () } } } unsafe 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) ; } unsafe extern "C" { # [doc = " Gets the aws logger used globally across the process."] pub fn aws_logger_get () -> * mut aws_logger ; } unsafe extern "C" { # [doc = " Gets the aws logger used globally across the process if the logging level is at least the inputted level.\n\n @param subject log subject to perform the level check versus, not currently used\n @param level logging level to check against in order to return the logger\n @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 :: Type) -> * mut aws_logger ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Sets the current logging level for the logger.  Loggers are not require to support this.\n @param logger logger to set the log level for\n @param level new log level for the logger\n @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 :: Type) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Converts a log level to a c-string constant.  Intended primarily to support building log lines that\n include the level in them, i.e.\n\n [ERROR] 10:34:54.642 01-31-19 - Json parse error...."] pub fn aws_log_level_to_string (log_level : aws_log_level :: Type , level_string : * mut * const :: libc :: c_char) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Converts a c-string constant to a log level value.  Uses case-insensitive comparison\n and simply iterates all possibilities until a match or nothing remains.  If no match\n is found, AWS_OP_ERR is returned."] pub fn aws_string_to_log_level (level_string : * const :: libc :: c_char , log_level : * mut aws_log_level :: Type) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Converts an aws_thread_id_t to a c-string.  For portability, aws_thread_id_t\n must not be printed directly.  Intended primarily to support building log\n lines that include the thread id in them.  The parameter `buffer` must\n point-to a char buffer of length `bufsz == AWS_THREAD_ID_T_REPR_BUFSZ`.  The\n thread id representation is returned in `buffer`."] pub fn aws_thread_id_t_to_string (thread_id : aws_thread_id_t , buffer : * mut :: libc :: c_char , bufsz : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get subject name from log subject."] pub fn aws_log_subject_name (subject : aws_log_subject_t) -> * const :: libc :: c_char ; } unsafe 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) ; } unsafe 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) ; } unsafe extern "C" { pub fn aws_logger_init_standard (logger : * mut aws_logger , allocator : * mut aws_allocator , options : * mut aws_logger_standard_options) -> :: libc :: c_int ; } unsafe 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 :: Type) -> :: libc :: c_int ; } unsafe extern "C" { pub static mut g_pipeline_logger_owned_vtable : aws_logger_vtable ; } unsafe extern "C" { pub fn aws_logger_init_noalloc (logger : * mut aws_logger , allocator : * mut aws_allocator , options : * mut aws_logger_standard_options) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_io_log_subject { AWS_LS_IO_GENERAL = 1024 , AWS_LS_IO_EVENT_LOOP = 1025 , AWS_LS_IO_SOCKET = 1026 , AWS_LS_IO_SOCKET_HANDLER = 1027 , AWS_LS_IO_TLS = 1028 , AWS_LS_IO_ALPN = 1029 , AWS_LS_IO_DNS = 1030 , AWS_LS_IO_PKI = 1031 , AWS_LS_IO_CHANNEL = 1032 , AWS_LS_IO_CHANNEL_BOOTSTRAP = 1033 , AWS_LS_IO_FILE_UTILS = 1034 , AWS_LS_IO_SHARED_LIBRARY = 1035 , AWS_LS_IO_EXPONENTIAL_BACKOFF_RETRY_STRATEGY = 1036 , AWS_LS_IO_STANDARD_RETRY_STRATEGY = 1037 , AWS_LS_IO_PKCS11 = 1038 , AWS_LS_IO_PEM = 1039 , AWS_IO_LS_LAST = 2047 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_sdkutils_errors { AWS_ERROR_SDKUTILS_GENERAL = 15360 , AWS_ERROR_SDKUTILS_PARSE_FATAL = 15361 , AWS_ERROR_SDKUTILS_PARSE_RECOVERABLE = 15362 , AWS_ERROR_SDKUTILS_ENDPOINTS_UNSUPPORTED_RULESET = 15363 , AWS_ERROR_SDKUTILS_ENDPOINTS_PARSE_FAILED = 15364 , AWS_ERROR_SDKUTILS_ENDPOINTS_RESOLVE_INIT_FAILED = 15365 , AWS_ERROR_SDKUTILS_ENDPOINTS_RESOLVE_FAILED = 15366 , AWS_ERROR_SDKUTILS_ENDPOINTS_EMPTY_RULESET = 15367 , AWS_ERROR_SDKUTILS_ENDPOINTS_RULESET_EXHAUSTED = 15368 , AWS_ERROR_SDKUTILS_PARTITIONS_UNSUPPORTED = 15369 , AWS_ERROR_SDKUTILS_PARTITIONS_PARSE_FAILED = 15370 , AWS_ERROR_SDKUTILS_ENDPOINTS_UNSUPPORTED_REGEX = 15371 , AWS_ERROR_SDKUTILS_ENDPOINTS_REGEX_NO_MATCH = 15372 , AWS_ERROR_SDKUTILS_END_RANGE = 16383 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_sdkutils_log_subject { AWS_LS_SDKUTILS_GENERAL = 15360 , AWS_LS_SDKUTILS_PROFILE = 15361 , AWS_LS_SDKUTILS_ENDPOINTS_PARSING = 15362 , AWS_LS_SDKUTILS_ENDPOINTS_RESOLVE = 15363 , AWS_LS_SDKUTILS_ENDPOINTS_GENERAL = 15364 , AWS_LS_SDKUTILS_PARTITIONS_PARSING = 15365 , AWS_LS_SDKUTILS_ENDPOINTS_REGEX = 15366 , AWS_LS_SDKUTILS_LAST = 16383 , } unsafe extern "C" { pub fn aws_sdkutils_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { pub fn aws_sdkutils_library_clean_up () ; } # [repr (u32)] # [non_exhaustive] # [doc = " Auth-specific error codes"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_auth_errors { AWS_AUTH_PROFILE_PARSE_RECOVERABLE_ERROR = 15362 , AWS_AUTH_PROFILE_PARSE_FATAL_ERROR = 15361 , AWS_AUTH_SIGNING_UNSUPPORTED_ALGORITHM = 6144 , AWS_AUTH_SIGNING_MISMATCHED_CONFIGURATION = 6145 , AWS_AUTH_SIGNING_NO_CREDENTIALS = 6146 , AWS_AUTH_SIGNING_ILLEGAL_REQUEST_QUERY_PARAM = 6147 , AWS_AUTH_SIGNING_ILLEGAL_REQUEST_HEADER = 6148 , AWS_AUTH_SIGNING_INVALID_CONFIGURATION = 6149 , AWS_AUTH_CREDENTIALS_PROVIDER_INVALID_ENVIRONMENT = 6150 , AWS_AUTH_CREDENTIALS_PROVIDER_INVALID_DELEGATE = 6151 , AWS_AUTH_CREDENTIALS_PROVIDER_PROFILE_SOURCE_FAILURE = 6152 , AWS_AUTH_CREDENTIALS_PROVIDER_IMDS_SOURCE_FAILURE = 6153 , AWS_AUTH_CREDENTIALS_PROVIDER_STS_SOURCE_FAILURE = 6154 , AWS_AUTH_CREDENTIALS_PROVIDER_HTTP_STATUS_FAILURE = 6155 , AWS_AUTH_PROVIDER_PARSER_UNEXPECTED_RESPONSE = 6156 , AWS_AUTH_CREDENTIALS_PROVIDER_ECS_SOURCE_FAILURE = 6157 , AWS_AUTH_CREDENTIALS_PROVIDER_X509_SOURCE_FAILURE = 6158 , AWS_AUTH_CREDENTIALS_PROVIDER_PROCESS_SOURCE_FAILURE = 6159 , AWS_AUTH_CREDENTIALS_PROVIDER_STS_WEB_IDENTITY_SOURCE_FAILURE = 6160 , AWS_AUTH_SIGNING_UNSUPPORTED_SIGNATURE_TYPE = 6161 , AWS_AUTH_SIGNING_MISSING_PREVIOUS_SIGNATURE = 6162 , AWS_AUTH_SIGNING_INVALID_CREDENTIALS = 6163 , AWS_AUTH_CANONICAL_REQUEST_MISMATCH = 6164 , AWS_AUTH_SIGV4A_SIGNATURE_VALIDATION_FAILURE = 6165 , AWS_AUTH_CREDENTIALS_PROVIDER_COGNITO_SOURCE_FAILURE = 6166 , AWS_AUTH_CREDENTIALS_PROVIDER_DELEGATE_FAILURE = 6167 , AWS_AUTH_SSO_TOKEN_PROVIDER_SOURCE_FAILURE = 6168 , AWS_AUTH_SSO_TOKEN_INVALID = 6169 , AWS_AUTH_SSO_TOKEN_EXPIRED = 6170 , AWS_AUTH_CREDENTIALS_PROVIDER_SSO_SOURCE_FAILURE = 6171 , AWS_AUTH_IMDS_CLIENT_SOURCE_FAILURE = 6172 , AWS_AUTH_PROFILE_STS_CREDENTIALS_PROVIDER_CYCLE_FAILURE = 6173 , AWS_AUTH_CREDENTIALS_PROVIDER_ECS_INVALID_TOKEN_FILE_PATH = 6174 , AWS_AUTH_CREDENTIALS_PROVIDER_ECS_INVALID_HOST = 6175 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_SESSION_MISSING = 6176 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_REGION_MISSING = 6177 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_TOKEN_PATH = 6178 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_TOKEN = 6179 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_TOKEN_EXPIRED = 6180 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_INVALID_PEM = 6181 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_REFRESH_TOKEN = 6182 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_WRITE_TOKEN = 6183 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_DPOP_HEADER = 6184 , AWS_AUTH_CREDENTIALS_PROVIDER_LOGIN_FAILED_TO_CREATE_REQUEST_BODY = 6185 , AWS_AUTH_ERROR_END_RANGE = 7167 , } # [repr (u32)] # [non_exhaustive] # [doc = " Auth-specific logging subjects"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_auth_log_subject { AWS_LS_AUTH_GENERAL = 6144 , AWS_LS_AUTH_PROFILE = 6145 , AWS_LS_AUTH_CREDENTIALS_PROVIDER = 6146 , AWS_LS_AUTH_SIGNING = 6147 , AWS_LS_IMDS_CLIENT = 6148 , AWS_LS_AUTH_LAST = 7167 , } unsafe extern "C" { # [doc = " Initializes internal datastructures used by aws-c-auth.\n Must be called before using any functionality in aws-c-auth.\n\n @param allocator memory allocator to use for any module-level memory allocation"] pub fn aws_auth_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Clean up internal datastructures used by aws-c-auth.\n Must not be called until application is done using functionality in aws-c-auth."] pub fn aws_auth_library_clean_up () ; } pub type aws_simple_completion_callback = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: libc :: c_void) > ; # [doc = " Configuration for a callback to invoke when something has been completely\n cleaned up.  Primarily used in async cleanup control flows."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_shutdown_callback_options { # [doc = " Function to invoke when the associated object is fully destroyed."] pub shutdown_callback_fn : aws_simple_completion_callback , # [doc = " User data to invoke the shutdown callback with."] pub shutdown_callback_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_shutdown_callback_options"] [:: std :: mem :: size_of :: < aws_shutdown_callback_options > () - 16usize] ; ["Alignment of aws_shutdown_callback_options"] [:: std :: mem :: align_of :: < aws_shutdown_callback_options > () - 8usize] ; ["Offset of field: aws_shutdown_callback_options::shutdown_callback_fn"] [:: std :: mem :: offset_of ! (aws_shutdown_callback_options , shutdown_callback_fn) - 0usize] ; ["Offset of field: aws_shutdown_callback_options::shutdown_callback_user_data"] [:: std :: mem :: offset_of ! (aws_shutdown_callback_options , shutdown_callback_user_data) - 8usize] ; } ; 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 () } } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_ref_count { pub ref_count : aws_atomic_var , pub object : * mut :: libc :: c_void , pub on_zero_fn : aws_simple_completion_callback , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_ref_count"] [:: std :: mem :: size_of :: < aws_ref_count > () - 24usize] ; ["Alignment of aws_ref_count"] [:: std :: mem :: align_of :: < aws_ref_count > () - 8usize] ; ["Offset of field: aws_ref_count::ref_count"] [:: std :: mem :: offset_of ! (aws_ref_count , ref_count) - 0usize] ; ["Offset of field: aws_ref_count::object"] [:: std :: mem :: offset_of ! (aws_ref_count , object) - 8usize] ; ["Offset of field: aws_ref_count::on_zero_fn"] [:: std :: mem :: offset_of ! (aws_ref_count , on_zero_fn) - 16usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Initializes a ref-counter structure.  After initialization, the ref count will be 1.\n\n @param ref_count ref-counter to initialize\n @param object object being ref counted\n @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 :: libc :: c_void , on_zero_fn : aws_simple_completion_callback) ; } unsafe extern "C" { # [doc = " Increments a ref-counter's ref count\n\n @param ref_count ref-counter to increment the count for\n @return the object being ref-counted"] pub fn aws_ref_count_acquire (ref_count : * mut aws_ref_count) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " Decrements a ref-counter's ref count.  Invokes the on_zero callback if the ref count drops to zero\n @param ref_count ref-counter to decrement the count for\n @return the value of the decremented ref count"] pub fn aws_ref_count_release (ref_count : * mut aws_ref_count) -> usize ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_errors { AWS_ERROR_HTTP_UNKNOWN = 2048 , AWS_ERROR_HTTP_HEADER_NOT_FOUND = 2049 , AWS_ERROR_HTTP_INVALID_HEADER_FIELD = 2050 , AWS_ERROR_HTTP_INVALID_HEADER_NAME = 2051 , AWS_ERROR_HTTP_INVALID_HEADER_VALUE = 2052 , AWS_ERROR_HTTP_INVALID_METHOD = 2053 , AWS_ERROR_HTTP_INVALID_PATH = 2054 , AWS_ERROR_HTTP_INVALID_STATUS_CODE = 2055 , AWS_ERROR_HTTP_MISSING_BODY_STREAM = 2056 , AWS_ERROR_HTTP_INVALID_BODY_STREAM = 2057 , AWS_ERROR_HTTP_CONNECTION_CLOSED = 2058 , AWS_ERROR_HTTP_SWITCHED_PROTOCOLS = 2059 , AWS_ERROR_HTTP_UNSUPPORTED_PROTOCOL = 2060 , AWS_ERROR_HTTP_REACTION_REQUIRED = 2061 , AWS_ERROR_HTTP_DATA_NOT_AVAILABLE = 2062 , AWS_ERROR_HTTP_OUTGOING_STREAM_LENGTH_INCORRECT = 2063 , AWS_ERROR_HTTP_CALLBACK_FAILURE = 2064 , AWS_ERROR_HTTP_WEBSOCKET_UPGRADE_FAILURE = 2065 , AWS_ERROR_HTTP_WEBSOCKET_CLOSE_FRAME_SENT = 2066 , AWS_ERROR_HTTP_WEBSOCKET_IS_MIDCHANNEL_HANDLER = 2067 , AWS_ERROR_HTTP_CONNECTION_MANAGER_INVALID_STATE_FOR_ACQUIRE = 2068 , AWS_ERROR_HTTP_CONNECTION_MANAGER_VENDED_CONNECTION_UNDERFLOW = 2069 , AWS_ERROR_HTTP_SERVER_CLOSED = 2070 , AWS_ERROR_HTTP_PROXY_CONNECT_FAILED = 2071 , AWS_ERROR_HTTP_CONNECTION_MANAGER_SHUTTING_DOWN = 2072 , AWS_ERROR_HTTP_CHANNEL_THROUGHPUT_FAILURE = 2073 , AWS_ERROR_HTTP_PROTOCOL_ERROR = 2074 , AWS_ERROR_HTTP_STREAM_IDS_EXHAUSTED = 2075 , AWS_ERROR_HTTP_GOAWAY_RECEIVED = 2076 , AWS_ERROR_HTTP_RST_STREAM_RECEIVED = 2077 , AWS_ERROR_HTTP_RST_STREAM_SENT = 2078 , AWS_ERROR_HTTP_STREAM_NOT_ACTIVATED = 2079 , AWS_ERROR_HTTP_STREAM_HAS_COMPLETED = 2080 , AWS_ERROR_HTTP_PROXY_STRATEGY_NTLM_CHALLENGE_TOKEN_MISSING = 2081 , AWS_ERROR_HTTP_PROXY_STRATEGY_TOKEN_RETRIEVAL_FAILURE = 2082 , AWS_ERROR_HTTP_PROXY_CONNECT_FAILED_RETRYABLE = 2083 , AWS_ERROR_HTTP_PROTOCOL_SWITCH_FAILURE = 2084 , AWS_ERROR_HTTP_MAX_CONCURRENT_STREAMS_EXCEEDED = 2085 , AWS_ERROR_HTTP_STREAM_MANAGER_SHUTTING_DOWN = 2086 , AWS_ERROR_HTTP_STREAM_MANAGER_CONNECTION_ACQUIRE_FAILURE = 2087 , AWS_ERROR_HTTP_STREAM_MANAGER_UNEXPECTED_HTTP_VERSION = 2088 , AWS_ERROR_HTTP_WEBSOCKET_PROTOCOL_ERROR = 2089 , AWS_ERROR_HTTP_MANUAL_WRITE_NOT_ENABLED = 2090 , AWS_ERROR_HTTP_MANUAL_WRITE_HAS_COMPLETED = 2091 , AWS_ERROR_HTTP_RESPONSE_FIRST_BYTE_TIMEOUT = 2092 , AWS_ERROR_HTTP_CONNECTION_MANAGER_ACQUISITION_TIMEOUT = 2093 , AWS_ERROR_HTTP_CONNECTION_MANAGER_MAX_PENDING_ACQUISITIONS_EXCEEDED = 2094 , AWS_ERROR_HTTP_END_RANGE = 3071 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http2_error_code { AWS_HTTP2_ERR_NO_ERROR = 0 , AWS_HTTP2_ERR_PROTOCOL_ERROR = 1 , AWS_HTTP2_ERR_INTERNAL_ERROR = 2 , AWS_HTTP2_ERR_FLOW_CONTROL_ERROR = 3 , AWS_HTTP2_ERR_SETTINGS_TIMEOUT = 4 , AWS_HTTP2_ERR_STREAM_CLOSED = 5 , AWS_HTTP2_ERR_FRAME_SIZE_ERROR = 6 , AWS_HTTP2_ERR_REFUSED_STREAM = 7 , AWS_HTTP2_ERR_CANCEL = 8 , AWS_HTTP2_ERR_COMPRESSION_ERROR = 9 , AWS_HTTP2_ERR_CONNECT_ERROR = 10 , AWS_HTTP2_ERR_ENHANCE_YOUR_CALM = 11 , AWS_HTTP2_ERR_INADEQUATE_SECURITY = 12 , AWS_HTTP2_ERR_HTTP_1_1_REQUIRED = 13 , AWS_HTTP2_ERR_COUNT = 14 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_log_subject { AWS_LS_HTTP_GENERAL = 2048 , AWS_LS_HTTP_CONNECTION = 2049 , AWS_LS_HTTP_ENCODER = 2050 , AWS_LS_HTTP_DECODER = 2051 , AWS_LS_HTTP_SERVER = 2052 , AWS_LS_HTTP_STREAM = 2053 , AWS_LS_HTTP_CONNECTION_MANAGER = 2054 , AWS_LS_HTTP_STREAM_MANAGER = 2055 , AWS_LS_HTTP_WEBSOCKET = 2056 , AWS_LS_HTTP_WEBSOCKET_SETUP = 2057 , AWS_LS_HTTP_PROXY_NEGOTIATION = 2058 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_version { AWS_HTTP_VERSION_UNKNOWN = 0 , AWS_HTTP_VERSION_1_0 = 1 , AWS_HTTP_VERSION_1_1 = 2 , AWS_HTTP_VERSION_2 = 3 , AWS_HTTP_VERSION_COUNT = 4 , } unsafe extern "C" { # [doc = " Initializes internal datastructures used by aws-c-http.\n Must be called before using any functionality in aws-c-http."] pub fn aws_http_library_init (alloc : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Clean up internal datastructures used by aws-c-http.\n Must not be called until application is done using functionality in aws-c-http."] pub fn aws_http_library_clean_up () ; } unsafe extern "C" { pub fn aws_http_error_code_is_retryable (error_code : :: libc :: c_int) -> bool ; } unsafe extern "C" { # [doc = " Returns the description of common status codes.\n Ex: 404 -> \"Not Found\"\n An empty string is returned if the status code is not recognized."] pub fn aws_http_status_text (status_code : :: libc :: c_int) -> * const :: libc :: c_char ; } unsafe extern "C" { # [doc = " Shortcuts for common HTTP request methods"] pub static aws_http_method_get : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_head : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_post : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_put : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_delete : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_connect : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_method_options : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_method : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_scheme : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_authority : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_path : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_header_status : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_scheme_http : aws_byte_cursor ; } unsafe extern "C" { pub static aws_http_scheme_https : aws_byte_cursor ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_impl { _unused : [u8 ; 0] , } # [doc = " Completion callback for aws_future<T>"] pub type aws_future_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; pub type aws_future_impl_result_clean_up_fn = :: std :: option :: Option < unsafe extern "C" fn (result_addr : * mut :: libc :: c_void) > ; pub type aws_future_impl_result_destroy_fn = :: std :: option :: Option < unsafe extern "C" fn (result : * mut :: libc :: c_void) > ; pub type aws_future_impl_result_release_fn = :: std :: option :: Option < unsafe extern "C" fn (result : * mut :: libc :: c_void) -> * mut :: libc :: c_void > ; unsafe extern "C" { pub fn aws_future_impl_new_by_value (alloc : * mut aws_allocator , sizeof_result : usize) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_new_by_value_with_clean_up (alloc : * mut aws_allocator , sizeof_result : usize , result_clean_up : aws_future_impl_result_clean_up_fn) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_new_pointer (alloc : * mut aws_allocator) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_new_pointer_with_destroy (alloc : * mut aws_allocator , result_destroy : aws_future_impl_result_destroy_fn) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_new_pointer_with_release (alloc : * mut aws_allocator , result_release : aws_future_impl_result_release_fn) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_release (promise : * mut aws_future_impl) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_acquire (promise : * mut aws_future_impl) -> * mut aws_future_impl ; } unsafe extern "C" { pub fn aws_future_impl_set_error (promise : * mut aws_future_impl , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_future_impl_set_result_by_move (promise : * mut aws_future_impl , src_address : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_impl_is_done (future : * const aws_future_impl) -> bool ; } unsafe extern "C" { pub fn aws_future_impl_register_callback (future : * mut aws_future_impl , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_impl_register_callback_if_not_done (future : * mut aws_future_impl , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { pub fn aws_future_impl_register_event_loop_callback (future : * mut aws_future_impl , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_impl_register_channel_callback (future : * mut aws_future_impl , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_impl_wait (future : * const aws_future_impl , timeout_ns : u64) -> bool ; } unsafe extern "C" { pub fn aws_future_impl_get_error (future : * const aws_future_impl) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_future_impl_get_result_address (future : * const aws_future_impl) -> * mut :: libc :: c_void ; } unsafe extern "C" { pub fn aws_future_impl_get_result_by_move (future : * mut aws_future_impl , dst_address : * mut :: libc :: c_void) ; } # [doc = " aws_future<size_t>\n See top of future.h for docs."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_size { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_new (alloc : * mut aws_allocator) -> * mut aws_future_size ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_set_result (future : * mut aws_future_size , result : usize) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_get_result (future : * const aws_future_size) -> usize ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_acquire (future : * mut aws_future_size) -> * mut aws_future_size ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_release (future : * mut aws_future_size) -> * mut aws_future_size ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_set_error (future : * mut aws_future_size , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_is_done (future : * const aws_future_size) -> bool ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_get_error (future : * const aws_future_size) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_register_callback (future : * mut aws_future_size , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_register_callback_if_not_done (future : * mut aws_future_size , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_register_event_loop_callback (future : * mut aws_future_size , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_register_channel_callback (future : * mut aws_future_size , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<size_t>\n See top of future.h for docs."] pub fn aws_future_size_wait (future : * mut aws_future_size , timeout_ns : u64) -> bool ; } # [doc = " aws_future<bool>\n See top of future.h for docs."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_bool { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_new (alloc : * mut aws_allocator) -> * mut aws_future_bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_set_result (future : * mut aws_future_bool , result : bool) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_get_result (future : * const aws_future_bool) -> bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_acquire (future : * mut aws_future_bool) -> * mut aws_future_bool ; } unsafe extern "C" { # [doc = " `aws_future<bool>`\n See top of future.h for docs."] pub fn aws_future_bool_release (future : * mut aws_future_bool) -> * mut aws_future_bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_set_error (future : * mut aws_future_bool , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_is_done (future : * const aws_future_bool) -> bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_get_error (future : * const aws_future_bool) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_register_callback (future : * mut aws_future_bool , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_register_callback_if_not_done (future : * mut aws_future_bool , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_register_event_loop_callback (future : * mut aws_future_bool , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_register_channel_callback (future : * mut aws_future_bool , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<bool>\n See top of future.h for docs."] pub fn aws_future_bool_wait (future : * mut aws_future_bool , timeout_ns : u64) -> bool ; } # [doc = " aws_future<void>\n See top of future.h for docs."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_void { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<void>\n See top of future.h for docs."] pub fn aws_future_void_new (alloc : * mut aws_allocator) -> * mut aws_future_void ; } unsafe extern "C" { pub fn aws_future_void_set_result (future : * mut aws_future_void) ; } unsafe extern "C" { pub fn aws_future_void_acquire (future : * mut aws_future_void) -> * mut aws_future_void ; } unsafe extern "C" { pub fn aws_future_void_release (future : * mut aws_future_void) -> * mut aws_future_void ; } unsafe extern "C" { pub fn aws_future_void_set_error (future : * mut aws_future_void , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_future_void_is_done (future : * const aws_future_void) -> bool ; } unsafe extern "C" { pub fn aws_future_void_get_error (future : * const aws_future_void) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_future_void_register_callback (future : * mut aws_future_void , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_void_register_callback_if_not_done (future : * mut aws_future_void , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { pub fn aws_future_void_register_event_loop_callback (future : * mut aws_future_void , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_void_register_channel_callback (future : * mut aws_future_void , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_future_void_wait (future : * mut aws_future_void , timeout_ns : u64) -> bool ; } # [doc = " An HTTP connection.\n This type is used by both server-side and client-side connections.\n This type is also used by all supported versions of HTTP."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_connection { _unused : [u8 ; 0] , } # [doc = " A stream exists for the duration of a request/response exchange.\n A client creates a stream to send a request and receive a response.\n A server creates a stream to receive a request and send a response.\n In http/2, a push-promise stream can be sent by a server and received by a client."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_stream { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [doc = " Controls whether a header's strings may be compressed by encoding the index of\n strings in a cache, rather than encoding the literal string.\n\n This setting has no effect on HTTP/1.x connections.\n On HTTP/2 connections this controls HPACK behavior.\n See RFC-7541 Section 7.1 for security considerations."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_header_compression { # [doc = " Compress header by encoding the cached index of its strings,\n or by updating the cache to contain these strings for future reference.\n Best for headers that are sent repeatedly.\n This is the default setting."] AWS_HTTP_HEADER_COMPRESSION_USE_CACHE = 0 , # [doc = " Encode header strings literally.\n If an intermediary re-broadcasts the headers, it is permitted to use cache.\n Best for unique headers that are unlikely to repeat."] AWS_HTTP_HEADER_COMPRESSION_NO_CACHE = 1 , # [doc = " Encode header strings literally and forbid all intermediaries from using\n cache when re-broadcasting.\n Best for header fields that are highly valuable or sensitive to recovery."] AWS_HTTP_HEADER_COMPRESSION_NO_FORWARD_CACHE = 2 , } # [doc = " A lightweight HTTP header struct.\n Note that the underlying strings are not owned by the byte cursors."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_header { pub name : aws_byte_cursor , pub value : aws_byte_cursor , pub compression : aws_http_header_compression , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_header"] [:: std :: mem :: size_of :: < aws_http_header > () - 40usize] ; ["Alignment of aws_http_header"] [:: std :: mem :: align_of :: < aws_http_header > () - 8usize] ; ["Offset of field: aws_http_header::name"] [:: std :: mem :: offset_of ! (aws_http_header , name) - 0usize] ; ["Offset of field: aws_http_header::value"] [:: std :: mem :: offset_of ! (aws_http_header , value) - 16usize] ; ["Offset of field: aws_http_header::compression"] [:: std :: mem :: offset_of ! (aws_http_header , compression) - 32usize] ; } ; impl Default for aws_http_header { 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 = " A transformable block of HTTP headers.\n Provides a nice API for getting/setting header names and values.\n\n All strings are copied and stored within this datastructure.\n The index of a given header may change any time headers are modified.\n When iterating headers, the following ordering rules apply:\n\n - Headers with the same name will always be in the same order, relative to one another.\n   If \"A: one\" is added before \"A: two\", then \"A: one\" will always precede \"A: two\".\n\n - Headers with different names could be in any order, relative to one another.\n   If \"A: one\" is seen before \"B: bee\" in one iteration, you might see \"B: bee\" before \"A: one\" on the next."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_headers { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [doc = " Header block type.\n INFORMATIONAL: Header block for 1xx informational (interim) responses.\n MAIN: Main header block sent with request or response.\n TRAILING: Headers sent after the body of a request or response."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_header_block { AWS_HTTP_HEADER_BLOCK_MAIN = 0 , AWS_HTTP_HEADER_BLOCK_INFORMATIONAL = 1 , AWS_HTTP_HEADER_BLOCK_TRAILING = 2 , } # [doc = " The definition for an outgoing HTTP request or response.\n The message may be transformed (ex: signing the request) before its data is eventually sent.\n\n The message keeps internal copies of its trivial strings (method, path, headers)\n but does NOT take ownership of its body stream.\n\n A language binding would likely present this as an HttpMessage base class with\n HttpRequest and HttpResponse subclasses."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_message { _unused : [u8 ; 0] , } # [doc = " Function to invoke when a message transformation completes.\n This function MUST be invoked or the application will soft-lock.\n `message` and `complete_ctx` must be the same pointers provided to the `aws_http_message_transform_fn`.\n `error_code` should should be AWS_ERROR_SUCCESS if transformation was successful,\n otherwise pass a different AWS_ERROR_X value."] pub type aws_http_message_transform_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (message : * mut aws_http_message , error_code : :: libc :: c_int , complete_ctx : * mut :: libc :: c_void) > ; # [doc = " A function that may modify a request or response before it is sent.\n The transformation may be asynchronous or immediate.\n The user MUST invoke the `complete_fn` when transformation is complete or the application will soft-lock.\n When invoking the `complete_fn`, pass along the `message` and `complete_ctx` provided here and an error code.\n The error code should be AWS_ERROR_SUCCESS if transformation was successful,\n otherwise pass a different AWS_ERROR_X value."] pub type aws_http_message_transform_fn = :: std :: option :: Option < unsafe extern "C" fn (message : * mut aws_http_message , user_data : * mut :: libc :: c_void , complete_fn : aws_http_message_transform_complete_fn , complete_ctx : * mut :: libc :: c_void) > ; # [doc = " Invoked repeatedly times as headers are received.\n At this point, aws_http_stream_get_incoming_response_status() can be called for the client.\n And aws_http_stream_get_incoming_request_method() and aws_http_stream_get_incoming_request_uri() can be called for\n the server.\n This is always invoked on the HTTP connection's event-loop thread.\n\n Return AWS_OP_SUCCESS to continue processing the stream.\n Return aws_raise_error(E) to indicate failure and cancel the stream.\n The error you raise will be reflected in the error_code passed to the on_complete callback."] pub type aws_http_on_incoming_headers_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , header_block : aws_http_header_block , header_array : * const aws_http_header , num_headers : usize , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked when the incoming header block of this type(informational/main/trailing) has been completely read.\n This is always invoked on the HTTP connection's event-loop thread.\n\n Return AWS_OP_SUCCESS to continue processing the stream.\n Return aws_raise_error(E) to indicate failure and cancel the stream.\n The error you raise will be reflected in the error_code passed to the on_complete callback."] pub type aws_http_on_incoming_header_block_done_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , header_block : aws_http_header_block , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Called repeatedly as body data is received.\n The data must be copied immediately if you wish to preserve it.\n This is always invoked on the HTTP connection's event-loop thread.\n\n Note that, if the connection is using manual_window_management then the window\n size has shrunk by the amount of body data received. If the window size\n reaches 0 no further data will be received. Increment the window size with\n aws_http_stream_update_window().\n\n Return AWS_OP_SUCCESS to continue processing the stream.\n Return aws_raise_error(E) to indicate failure and cancel the stream.\n The error you raise will be reflected in the error_code passed to the on_complete callback."] pub type aws_http_on_incoming_body_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , data : * const aws_byte_cursor , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked when request has been completely read.\n This is always invoked on the HTTP connection's event-loop thread.\n\n Return AWS_OP_SUCCESS to continue processing the stream.\n Return aws_raise_error(E) to indicate failure and cancel the stream.\n The error you raise will be reflected in the error_code passed to the on_complete callback."] pub type aws_http_on_incoming_request_done_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked when a request/response stream is complete, whether successful or unsuccessful\n This is always invoked on the HTTP connection's event-loop thread.\n This will not be invoked if the stream is never activated."] pub type aws_http_on_stream_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when request/response stream destroy completely.\n This can be invoked within the same thead who release the refcount on http stream.\n This is invoked even if the stream is never activated."] pub type aws_http_on_stream_destroy_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " Tracing metrics for aws_http_stream.\n Data maybe not be available if the data of stream was never sent/received before it completes."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_stream_metrics { pub send_start_timestamp_ns : i64 , pub send_end_timestamp_ns : i64 , pub sending_duration_ns : i64 , pub receive_start_timestamp_ns : i64 , pub receive_end_timestamp_ns : i64 , pub receiving_duration_ns : i64 , pub stream_id : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_stream_metrics"] [:: std :: mem :: size_of :: < aws_http_stream_metrics > () - 56usize] ; ["Alignment of aws_http_stream_metrics"] [:: std :: mem :: align_of :: < aws_http_stream_metrics > () - 8usize] ; ["Offset of field: aws_http_stream_metrics::send_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , send_start_timestamp_ns) - 0usize] ; ["Offset of field: aws_http_stream_metrics::send_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , send_end_timestamp_ns) - 8usize] ; ["Offset of field: aws_http_stream_metrics::sending_duration_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , sending_duration_ns) - 16usize] ; ["Offset of field: aws_http_stream_metrics::receive_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , receive_start_timestamp_ns) - 24usize] ; ["Offset of field: aws_http_stream_metrics::receive_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , receive_end_timestamp_ns) - 32usize] ; ["Offset of field: aws_http_stream_metrics::receiving_duration_ns"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , receiving_duration_ns) - 40usize] ; ["Offset of field: aws_http_stream_metrics::stream_id"] [:: std :: mem :: offset_of ! (aws_http_stream_metrics , stream_id) - 48usize] ; } ; # [doc = " Invoked right before request/response stream is complete to report the tracing metrics for aws_http_stream.\n This may be invoked synchronously when aws_http_stream_release() is called.\n This is invoked even if the stream is never activated.\n See `aws_http_stream_metrics` for details."] pub type aws_http_on_stream_metrics_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , metrics : * const aws_http_stream_metrics , user_data : * mut :: libc :: c_void) > ; # [doc = " Options for creating a stream which sends a request from the client and receives a response from the server."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_make_request_options { # [doc = " The sizeof() this struct, used for versioning.\n Required."] pub self_size : usize , # [doc = " Definition for outgoing request.\n Required.\n The request will be kept alive via refcounting until the request completes."] pub request : * mut aws_http_message , pub user_data : * mut :: libc :: c_void , # [doc = " Invoked repeatedly times as headers are received.\n Optional.\n See `aws_http_on_incoming_headers_fn`."] pub on_response_headers : aws_http_on_incoming_headers_fn , # [doc = " Invoked when response header block has been completely read.\n Optional.\n See `aws_http_on_incoming_header_block_done_fn`."] pub on_response_header_block_done : aws_http_on_incoming_header_block_done_fn , # [doc = " Invoked repeatedly as body data is received.\n Optional.\n See `aws_http_on_incoming_body_fn`."] pub on_response_body : aws_http_on_incoming_body_fn , # [doc = " Invoked right before stream is complete, whether successful or unsuccessful\n Optional.\n See `aws_http_on_stream_metrics_fn`"] pub on_metrics : aws_http_on_stream_metrics_fn , # [doc = " Invoked when request/response stream is complete, whether successful or unsuccessful\n Optional.\n See `aws_http_on_stream_complete_fn`."] pub on_complete : aws_http_on_stream_complete_fn , pub on_destroy : aws_http_on_stream_destroy_fn , # [doc = " When using HTTP/2, request body data will be provided over time. The stream will only be polled for writing\n when data has been supplied via `aws_http2_stream_write_data`"] pub http2_use_manual_data_writes : bool , # [doc = " Optional (ignored if 0).\n After a request is fully sent, if the server does not begin responding within N milliseconds, then fail with\n AWS_ERROR_HTTP_RESPONSE_FIRST_BYTE_TIMEOUT.\n It override the connection level settings, when the request completes, the\n original monitoring options will be applied back to the connection.\n TODO: Only supported in HTTP/1.1 now, support it in HTTP/2"] pub response_first_byte_timeout_ms : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_make_request_options"] [:: std :: mem :: size_of :: < aws_http_make_request_options > () - 88usize] ; ["Alignment of aws_http_make_request_options"] [:: std :: mem :: align_of :: < aws_http_make_request_options > () - 8usize] ; ["Offset of field: aws_http_make_request_options::self_size"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , self_size) - 0usize] ; ["Offset of field: aws_http_make_request_options::request"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , request) - 8usize] ; ["Offset of field: aws_http_make_request_options::user_data"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , user_data) - 16usize] ; ["Offset of field: aws_http_make_request_options::on_response_headers"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_response_headers) - 24usize] ; ["Offset of field: aws_http_make_request_options::on_response_header_block_done"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_response_header_block_done) - 32usize] ; ["Offset of field: aws_http_make_request_options::on_response_body"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_response_body) - 40usize] ; ["Offset of field: aws_http_make_request_options::on_metrics"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_metrics) - 48usize] ; ["Offset of field: aws_http_make_request_options::on_complete"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_complete) - 56usize] ; ["Offset of field: aws_http_make_request_options::on_destroy"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , on_destroy) - 64usize] ; ["Offset of field: aws_http_make_request_options::http2_use_manual_data_writes"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , http2_use_manual_data_writes) - 72usize] ; ["Offset of field: aws_http_make_request_options::response_first_byte_timeout_ms"] [:: std :: mem :: offset_of ! (aws_http_make_request_options , response_first_byte_timeout_ms) - 80usize] ; } ; impl Default for aws_http_make_request_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)] pub struct aws_http_request_handler_options { pub self_size : usize , # [doc = " Required."] pub server_connection : * mut aws_http_connection , # [doc = " user_data passed to callbacks.\n Optional."] pub user_data : * mut :: libc :: c_void , # [doc = " Invoked repeatedly times as headers are received.\n Optional.\n See `aws_http_on_incoming_headers_fn`."] pub on_request_headers : aws_http_on_incoming_headers_fn , # [doc = " Invoked when the request header block has been completely read.\n Optional.\n See `aws_http_on_incoming_header_block_done_fn`."] pub on_request_header_block_done : aws_http_on_incoming_header_block_done_fn , # [doc = " Invoked as body data is received.\n Optional.\n See `aws_http_on_incoming_body_fn`."] pub on_request_body : aws_http_on_incoming_body_fn , # [doc = " Invoked when request has been completely read.\n Optional.\n See `aws_http_on_incoming_request_done_fn`."] pub on_request_done : aws_http_on_incoming_request_done_fn , # [doc = " Invoked when request/response stream is complete, whether successful or unsuccessful\n Optional.\n See `aws_http_on_stream_complete_fn`."] pub on_complete : aws_http_on_stream_complete_fn , pub on_destroy : aws_http_on_stream_destroy_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_request_handler_options"] [:: std :: mem :: size_of :: < aws_http_request_handler_options > () - 72usize] ; ["Alignment of aws_http_request_handler_options"] [:: std :: mem :: align_of :: < aws_http_request_handler_options > () - 8usize] ; ["Offset of field: aws_http_request_handler_options::self_size"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , self_size) - 0usize] ; ["Offset of field: aws_http_request_handler_options::server_connection"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , server_connection) - 8usize] ; ["Offset of field: aws_http_request_handler_options::user_data"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , user_data) - 16usize] ; ["Offset of field: aws_http_request_handler_options::on_request_headers"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_request_headers) - 24usize] ; ["Offset of field: aws_http_request_handler_options::on_request_header_block_done"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_request_header_block_done) - 32usize] ; ["Offset of field: aws_http_request_handler_options::on_request_body"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_request_body) - 40usize] ; ["Offset of field: aws_http_request_handler_options::on_request_done"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_request_done) - 48usize] ; ["Offset of field: aws_http_request_handler_options::on_complete"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_complete) - 56usize] ; ["Offset of field: aws_http_request_handler_options::on_destroy"] [:: std :: mem :: offset_of ! (aws_http_request_handler_options , on_destroy) - 64usize] ; } ; impl Default for aws_http_request_handler_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 () } } } # [doc = " Invoked when the data stream of an outgoing HTTP write operation is no longer in use.\n This is always invoked on the HTTP connection's event-loop thread.\n\n @param stream        HTTP-stream this write operation was submitted to.\n @param error_code    If error_code is AWS_ERROR_SUCCESS (0), the data was successfully sent.\n                      Any other error_code indicates that the HTTP-stream is in the process of terminating.\n                      If the error_code is AWS_ERROR_HTTP_STREAM_HAS_COMPLETED,\n                      the stream's termination has nothing to do with this write operation.\n                      Any other non-zero error code indicates a problem with this particular write\n                      operation's data.\n @param user_data     User data for this write operation."] pub type aws_http_stream_write_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_http_stream , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when the data of an outgoing HTTP/1.1 chunk is no longer in use.\n This is always invoked on the HTTP connection's event-loop thread.\n\n @param stream        HTTP-stream this chunk was submitted to.\n @param error_code    If error_code is AWS_ERROR_SUCCESS (0), the data was successfully sent.\n                      Any other error_code indicates that the HTTP-stream is in the process of terminating.\n                      If the error_code is AWS_ERROR_HTTP_STREAM_HAS_COMPLETED,\n                      the stream's termination has nothing to do with this chunk.\n                      Any other non-zero error code indicates a problem with this particular chunk's data.\n @param user_data     User data for this chunk."] pub type aws_http1_stream_write_chunk_complete_fn = aws_http_stream_write_complete_fn ; # [doc = " HTTP/1.1 chunk extension for chunked encoding.\n Note that the underlying strings are not owned by the byte cursors."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http1_chunk_extension { pub key : aws_byte_cursor , pub value : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http1_chunk_extension"] [:: std :: mem :: size_of :: < aws_http1_chunk_extension > () - 32usize] ; ["Alignment of aws_http1_chunk_extension"] [:: std :: mem :: align_of :: < aws_http1_chunk_extension > () - 8usize] ; ["Offset of field: aws_http1_chunk_extension::key"] [:: std :: mem :: offset_of ! (aws_http1_chunk_extension , key) - 0usize] ; ["Offset of field: aws_http1_chunk_extension::value"] [:: std :: mem :: offset_of ! (aws_http1_chunk_extension , value) - 16usize] ; } ; impl Default for aws_http1_chunk_extension { 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 = " Encoding options for an HTTP/1.1 chunked transfer encoding chunk."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http1_chunk_options { pub chunk_data : * mut aws_input_stream , pub chunk_data_size : u64 , # [doc = " A pointer to an array of chunked extensions.\n The num_extensions must match the length of the array.\n This data is deep-copied by aws_http1_stream_write_chunk(),\n it does not need to remain valid until on_complete is invoked."] pub extensions : * mut aws_http1_chunk_extension , # [doc = " The number of elements defined in the extensions array."] pub num_extensions : usize , # [doc = " Invoked when the chunk data is no longer in use, whether or not it was successfully sent.\n Optional.\n See `aws_http1_stream_write_chunk_complete_fn`."] pub on_complete : aws_http1_stream_write_chunk_complete_fn , # [doc = " User provided data passed to the on_complete callback on its invocation."] pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http1_chunk_options"] [:: std :: mem :: size_of :: < aws_http1_chunk_options > () - 48usize] ; ["Alignment of aws_http1_chunk_options"] [:: std :: mem :: align_of :: < aws_http1_chunk_options > () - 8usize] ; ["Offset of field: aws_http1_chunk_options::chunk_data"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , chunk_data) - 0usize] ; ["Offset of field: aws_http1_chunk_options::chunk_data_size"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , chunk_data_size) - 8usize] ; ["Offset of field: aws_http1_chunk_options::extensions"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , extensions) - 16usize] ; ["Offset of field: aws_http1_chunk_options::num_extensions"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , num_extensions) - 24usize] ; ["Offset of field: aws_http1_chunk_options::on_complete"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , on_complete) - 32usize] ; ["Offset of field: aws_http1_chunk_options::user_data"] [:: std :: mem :: offset_of ! (aws_http1_chunk_options , user_data) - 40usize] ; } ; impl Default for aws_http1_chunk_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 () } } } # [doc = " Invoked when the data of an outgoing HTTP2 data frame is no longer in use.\n This is always invoked on the HTTP connection's event-loop thread.\n\n @param stream        HTTP2-stream this write was submitted to.\n @param error_code    If error_code is AWS_ERROR_SUCCESS (0), the data was successfully sent.\n                      Any other error_code indicates that the HTTP-stream is in the process of terminating.\n                      If the error_code is AWS_ERROR_HTTP_STREAM_HAS_COMPLETED,\n                      the stream's termination has nothing to do with this write.\n                      Any other non-zero error code indicates a problem with this particular write's data.\n @param user_data     User data for this write."] pub type aws_http2_stream_write_data_complete_fn = aws_http_stream_write_complete_fn ; # [doc = " Encoding options for manual H2 data frame writes"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http2_stream_write_data_options { # [doc = " The data to be sent.\n Optional.\n If not set, input stream with length 0 will be used."] pub data : * mut aws_input_stream , # [doc = " Set true when it's the last chunk to be sent.\n After a write with end_stream, no more data write will be accepted."] pub end_stream : bool , # [doc = " Invoked when the data stream is no longer in use, whether or not it was successfully sent.\n Optional.\n See `aws_http2_stream_write_data_complete_fn`."] pub on_complete : aws_http2_stream_write_data_complete_fn , # [doc = " User provided data passed to the on_complete callback on its invocation."] pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http2_stream_write_data_options"] [:: std :: mem :: size_of :: < aws_http2_stream_write_data_options > () - 32usize] ; ["Alignment of aws_http2_stream_write_data_options"] [:: std :: mem :: align_of :: < aws_http2_stream_write_data_options > () - 8usize] ; ["Offset of field: aws_http2_stream_write_data_options::data"] [:: std :: mem :: offset_of ! (aws_http2_stream_write_data_options , data) - 0usize] ; ["Offset of field: aws_http2_stream_write_data_options::end_stream"] [:: std :: mem :: offset_of ! (aws_http2_stream_write_data_options , end_stream) - 8usize] ; ["Offset of field: aws_http2_stream_write_data_options::on_complete"] [:: std :: mem :: offset_of ! (aws_http2_stream_write_data_options , on_complete) - 16usize] ; ["Offset of field: aws_http2_stream_write_data_options::user_data"] [:: std :: mem :: offset_of ! (aws_http2_stream_write_data_options , user_data) - 24usize] ; } ; impl Default for aws_http2_stream_write_data_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 () } } } unsafe extern "C" { # [doc = " Return whether both names are equivalent.\n This is a case-insensitive string comparison.\n\n Example Matches:\n \"Content-Length\" == \"content-length\" // upper or lower case ok\n\n Example Mismatches:\n \"Content-Length\" != \" Content-Length\" // leading whitespace bad"] pub fn aws_http_header_name_eq (name_a : aws_byte_cursor , name_b : aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " Create a new headers object.\n The caller has a hold on the object and must call aws_http_headers_release() when they are done with it."] pub fn aws_http_headers_new (allocator : * mut aws_allocator) -> * mut aws_http_headers ; } unsafe extern "C" { # [doc = " Acquire a hold on the object, preventing it from being deleted until\n aws_http_headers_release() is called by all those with a hold on it."] pub fn aws_http_headers_acquire (headers : * mut aws_http_headers) ; } unsafe extern "C" { # [doc = " Release a hold on the object.\n The object is deleted when all holds on it are released."] pub fn aws_http_headers_release (headers : * mut aws_http_headers) ; } unsafe extern "C" { # [doc = " Add a header.\n The underlying strings are copied."] pub fn aws_http_headers_add_header (headers : * mut aws_http_headers , header : * const aws_http_header) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add a header.\n The underlying strings are copied."] pub fn aws_http_headers_add (headers : * mut aws_http_headers , name : aws_byte_cursor , value : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add an array of headers.\n The underlying strings are copied."] pub fn aws_http_headers_add_array (headers : * mut aws_http_headers , array : * const aws_http_header , count : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set a header value.\n The header is added if necessary and any existing values for this name are removed.\n The underlying strings are copied."] pub fn aws_http_headers_set (headers : * mut aws_http_headers , name : aws_byte_cursor , value : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the total number of headers."] pub fn aws_http_headers_count (headers : * const aws_http_headers) -> usize ; } unsafe extern "C" { # [doc = " Get the header at the specified index.\n The index of a given header may change any time headers are modified.\n When iterating headers, the following ordering rules apply:\n\n - Headers with the same name will always be in the same order, relative to one another.\n   If \"A: one\" is added before \"A: two\", then \"A: one\" will always precede \"A: two\".\n\n - Headers with different names could be in any order, relative to one another.\n   If \"A: one\" is seen before \"B: bee\" in one iteration, you might see \"B: bee\" before \"A: one\" on the next.\n\n AWS_ERROR_INVALID_INDEX is raised if the index is invalid."] pub fn aws_http_headers_get_index (headers : * const aws_http_headers , index : usize , out_header : * mut aws_http_header) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get all values with this name, combined into one new aws_string that you are responsible for destroying.\n If there are multiple headers with this name, their values are appended with comma-separators.\n If there are no headers with this name, NULL is returned and AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised."] pub fn aws_http_headers_get_all (headers : * const aws_http_headers , name : aws_byte_cursor) -> * mut aws_string ; } unsafe extern "C" { # [doc = " Get the first value for this name, ignoring any additional values.\n AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised if the name is not found."] pub fn aws_http_headers_get (headers : * const aws_http_headers , name : aws_byte_cursor , out_value : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Test if header name exists or not in headers"] pub fn aws_http_headers_has (headers : * const aws_http_headers , name : aws_byte_cursor) -> bool ; } unsafe extern "C" { # [doc = " Remove all headers with this name.\n AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised if no headers with this name are found."] pub fn aws_http_headers_erase (headers : * mut aws_http_headers , name : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Remove the first header found with this name and value.\n AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised if no such header is found."] pub fn aws_http_headers_erase_value (headers : * mut aws_http_headers , name : aws_byte_cursor , value : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Remove the header at the specified index.\n\n AWS_ERROR_INVALID_INDEX is raised if the index is invalid."] pub fn aws_http_headers_erase_index (headers : * mut aws_http_headers , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Clear all headers."] pub fn aws_http_headers_clear (headers : * mut aws_http_headers) ; } unsafe extern "C" { # [doc = " Get the `:method` value (HTTP/2 headers only)."] pub fn aws_http2_headers_get_request_method (h2_headers : * const aws_http_headers , out_method : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:method` (HTTP/2 headers only).\n The headers makes its own copy of the underlying string."] pub fn aws_http2_headers_set_request_method (h2_headers : * mut aws_http_headers , method : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http2_headers_get_request_scheme (h2_headers : * const aws_http_headers , out_scheme : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:scheme` (request pseudo headers only).\n The pseudo headers makes its own copy of the underlying string."] pub fn aws_http2_headers_set_request_scheme (h2_headers : * mut aws_http_headers , scheme : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http2_headers_get_request_authority (h2_headers : * const aws_http_headers , out_authority : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:authority` (request pseudo headers only).\n The pseudo headers makes its own copy of the underlying string."] pub fn aws_http2_headers_set_request_authority (h2_headers : * mut aws_http_headers , authority : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http2_headers_get_request_path (h2_headers : * const aws_http_headers , out_path : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:path` (request pseudo headers only).\n The pseudo headers makes its own copy of the underlying string."] pub fn aws_http2_headers_set_request_path (h2_headers : * mut aws_http_headers , path : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get `:status` (response pseudo headers only).\n If no status is set, AWS_ERROR_HTTP_DATA_NOT_AVAILABLE is raised."] pub fn aws_http2_headers_get_response_status (h2_headers : * const aws_http_headers , out_status_code : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set `:status` (response pseudo headers only)."] pub fn aws_http2_headers_set_response_status (h2_headers : * mut aws_http_headers , status_code : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Create a new HTTP/1.1 request message.\n The message is blank, all properties (method, path, etc) must be set individually.\n If HTTP/1.1 message used in HTTP/2 connection, the transformation will be automatically applied.\n A HTTP/2 message will created and sent based on the HTTP/1.1 message.\n\n The caller has a hold on the object and must call aws_http_message_release() when they are done with it."] pub fn aws_http_message_new_request (allocator : * mut aws_allocator) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Like aws_http_message_new_request(), but uses existing aws_http_headers instead of creating a new one.\n Acquires a hold on the headers, and releases it when the request is destroyed."] pub fn aws_http_message_new_request_with_headers (allocator : * mut aws_allocator , existing_headers : * mut aws_http_headers) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Create a new HTTP/1.1 response message.\n The message is blank, all properties (status, headers, etc) must be set individually.\n\n The caller has a hold on the object and must call aws_http_message_release() when they are done with it."] pub fn aws_http_message_new_response (allocator : * mut aws_allocator) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Create a new HTTP/2 request message.\n pseudo headers need to be set from aws_http2_headers_set_request_* to the headers of the aws_http_message.\n Will be errored out if used in HTTP/1.1 connection.\n\n The caller has a hold on the object and must call aws_http_message_release() when they are done with it."] pub fn aws_http2_message_new_request (allocator : * mut aws_allocator) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Create a new HTTP/2 response message.\n pseudo headers need to be set from aws_http2_headers_set_response_status to the headers of the aws_http_message.\n Will be errored out if used in HTTP/1.1 connection.\n\n The caller has a hold on the object and must call aws_http_message_release() when they are done with it."] pub fn aws_http2_message_new_response (allocator : * mut aws_allocator) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Create an HTTP/2 message from HTTP/1.1 message.\n pseudo headers will be created from the context and added to the headers of new message.\n Normal headers will be copied to the headers of new message.\n Note:\n  - if `host` exist, it will be removed and `:authority` will be added using the information.\n  - `:scheme` always defaults to \"https\". To use a different scheme create the HTTP/2 message directly"] pub fn aws_http2_message_new_from_http1 (alloc : * mut aws_allocator , http1_msg : * const aws_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Acquire a hold on the object, preventing it from being deleted until\n aws_http_message_release() is called by all those with a hold on it.\n\n This function returns the passed in message (possibly NULL) so that acquire-and-assign can be done with a single\n statement."] pub fn aws_http_message_acquire (message : * mut aws_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Release a hold on the object.\n The object is deleted when all holds on it are released.\n\n This function always returns NULL so that release-and-assign-NULL can be done with a single statement."] pub fn aws_http_message_release (message : * mut aws_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " Deprecated. This is equivalent to aws_http_message_release()."] pub fn aws_http_message_destroy (message : * mut aws_http_message) ; } unsafe extern "C" { pub fn aws_http_message_is_request (message : * const aws_http_message) -> bool ; } unsafe extern "C" { pub fn aws_http_message_is_response (message : * const aws_http_message) -> bool ; } unsafe extern "C" { # [doc = " Get the protocol version of the http message."] pub fn aws_http_message_get_protocol_version (message : * const aws_http_message) -> aws_http_version ; } unsafe extern "C" { # [doc = " Get the method (request messages only)."] pub fn aws_http_message_get_request_method (request_message : * const aws_http_message , out_method : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set the method (request messages only).\n The request makes its own copy of the underlying string."] pub fn aws_http_message_set_request_method (request_message : * mut aws_http_message , method : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http_message_get_request_path (request_message : * const aws_http_message , out_path : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set the path-and-query value (request messages only).\n The request makes its own copy of the underlying string."] pub fn aws_http_message_set_request_path (request_message : * mut aws_http_message , path : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the status code (response messages only).\n If no status is set, AWS_ERROR_HTTP_DATA_NOT_AVAILABLE is raised."] pub fn aws_http_message_get_response_status (response_message : * const aws_http_message , out_status_code : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set the status code (response messages only)."] pub fn aws_http_message_set_response_status (response_message : * mut aws_http_message , status_code : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the body stream.\n Returns NULL if no body stream is set."] pub fn aws_http_message_get_body_stream (message : * const aws_http_message) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Set the body stream.\n NULL is an acceptable value for messages with no body.\n Note: The message does NOT take ownership of the body stream.\n The stream must not be destroyed until the message is complete."] pub fn aws_http_message_set_body_stream (message : * mut aws_http_message , body_stream : * mut aws_input_stream) ; } # [doc = " aws_future<aws_http_message*>"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_http_message { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_new (alloc : * mut aws_allocator) -> * mut aws_future_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_set_result_by_move (future : * mut aws_future_http_message , pointer_address : * mut * mut aws_http_message) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_get_result_by_move (future : * mut aws_future_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_peek_result (future : * const aws_future_http_message) -> * mut aws_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_acquire (future : * mut aws_future_http_message) -> * mut aws_future_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_release (future : * mut aws_future_http_message) -> * mut aws_future_http_message ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_set_error (future : * mut aws_future_http_message , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_is_done (future : * const aws_future_http_message) -> bool ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_get_error (future : * const aws_future_http_message) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_register_callback (future : * mut aws_future_http_message , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_register_callback_if_not_done (future : * mut aws_future_http_message , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_register_event_loop_callback (future : * mut aws_future_http_message , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_register_channel_callback (future : * mut aws_future_http_message , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_http_message*>"] pub fn aws_future_http_message_wait (future : * mut aws_future_http_message , timeout_ns : u64) -> bool ; } unsafe extern "C" { # [doc = " Submit a chunk of data to be sent on an HTTP/1.1 stream.\n The stream must have specified \"chunked\" in a \"transfer-encoding\" header,\n and the aws_http_message must NOT have any body stream set.\n For client streams, activate() must be called before any chunks are submitted.\n For server streams, the response must be submitted before any chunks.\n A final chunk with size 0 must be submitted to successfully complete the HTTP-stream.\n\n Returns AWS_OP_SUCCESS if the chunk has been submitted. The chunk's completion\n callback will be invoked when the HTTP-stream is done with the chunk data,\n whether or not it was successfully sent (see `aws_http1_stream_write_chunk_complete_fn`).\n The chunk data must remain valid until the completion callback is invoked.\n\n Returns AWS_OP_ERR and raises an error if the chunk could not be submitted.\n In this case, the chunk's completion callback will never be invoked.\n Note that it is always possible for the HTTP-stream to terminate unexpectedly\n prior to this call being made, in which case the error raised is\n AWS_ERROR_HTTP_STREAM_HAS_COMPLETED."] pub fn aws_http1_stream_write_chunk (http1_stream : * mut aws_http_stream , options : * const aws_http1_chunk_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " The stream must have specified `http2_use_manual_data_writes` during request creation.\n For client streams, activate() must be called before any frames are submitted.\n For server streams, the response headers must be submitted before any frames.\n A write with options that has end_stream set to be true will end the stream and prevent any further write.\n\n @return AWS_OP_SUCCESS if the write was queued\n         AWS_OP_ERROR indicating the attempt raised an error code.\n              AWS_ERROR_INVALID_STATE will be raised for invalid usage.\n              AWS_ERROR_HTTP_STREAM_HAS_COMPLETED will be raised if the stream ended for reasons behind the scenes.\n\n Typical usage will be something like:\n options.http2_use_manual_data_writes = true;\n stream = aws_http_connection_make_request(connection, &options);\n aws_http_stream_activate(stream);\n ...\n struct aws_http2_stream_write_data_options write;\n aws_http2_stream_write_data(stream, &write);\n ...\n struct aws_http2_stream_write_data_options last_write;\n last_write.end_stream = true;\n aws_http2_stream_write_data(stream, &write);\n ...\n aws_http_stream_release(stream);"] pub fn aws_http2_stream_write_data (http2_stream : * mut aws_http_stream , options : * const aws_http2_stream_write_data_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add a list of headers to be added as trailing headers sent after the last chunk is sent.\n a \"Trailer\" header field which indicates the fields present in the trailer.\n\n Certain headers are forbidden in the trailer (e.g., Transfer-Encoding, Content-Length, Host). See RFC-7541\n Section 4.1.2 for more details.\n\n For client streams, activate() must be called before any chunks are submitted.\n\n For server streams, the response must be submitted before the trailer can be added\n\n aws_http1_stream_add_chunked_trailer must be called before the final size 0 chunk, and at the moment can only\n be called once, though this could change if need be.\n\n Returns AWS_OP_SUCCESS if the chunk has been submitted."] pub fn aws_http1_stream_add_chunked_trailer (http1_stream : * mut aws_http_stream , trailing_headers : * const aws_http_headers) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " This datastructure has more functions for inspecting and modifying headers than\n are available on the aws_http_message datastructure."] pub fn aws_http_message_get_headers (message : * const aws_http_message) -> * mut aws_http_headers ; } unsafe extern "C" { # [doc = " Get the message's const aws_http_headers."] pub fn aws_http_message_get_const_headers (message : * const aws_http_message) -> * const aws_http_headers ; } unsafe extern "C" { # [doc = " Get the number of headers."] pub fn aws_http_message_get_header_count (message : * const aws_http_message) -> usize ; } unsafe extern "C" { # [doc = " Get the header at the specified index.\n This function cannot fail if a valid index is provided.\n Otherwise, AWS_ERROR_INVALID_INDEX will be raised.\n\n The underlying strings are stored within the message."] pub fn aws_http_message_get_header (message : * const aws_http_message , out_header : * mut aws_http_header , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add a header to the end of the array.\n The message makes its own copy of the underlying strings."] pub fn aws_http_message_add_header (message : * mut aws_http_message , header : aws_http_header) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Add an array of headers to the end of the header array.\n The message makes its own copy of the underlying strings.\n\n This is a helper function useful when it's easier to define headers as a stack array, rather than calling add_header\n repeatedly."] pub fn aws_http_message_add_header_array (message : * mut aws_http_message , headers : * const aws_http_header , num_headers : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Remove the header at the specified index.\n Headers after this index are all shifted back one position.\n\n This function cannot fail if a valid index is provided.\n Otherwise, AWS_ERROR_INVALID_INDEX will be raised."] pub fn aws_http_message_erase_header (message : * mut aws_http_message , index : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Create a stream, with a client connection sending a request.\n The request does not start sending automatically once the stream is created. You must call\n aws_http_stream_activate to begin execution of the request.\n\n The `options` are copied during this call.\n\n Tip for language bindings: Do not bind the `options` struct. Use something more natural for your language,\n such as Builder Pattern in Java, or Python's ability to take many optional arguments by name.\n\n Note: The header of the request will be sent as it is when the message to send protocol matches the protocol of the\n connection.\n  - No `user-agent` will be added.\n  - No security check will be enforced. eg: `referer` header privacy should be enforced by the user-agent who adds the\n      header\n  - When HTTP/1 message sent on HTTP/2 connection, `aws_http2_message_new_from_http1` will be applied under the hood.\n  - When HTTP/2 message sent on HTTP/1 connection, no change will be made."] pub fn aws_http_connection_make_request (client_connection : * mut aws_http_connection , options : * const aws_http_make_request_options) -> * mut aws_http_stream ; } unsafe extern "C" { # [doc = " Create a stream, with a server connection receiving and responding to a request.\n This function can only be called from the `aws_http_on_incoming_request_fn` callback.\n aws_http_stream_send_response() should be used to send a response."] pub fn aws_http_stream_new_server_request_handler (options : * const aws_http_request_handler_options) -> * mut aws_http_stream ; } unsafe extern "C" { # [doc = " Acquire refcount on the stream to prevent it from being cleaned up until it is released."] pub fn aws_http_stream_acquire (stream : * mut aws_http_stream) -> * mut aws_http_stream ; } unsafe extern "C" { # [doc = " Users must release the stream when they are done with it, or its memory will never be cleaned up.\n This will not cancel the stream, its callbacks will still fire if the stream is still in progress.\n\n Tips for language bindings:\n - Invoke this from the wrapper class's finalizer/destructor.\n - Do not let the wrapper class be destroyed until on_complete() has fired."] pub fn aws_http_stream_release (stream : * mut aws_http_stream) ; } unsafe extern "C" { # [doc = " Only used for client initiated streams (immediately following a call to aws_http_connection_make_request).\n\n Activates the request's outgoing stream processing."] pub fn aws_http_stream_activate (stream : * mut aws_http_stream) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http_stream_get_connection (stream : * const aws_http_stream) -> * mut aws_http_connection ; } unsafe extern "C" { pub fn aws_http_stream_get_incoming_response_status (stream : * const aws_http_stream , out_status : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http_stream_get_incoming_request_method (stream : * const aws_http_stream , out_method : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_http_stream_get_incoming_request_uri (stream : * const aws_http_stream , out_uri : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Send response (only callable from \"request handler\" streams)\n The response object must stay alive at least until the stream's on_complete is called."] pub fn aws_http_stream_send_response (stream : * mut aws_http_stream , response : * mut aws_http_message) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Increment the stream's flow-control window to keep data flowing.\n\n If the connection was created with `manual_window_management` set true,\n the flow-control window of each stream will shrink as body data is received\n (headers, padding, and other metadata do not affect the window).\n The connection's `initial_window_size` determines the starting size of each stream's window.\n If a stream's flow-control window reaches 0, no further data will be received.\n\n If `manual_window_management` is false, this call will have no effect.\n The connection maintains its flow-control windows such that\n no back-pressure is applied and data arrives as fast as possible.\n\n For HTTP/2, the client control exactly when the WINDOW_UPDATE frame sent.\n And client will make sure the WINDOW_UPDATE frame to be valid.\n Check `stream_window_size_threshold_to_send_update` for details."] pub fn aws_http_stream_update_window (stream : * mut aws_http_stream , increment_size : usize) ; } unsafe extern "C" { # [doc = " Gets the HTTP/2 id associated with a stream.  Even h1 streams have an id (using the same allocation procedure\n as http/2) for easier tracking purposes. For client streams, this will only be non-zero after a successful call\n to aws_http_stream_activate()"] pub fn aws_http_stream_get_id (stream : * const aws_http_stream) -> u32 ; } unsafe extern "C" { # [doc = " Cancel the stream in flight.\n For HTTP/1.1 streams, it's equivalent to closing the connection.\n For HTTP/2 streams, it's equivalent to calling reset on the stream with `AWS_HTTP2_ERR_CANCEL`.\n\n the stream will complete with the error code provided, unless the stream is\n already completing for other reasons, or the stream is not activated,\n in which case this call will have no impact."] pub fn aws_http_stream_cancel (stream : * mut aws_http_stream , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " Reset the HTTP/2 stream (HTTP/2 only).\n Note that if the stream closes before this async call is fully processed, the RST_STREAM frame will not be sent.\n\n @param http2_stream HTTP/2 stream.\n @param http2_error aws_http2_error_code. Reason to reset the stream."] pub fn aws_http2_stream_reset (http2_stream : * mut aws_http_stream , http2_error : u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the error code received in rst_stream.\n Only valid if the stream has completed, and an RST_STREAM frame has received.\n\n @param http2_stream HTTP/2 stream.\n @param out_http2_error Gets to set to HTTP/2 error code received in rst_stream."] pub fn aws_http2_stream_get_received_reset_error_code (http2_stream : * mut aws_http_stream , out_http2_error : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the HTTP/2 error code sent in the RST_STREAM frame (HTTP/2 only).\n Only valid if the stream has completed, and has sent an RST_STREAM frame.\n\n @param http2_stream HTTP/2 stream.\n @param out_http2_error Gets to set to HTTP/2 error code sent in rst_stream."] pub fn aws_http2_stream_get_sent_reset_error_code (http2_stream : * mut aws_http_stream , out_http2_error : * mut u32) -> :: libc :: c_int ; } # [repr (i32)] # [non_exhaustive] # [doc = " Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n SPDX-License-Identifier: Apache-2.0."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_status_code { AWS_HTTP_STATUS_CODE_UNKNOWN = - 1 , AWS_HTTP_STATUS_CODE_100_CONTINUE = 100 , AWS_HTTP_STATUS_CODE_101_SWITCHING_PROTOCOLS = 101 , AWS_HTTP_STATUS_CODE_102_PROCESSING = 102 , AWS_HTTP_STATUS_CODE_103_EARLY_HINTS = 103 , AWS_HTTP_STATUS_CODE_200_OK = 200 , AWS_HTTP_STATUS_CODE_201_CREATED = 201 , AWS_HTTP_STATUS_CODE_202_ACCEPTED = 202 , AWS_HTTP_STATUS_CODE_203_NON_AUTHORITATIVE_INFORMATION = 203 , AWS_HTTP_STATUS_CODE_204_NO_CONTENT = 204 , AWS_HTTP_STATUS_CODE_205_RESET_CONTENT = 205 , AWS_HTTP_STATUS_CODE_206_PARTIAL_CONTENT = 206 , AWS_HTTP_STATUS_CODE_207_MULTI_STATUS = 207 , AWS_HTTP_STATUS_CODE_208_ALREADY_REPORTED = 208 , AWS_HTTP_STATUS_CODE_226_IM_USED = 226 , AWS_HTTP_STATUS_CODE_300_MULTIPLE_CHOICES = 300 , AWS_HTTP_STATUS_CODE_301_MOVED_PERMANENTLY = 301 , AWS_HTTP_STATUS_CODE_302_FOUND = 302 , AWS_HTTP_STATUS_CODE_303_SEE_OTHER = 303 , AWS_HTTP_STATUS_CODE_304_NOT_MODIFIED = 304 , AWS_HTTP_STATUS_CODE_305_USE_PROXY = 305 , AWS_HTTP_STATUS_CODE_307_TEMPORARY_REDIRECT = 307 , AWS_HTTP_STATUS_CODE_308_PERMANENT_REDIRECT = 308 , AWS_HTTP_STATUS_CODE_400_BAD_REQUEST = 400 , AWS_HTTP_STATUS_CODE_401_UNAUTHORIZED = 401 , AWS_HTTP_STATUS_CODE_402_PAYMENT_REQUIRED = 402 , AWS_HTTP_STATUS_CODE_403_FORBIDDEN = 403 , AWS_HTTP_STATUS_CODE_404_NOT_FOUND = 404 , AWS_HTTP_STATUS_CODE_405_METHOD_NOT_ALLOWED = 405 , AWS_HTTP_STATUS_CODE_406_NOT_ACCEPTABLE = 406 , AWS_HTTP_STATUS_CODE_407_PROXY_AUTHENTICATION_REQUIRED = 407 , AWS_HTTP_STATUS_CODE_408_REQUEST_TIMEOUT = 408 , AWS_HTTP_STATUS_CODE_409_CONFLICT = 409 , AWS_HTTP_STATUS_CODE_410_GONE = 410 , AWS_HTTP_STATUS_CODE_411_LENGTH_REQUIRED = 411 , AWS_HTTP_STATUS_CODE_412_PRECONDITION_FAILED = 412 , AWS_HTTP_STATUS_CODE_413_REQUEST_ENTITY_TOO_LARGE = 413 , AWS_HTTP_STATUS_CODE_414_REQUEST_URI_TOO_LONG = 414 , AWS_HTTP_STATUS_CODE_415_UNSUPPORTED_MEDIA_TYPE = 415 , AWS_HTTP_STATUS_CODE_416_REQUESTED_RANGE_NOT_SATISFIABLE = 416 , AWS_HTTP_STATUS_CODE_417_EXPECTATION_FAILED = 417 , AWS_HTTP_STATUS_CODE_421_MISDIRECTED_REQUEST = 421 , AWS_HTTP_STATUS_CODE_422_UNPROCESSABLE_ENTITY = 422 , AWS_HTTP_STATUS_CODE_423_LOCKED = 423 , AWS_HTTP_STATUS_CODE_424_FAILED_DEPENDENCY = 424 , AWS_HTTP_STATUS_CODE_425_TOO_EARLY = 425 , AWS_HTTP_STATUS_CODE_426_UPGRADE_REQUIRED = 426 , AWS_HTTP_STATUS_CODE_428_PRECONDITION_REQUIRED = 428 , AWS_HTTP_STATUS_CODE_429_TOO_MANY_REQUESTS = 429 , AWS_HTTP_STATUS_CODE_431_REQUEST_HEADER_FIELDS_TOO_LARGE = 431 , AWS_HTTP_STATUS_CODE_451_UNAVAILABLE_FOR_LEGAL_REASON = 451 , AWS_HTTP_STATUS_CODE_500_INTERNAL_SERVER_ERROR = 500 , AWS_HTTP_STATUS_CODE_501_NOT_IMPLEMENTED = 501 , AWS_HTTP_STATUS_CODE_502_BAD_GATEWAY = 502 , AWS_HTTP_STATUS_CODE_503_SERVICE_UNAVAILABLE = 503 , AWS_HTTP_STATUS_CODE_504_GATEWAY_TIMEOUT = 504 , AWS_HTTP_STATUS_CODE_505_HTTP_VERSION_NOT_SUPPORTED = 505 , AWS_HTTP_STATUS_CODE_506_VARIANT_ALSO_NEGOTIATES = 506 , AWS_HTTP_STATUS_CODE_507_INSUFFICIENT_STORAGE = 507 , AWS_HTTP_STATUS_CODE_508_LOOP_DETECTED = 508 , AWS_HTTP_STATUS_CODE_510_NOT_EXTENDED = 510 , AWS_HTTP_STATUS_CODE_511_NETWORK_AUTHENTICATION_REQUIRED = 511 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_proxy_config { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [doc = " @Deprecated - Supported proxy authentication modes.  Superceded by proxy strategy."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_proxy_authentication_type { AWS_HPAT_NONE = 0 , AWS_HPAT_BASIC = 1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_proxy_env_var_type { # [doc = " Default.\n Disable reading from environment variable for proxy."] AWS_HPEV_DISABLE = 0 , # [doc = " Enable get proxy URL from environment variable, when the manual proxy options of connection manager is not set.\n env HTTPS_PROXY/https_proxy will be checked when the main connection use tls.\n env HTTP_PROXY/http_proxy will be checked when the main connection NOT use tls.\n env NO_PROXY/no_proxy will be checked to bypass proxy if the host match the pattern.\n      Check `aws_http_host_matches_no_proxy` for detail. This function can also be used with a direct no_proxy\n parameter. The lower case version has precedence."] AWS_HPEV_ENABLE = 1 , } # [repr (u32)] # [non_exhaustive] # [doc = " Supported proxy connection types"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_proxy_connection_type { # [doc = " Deprecated, but 0-valued for backwards compatibility\n\n If tls options are provided (for the main connection) then treat the proxy as a tunneling proxy\n If tls options are not provided (for the main connection), then treat the proxy as a forwarding proxy"] AWS_HPCT_HTTP_LEGACY = 0 , # [doc = " Use the proxy to forward http requests.  Attempting to use both this mode and TLS on the tunnel destination\n is a configuration error."] AWS_HPCT_HTTP_FORWARD = 1 , # [doc = " Use the proxy to establish a connection to a remote endpoint via a CONNECT request through the proxy.\n Works for both plaintext and tls connections."] AWS_HPCT_HTTP_TUNNEL = 2 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct proxy_env_var_settings { pub env_var_type : aws_http_proxy_env_var_type , pub connection_type : aws_http_proxy_connection_type , pub tls_options : * const aws_tls_connection_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of proxy_env_var_settings"] [:: std :: mem :: size_of :: < proxy_env_var_settings > () - 16usize] ; ["Alignment of proxy_env_var_settings"] [:: std :: mem :: align_of :: < proxy_env_var_settings > () - 8usize] ; ["Offset of field: proxy_env_var_settings::env_var_type"] [:: std :: mem :: offset_of ! (proxy_env_var_settings , env_var_type) - 0usize] ; ["Offset of field: proxy_env_var_settings::connection_type"] [:: std :: mem :: offset_of ! (proxy_env_var_settings , connection_type) - 4usize] ; ["Offset of field: proxy_env_var_settings::tls_options"] [:: std :: mem :: offset_of ! (proxy_env_var_settings , tls_options) - 8usize] ; } ; impl Default for proxy_env_var_settings { 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 http proxy server usage"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_proxy_options { # [doc = " Type of proxy connection to make"] pub connection_type : aws_http_proxy_connection_type , # [doc = " Proxy host to connect to"] pub host : aws_byte_cursor , # [doc = " Port to make the proxy connection to"] pub port : u32 , # [doc = " Optional.\n TLS configuration for the Local <-> Proxy connection\n Must be distinct from the the TLS options in the parent aws_http_connection_options struct"] pub tls_options : * const aws_tls_connection_options , # [doc = " Optional\n Advanced option that allows the user to create a custom strategy that gives low-level control of\n certain logical flows within the proxy logic.\n\n For tunneling proxies it allows custom retry and adaptive negotiation of CONNECT requests.\n For forwarding proxies it allows custom request transformations."] pub proxy_strategy : * mut aws_http_proxy_strategy , # [doc = " @Deprecated - What type of proxy authentication to use, if any.\n Replaced by instantiating a proxy_strategy"] pub auth_type : aws_http_proxy_authentication_type , # [doc = " @Deprecated - Optional user name to use for basic authentication\n Replaced by instantiating a proxy_strategy via aws_http_proxy_strategy_new_basic_auth()"] pub auth_username : aws_byte_cursor , # [doc = " @Deprecated - Optional password to use for basic authentication\n Replaced by instantiating a proxy_strategy via aws_http_proxy_strategy_new_basic_auth()"] pub auth_password : aws_byte_cursor , # [doc = " Optional\n No proxy hosts - Comma seperated list of hosts for which not to use a proxy, if one is specified."] pub no_proxy_hosts : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_options"] [:: std :: mem :: size_of :: < aws_http_proxy_options > () - 104usize] ; ["Alignment of aws_http_proxy_options"] [:: std :: mem :: align_of :: < aws_http_proxy_options > () - 8usize] ; ["Offset of field: aws_http_proxy_options::connection_type"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , connection_type) - 0usize] ; ["Offset of field: aws_http_proxy_options::host"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , host) - 8usize] ; ["Offset of field: aws_http_proxy_options::port"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , port) - 24usize] ; ["Offset of field: aws_http_proxy_options::tls_options"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , tls_options) - 32usize] ; ["Offset of field: aws_http_proxy_options::proxy_strategy"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , proxy_strategy) - 40usize] ; ["Offset of field: aws_http_proxy_options::auth_type"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , auth_type) - 48usize] ; ["Offset of field: aws_http_proxy_options::auth_username"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , auth_username) - 56usize] ; ["Offset of field: aws_http_proxy_options::auth_password"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , auth_password) - 72usize] ; ["Offset of field: aws_http_proxy_options::no_proxy_hosts"] [:: std :: mem :: offset_of ! (aws_http_proxy_options , no_proxy_hosts) - 88usize] ; } ; impl Default for aws_http_proxy_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 () } } } # [doc = " Synchronous (for now) callback function to fetch a token used in modifying CONNECT requests"] pub type aws_http_proxy_negotiation_get_token_sync_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void , out_error_code : * mut :: libc :: c_int) -> * mut aws_string > ; # [doc = " Synchronous (for now) callback function to fetch a token used in modifying CONNECT request.  Includes a (byte string)\n context intended to be used as part of a challenge-response flow."] pub type aws_http_proxy_negotiation_get_challenge_token_sync_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void , challenge_context : * const aws_byte_cursor , out_error_code : * mut :: libc :: c_int) -> * mut aws_string > ; # [doc = " Proxy negotiation logic must call this function to indicate an unsuccessful outcome"] pub type aws_http_proxy_negotiation_terminate_fn = :: std :: option :: Option < unsafe extern "C" fn (message : * mut aws_http_message , error_code : :: libc :: c_int , internal_proxy_user_data : * mut :: libc :: c_void) > ; # [doc = " Proxy negotiation logic must call this function to forward the potentially-mutated request back to the proxy\n connection logic."] pub type aws_http_proxy_negotiation_http_request_forward_fn = :: std :: option :: Option < unsafe extern "C" fn (message : * mut aws_http_message , internal_proxy_user_data : * mut :: libc :: c_void) > ; # [doc = " User-supplied transform callback which implements the proxy request flow and ultimately, across all execution\n pathways, invokes either the terminate function or the forward function appropriately.\n\n For tunneling proxy connections, this request flow transform only applies to the CONNECT stage of proxy\n connection establishment.\n\n For forwarding proxy connections, this request flow transform applies to every single http request that goes\n out on the connection.\n\n Forwarding proxy connections cannot yet support a truly async request transform without major surgery on http\n stream creation, so for now, we split into an async version (for tunneling proxies) and a separate\n synchronous version for forwarding proxies.  Also forwarding proxies are a kind of legacy dead-end in some\n sense.\n"] pub type aws_http_proxy_negotiation_http_request_transform_async_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , message : * mut aws_http_message , negotiation_termination_callback : aws_http_proxy_negotiation_terminate_fn , negotiation_http_request_forward_callback : aws_http_proxy_negotiation_http_request_forward_fn , internal_proxy_user_data : * mut :: libc :: c_void) > ; pub type aws_http_proxy_negotiation_http_request_transform_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , message : * mut aws_http_message) -> :: libc :: c_int > ; # [doc = " Tunneling proxy connections only.  A callback that lets the negotiator examine the headers in the\n response to the most recent CONNECT request as they arrive."] pub type aws_http_proxy_negotiation_connect_on_incoming_headers_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , header_block : aws_http_header_block , header_array : * const aws_http_header , num_headers : usize) -> :: libc :: c_int > ; # [doc = " Tunneling proxy connections only.  A callback that lets the negotiator examine the status code of the\n response to the most recent CONNECT request."] pub type aws_http_proxy_negotiator_connect_status_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , status_code : aws_http_status_code) -> :: libc :: c_int > ; # [doc = " Tunneling proxy connections only.  A callback that lets the negotiator examine the body of the response\n to the most recent CONNECT request."] pub type aws_http_proxy_negotiator_connect_on_incoming_body_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator , data : * const aws_byte_cursor) -> :: libc :: c_int > ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http_proxy_negotiation_retry_directive { AWS_HPNRD_STOP = 0 , AWS_HPNRD_NEW_CONNECTION = 1 , AWS_HPNRD_CURRENT_CONNECTION = 2 , } pub type aws_http_proxy_negotiator_get_retry_directive_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_negotiator : * mut aws_http_proxy_negotiator) -> aws_http_proxy_negotiation_retry_directive > ; # [doc = " Vtable for forwarding-based proxy negotiators"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_proxy_negotiator_forwarding_vtable { pub forward_request_transform : aws_http_proxy_negotiation_http_request_transform_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_negotiator_forwarding_vtable"] [:: std :: mem :: size_of :: < aws_http_proxy_negotiator_forwarding_vtable > () - 8usize] ; ["Alignment of aws_http_proxy_negotiator_forwarding_vtable"] [:: std :: mem :: align_of :: < aws_http_proxy_negotiator_forwarding_vtable > () - 8usize] ; ["Offset of field: aws_http_proxy_negotiator_forwarding_vtable::forward_request_transform"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_forwarding_vtable , forward_request_transform) - 0usize] ; } ; # [doc = " Vtable for tunneling-based proxy negotiators"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_proxy_negotiator_tunnelling_vtable { pub connect_request_transform : aws_http_proxy_negotiation_http_request_transform_async_fn , pub on_incoming_headers_callback : aws_http_proxy_negotiation_connect_on_incoming_headers_fn , pub on_status_callback : aws_http_proxy_negotiator_connect_status_fn , pub on_incoming_body_callback : aws_http_proxy_negotiator_connect_on_incoming_body_fn , pub get_retry_directive : aws_http_proxy_negotiator_get_retry_directive_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_negotiator_tunnelling_vtable"] [:: std :: mem :: size_of :: < aws_http_proxy_negotiator_tunnelling_vtable > () - 40usize] ; ["Alignment of aws_http_proxy_negotiator_tunnelling_vtable"] [:: std :: mem :: align_of :: < aws_http_proxy_negotiator_tunnelling_vtable > () - 8usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::connect_request_transform"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , connect_request_transform) - 0usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::on_incoming_headers_callback"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , on_incoming_headers_callback) - 8usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::on_status_callback"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , on_status_callback) - 16usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::on_incoming_body_callback"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , on_incoming_body_callback) - 24usize] ; ["Offset of field: aws_http_proxy_negotiator_tunnelling_vtable::get_retry_directive"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator_tunnelling_vtable , get_retry_directive) - 32usize] ; } ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_http_proxy_negotiator { pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , pub strategy_vtable : aws_http_proxy_negotiator__bindgen_ty_1 , } # [repr (C)] # [derive (Copy , Clone)] pub union aws_http_proxy_negotiator__bindgen_ty_1 { pub forwarding_vtable : * mut aws_http_proxy_negotiator_forwarding_vtable , pub tunnelling_vtable : * mut aws_http_proxy_negotiator_tunnelling_vtable , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_negotiator__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_http_proxy_negotiator__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_http_proxy_negotiator__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_http_proxy_negotiator__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_http_proxy_negotiator__bindgen_ty_1::forwarding_vtable"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator__bindgen_ty_1 , forwarding_vtable) - 0usize] ; ["Offset of field: aws_http_proxy_negotiator__bindgen_ty_1::tunnelling_vtable"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator__bindgen_ty_1 , tunnelling_vtable) - 0usize] ; } ; impl Default for aws_http_proxy_negotiator__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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_negotiator"] [:: std :: mem :: size_of :: < aws_http_proxy_negotiator > () - 40usize] ; ["Alignment of aws_http_proxy_negotiator"] [:: std :: mem :: align_of :: < aws_http_proxy_negotiator > () - 8usize] ; ["Offset of field: aws_http_proxy_negotiator::ref_count"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator , ref_count) - 0usize] ; ["Offset of field: aws_http_proxy_negotiator::impl_"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator , impl_) - 24usize] ; ["Offset of field: aws_http_proxy_negotiator::strategy_vtable"] [:: std :: mem :: offset_of ! (aws_http_proxy_negotiator , strategy_vtable) - 32usize] ; } ; impl Default for aws_http_proxy_negotiator { 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_http_proxy_strategy_create_negotiator_fn = :: std :: option :: Option < unsafe extern "C" fn (proxy_strategy : * mut aws_http_proxy_strategy , allocator : * mut aws_allocator) -> * mut aws_http_proxy_negotiator > ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_proxy_strategy_vtable { pub create_negotiator : aws_http_proxy_strategy_create_negotiator_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_vtable"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_vtable > () - 8usize] ; ["Alignment of aws_http_proxy_strategy_vtable"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_vtable > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_vtable::create_negotiator"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_vtable , create_negotiator) - 0usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_proxy_strategy { pub ref_count : aws_ref_count , pub vtable : * mut aws_http_proxy_strategy_vtable , pub impl_ : * mut :: libc :: c_void , pub proxy_connection_type : aws_http_proxy_connection_type , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy > () - 48usize] ; ["Alignment of aws_http_proxy_strategy"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy::ref_count"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy , ref_count) - 0usize] ; ["Offset of field: aws_http_proxy_strategy::vtable"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy , vtable) - 24usize] ; ["Offset of field: aws_http_proxy_strategy::impl_"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy , impl_) - 32usize] ; ["Offset of field: aws_http_proxy_strategy::proxy_connection_type"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy , proxy_connection_type) - 40usize] ; } ; impl Default for aws_http_proxy_strategy { 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)] pub struct aws_http_proxy_strategy_basic_auth_options { pub proxy_connection_type : aws_http_proxy_connection_type , pub user_name : aws_byte_cursor , pub password : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_basic_auth_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_basic_auth_options > () - 40usize] ; ["Alignment of aws_http_proxy_strategy_basic_auth_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_basic_auth_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_basic_auth_options::proxy_connection_type"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_basic_auth_options , proxy_connection_type) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_basic_auth_options::user_name"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_basic_auth_options , user_name) - 8usize] ; ["Offset of field: aws_http_proxy_strategy_basic_auth_options::password"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_basic_auth_options , password) - 24usize] ; } ; impl Default for aws_http_proxy_strategy_basic_auth_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)] pub struct aws_http_proxy_strategy_tunneling_kerberos_options { pub get_token : aws_http_proxy_negotiation_get_token_sync_fn , pub get_token_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_tunneling_kerberos_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_tunneling_kerberos_options > () - 16usize] ; ["Alignment of aws_http_proxy_strategy_tunneling_kerberos_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_tunneling_kerberos_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_kerberos_options::get_token"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_kerberos_options , get_token) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_kerberos_options::get_token_user_data"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_kerberos_options , get_token_user_data) - 8usize] ; } ; impl Default for aws_http_proxy_strategy_tunneling_kerberos_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)] pub struct aws_http_proxy_strategy_tunneling_ntlm_options { pub get_token : aws_http_proxy_negotiation_get_token_sync_fn , pub get_challenge_token : aws_http_proxy_negotiation_get_challenge_token_sync_fn , pub get_challenge_token_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_tunneling_ntlm_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_tunneling_ntlm_options > () - 24usize] ; ["Alignment of aws_http_proxy_strategy_tunneling_ntlm_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_tunneling_ntlm_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_ntlm_options::get_token"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_ntlm_options , get_token) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_ntlm_options::get_challenge_token"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_ntlm_options , get_challenge_token) - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_ntlm_options::get_challenge_token_user_data"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_ntlm_options , get_challenge_token_user_data) - 16usize] ; } ; impl Default for aws_http_proxy_strategy_tunneling_ntlm_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)] pub struct aws_http_proxy_strategy_tunneling_adaptive_options { pub kerberos_options : * mut aws_http_proxy_strategy_tunneling_kerberos_options , pub ntlm_options : * mut aws_http_proxy_strategy_tunneling_ntlm_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_tunneling_adaptive_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_tunneling_adaptive_options > () - 16usize] ; ["Alignment of aws_http_proxy_strategy_tunneling_adaptive_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_tunneling_adaptive_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_adaptive_options::kerberos_options"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_adaptive_options , kerberos_options) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_adaptive_options::ntlm_options"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_adaptive_options , ntlm_options) - 8usize] ; } ; impl Default for aws_http_proxy_strategy_tunneling_adaptive_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)] pub struct aws_http_proxy_strategy_tunneling_sequence_options { pub strategies : * mut * mut aws_http_proxy_strategy , pub strategy_count : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_proxy_strategy_tunneling_sequence_options"] [:: std :: mem :: size_of :: < aws_http_proxy_strategy_tunneling_sequence_options > () - 16usize] ; ["Alignment of aws_http_proxy_strategy_tunneling_sequence_options"] [:: std :: mem :: align_of :: < aws_http_proxy_strategy_tunneling_sequence_options > () - 8usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_sequence_options::strategies"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_sequence_options , strategies) - 0usize] ; ["Offset of field: aws_http_proxy_strategy_tunneling_sequence_options::strategy_count"] [:: std :: mem :: offset_of ! (aws_http_proxy_strategy_tunneling_sequence_options , strategy_count) - 8usize] ; } ; impl Default for aws_http_proxy_strategy_tunneling_sequence_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 () } } } unsafe extern "C" { # [doc = " Take a reference to an http proxy negotiator\n @param proxy_negotiator negotiator to take a reference to\n @return the strategy"] pub fn aws_http_proxy_negotiator_acquire (proxy_negotiator : * mut aws_http_proxy_negotiator) -> * mut aws_http_proxy_negotiator ; } unsafe extern "C" { # [doc = " Release a reference to an http proxy negotiator\n @param proxy_negotiator negotiator to release a reference to"] pub fn aws_http_proxy_negotiator_release (proxy_negotiator : * mut aws_http_proxy_negotiator) ; } unsafe extern "C" { # [doc = " Creates a new proxy negotiator from a proxy strategy\n @param allocator memory allocator to use\n @param strategy strategy to creation a new negotiator for\n @return a new proxy negotiator if successful, otherwise NULL"] pub fn aws_http_proxy_strategy_create_negotiator (strategy : * mut aws_http_proxy_strategy , allocator : * mut aws_allocator) -> * mut aws_http_proxy_negotiator ; } unsafe extern "C" { # [doc = " Take a reference to an http proxy strategy\n @param proxy_strategy strategy to take a reference to\n @return the strategy"] pub fn aws_http_proxy_strategy_acquire (proxy_strategy : * mut aws_http_proxy_strategy) -> * mut aws_http_proxy_strategy ; } unsafe extern "C" { # [doc = " Release a reference to an http proxy strategy\n @param proxy_strategy strategy to release a reference to"] pub fn aws_http_proxy_strategy_release (proxy_strategy : * mut aws_http_proxy_strategy) ; } unsafe extern "C" { # [doc = " A constructor for a proxy strategy that performs basic authentication by adding the appropriate\n header and header value to requests or CONNECT requests.\n\n @param allocator memory allocator to use\n @param config basic authentication configuration info\n @return a new proxy strategy if successfully constructed, otherwise NULL"] pub fn aws_http_proxy_strategy_new_basic_auth (allocator : * mut aws_allocator , config : * mut aws_http_proxy_strategy_basic_auth_options) -> * mut aws_http_proxy_strategy ; } unsafe extern "C" { # [doc = " Constructor for an adaptive tunneling proxy strategy.  This strategy attempts a vanilla CONNECT and if that\n fails it may make followup CONNECT attempts using kerberos or ntlm tokens, based on configuration and proxy\n response properties.\n\n @param allocator memory allocator to use\n @param config configuration options for the strategy\n @return a new proxy strategy if successfully constructed, otherwise NULL"] pub fn aws_http_proxy_strategy_new_tunneling_adaptive (allocator : * mut aws_allocator , config : * mut aws_http_proxy_strategy_tunneling_adaptive_options) -> * mut aws_http_proxy_strategy ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from http connection options\n @param allocator memory allocator to use\n @param options http connection options to source proxy configuration from\n @return"] pub fn aws_http_proxy_config_new_from_connection_options (allocator : * mut aws_allocator , options : * const aws_http_client_connection_options) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from http connection manager options\n @param allocator memory allocator to use\n @param options http connection manager options to source proxy configuration from\n @return"] pub fn aws_http_proxy_config_new_from_manager_options (allocator : * mut aws_allocator , options : * const aws_http_connection_manager_options) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from non-persistent proxy options.  The resulting\n proxy configuration assumes a tunneling connection type.\n\n @param allocator memory allocator to use\n @param options http proxy options to source proxy configuration from\n @return"] pub fn aws_http_proxy_config_new_tunneling_from_proxy_options (allocator : * mut aws_allocator , options : * const aws_http_proxy_options) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from non-persistent proxy options.\n Legacy connection type of proxy options will be rejected.\n\n @param allocator memory allocator to use\n @param options http proxy options to source proxy configuration from\n @return"] pub fn aws_http_proxy_config_new_from_proxy_options (allocator : * mut aws_allocator , options : * const aws_http_proxy_options) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Create a persistent proxy configuration from non-persistent proxy options.\n\n @param allocator memory allocator to use\n @param options http proxy options to source proxy configuration from\n @param is_tls_connection tls connection info of the main connection to determine connection_type\n                          when the connection_type is legacy.\n @return"] pub fn aws_http_proxy_config_new_from_proxy_options_with_tls_info (allocator : * mut aws_allocator , proxy_options : * const aws_http_proxy_options , is_tls_connection : bool) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Clones an existing proxy configuration.  A refactor could remove this (do a \"move\" between the old and new user\n data in the one spot it's used) but that should wait until we have better test cases for the logic where this\n gets invoked (ntlm/kerberos chains).\n\n @param allocator memory allocator to use\n @param proxy_config http proxy configuration to clone\n @return"] pub fn aws_http_proxy_config_new_clone (allocator : * mut aws_allocator , proxy_config : * const aws_http_proxy_config) -> * mut aws_http_proxy_config ; } unsafe extern "C" { # [doc = " Destroys an http proxy configuration\n @param config http proxy configuration to destroy"] pub fn aws_http_proxy_config_destroy (config : * mut aws_http_proxy_config) ; } unsafe extern "C" { # [doc = " Initializes non-persistent http proxy options from a persistent http proxy configuration\n @param options http proxy options to initialize\n @param config the http proxy config to use as an initialization source"] pub fn aws_http_proxy_options_init_from_config (options : * mut aws_http_proxy_options , config : * const aws_http_proxy_config) ; } unsafe extern "C" { # [doc = " Establish an arbitrary protocol connection through an http proxy via tunneling CONNECT.  Alpn is\n not required for this connection process to succeed, but we encourage its use if available.\n\n @param channel_options configuration options for the socket level connection\n @param proxy_options configuration options for the proxy connection\n\n @return AWS_OP_SUCCESS if the asynchronous channel kickoff succeeded, AWS_OP_ERR otherwise"] pub fn aws_http_proxy_new_socket_channel (channel_options : * mut aws_socket_channel_bootstrap_options , proxy_options : * const aws_http_proxy_options) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_auth_http_system_vtable { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_ecc_key_pair { _unused : [u8 ; 0] , } unsafe extern "C" { pub static aws_sts_assume_role_default_duration_secs : u16 ; } pub type aws_on_get_credentials_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (credentials : * mut aws_credentials , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_credentials_provider_get_credentials_fn = :: std :: option :: Option < unsafe extern "C" fn (provider : * mut aws_credentials_provider , callback : aws_on_get_credentials_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; pub type aws_credentials_provider_destroy_fn = :: std :: option :: Option < unsafe extern "C" fn (provider : * mut aws_credentials_provider) > ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_credentials_provider_vtable { pub get_credentials : aws_credentials_provider_get_credentials_fn , pub destroy : aws_credentials_provider_destroy_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_vtable"] [:: std :: mem :: size_of :: < aws_credentials_provider_vtable > () - 16usize] ; ["Alignment of aws_credentials_provider_vtable"] [:: std :: mem :: align_of :: < aws_credentials_provider_vtable > () - 8usize] ; ["Offset of field: aws_credentials_provider_vtable::get_credentials"] [:: std :: mem :: offset_of ! (aws_credentials_provider_vtable , get_credentials) - 0usize] ; ["Offset of field: aws_credentials_provider_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_credentials_provider_vtable , destroy) - 8usize] ; } ; pub type aws_credentials_provider_shutdown_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_shutdown_options { pub shutdown_callback : aws_credentials_provider_shutdown_completed_fn , pub shutdown_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_shutdown_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_shutdown_options > () - 16usize] ; ["Alignment of aws_credentials_provider_shutdown_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_shutdown_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_shutdown_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_credentials_provider_shutdown_options , shutdown_callback) - 0usize] ; ["Offset of field: aws_credentials_provider_shutdown_options::shutdown_user_data"] [:: std :: mem :: offset_of ! (aws_credentials_provider_shutdown_options , shutdown_user_data) - 8usize] ; } ; impl Default for aws_credentials_provider_shutdown_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 () } } } # [doc = " A baseclass for credentials providers.  A credentials provider is an object that has an asynchronous\n query function for retrieving AWS credentials.\n\n Ref-counted.  Thread-safe."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider { pub vtable : * mut aws_credentials_provider_vtable , pub allocator : * mut aws_allocator , pub shutdown_options : aws_credentials_provider_shutdown_options , pub impl_ : * mut :: libc :: c_void , pub ref_count : aws_atomic_var , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider"] [:: std :: mem :: size_of :: < aws_credentials_provider > () - 48usize] ; ["Alignment of aws_credentials_provider"] [:: std :: mem :: align_of :: < aws_credentials_provider > () - 8usize] ; ["Offset of field: aws_credentials_provider::vtable"] [:: std :: mem :: offset_of ! (aws_credentials_provider , vtable) - 0usize] ; ["Offset of field: aws_credentials_provider::allocator"] [:: std :: mem :: offset_of ! (aws_credentials_provider , allocator) - 8usize] ; ["Offset of field: aws_credentials_provider::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider , shutdown_options) - 16usize] ; ["Offset of field: aws_credentials_provider::impl_"] [:: std :: mem :: offset_of ! (aws_credentials_provider , impl_) - 32usize] ; ["Offset of field: aws_credentials_provider::ref_count"] [:: std :: mem :: offset_of ! (aws_credentials_provider , ref_count) - 40usize] ; } ; impl Default for aws_credentials_provider { 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 = " Configuration options for a provider that returns a fixed set of credentials"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_static_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub access_key_id : aws_byte_cursor , pub secret_access_key : aws_byte_cursor , pub session_token : aws_byte_cursor , pub account_id : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_static_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_static_options > () - 80usize] ; ["Alignment of aws_credentials_provider_static_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_static_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_static_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_static_options::access_key_id"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , access_key_id) - 16usize] ; ["Offset of field: aws_credentials_provider_static_options::secret_access_key"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , secret_access_key) - 32usize] ; ["Offset of field: aws_credentials_provider_static_options::session_token"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , session_token) - 48usize] ; ["Offset of field: aws_credentials_provider_static_options::account_id"] [:: std :: mem :: offset_of ! (aws_credentials_provider_static_options , account_id) - 64usize] ; } ; impl Default for aws_credentials_provider_static_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 () } } } # [doc = " Configuration options for a provider that returns credentials based on environment variable values"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_environment_options { pub shutdown_options : aws_credentials_provider_shutdown_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_environment_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_environment_options > () - 16usize] ; ["Alignment of aws_credentials_provider_environment_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_environment_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_environment_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_environment_options , shutdown_options) - 0usize] ; } ; impl Default for aws_credentials_provider_environment_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 () } } } # [doc = " Configuration options for a provider that sources credentials from the aws config and credentials files\n (by default ~/.aws/config and ~/.aws/credentials)"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_profile_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub profile_name_override : aws_byte_cursor , pub config_file_name_override : aws_byte_cursor , pub credentials_file_name_override : aws_byte_cursor , # [doc = " (Optional)\n Use a cached merged profile collection. A merge collection has both config file\n (~/.aws/config) and credentials file based profile collection (~/.aws/credentials) using\n `aws_profile_collection_new_from_merge`.\n If this option is provided, `config_file_name_override` and `credentials_file_name_override` will be ignored."] pub profile_collection_cached : * mut aws_profile_collection , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub function_table : * mut aws_auth_http_system_vtable , pub proxy_ev_settings : * mut proxy_env_var_settings , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_profile_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_profile_options > () - 104usize] ; ["Alignment of aws_credentials_provider_profile_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_profile_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_profile_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_profile_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , profile_name_override) - 16usize] ; ["Offset of field: aws_credentials_provider_profile_options::config_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , config_file_name_override) - 32usize] ; ["Offset of field: aws_credentials_provider_profile_options::credentials_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , credentials_file_name_override) - 48usize] ; ["Offset of field: aws_credentials_provider_profile_options::profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , profile_collection_cached) - 64usize] ; ["Offset of field: aws_credentials_provider_profile_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , bootstrap) - 72usize] ; ["Offset of field: aws_credentials_provider_profile_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , tls_ctx) - 80usize] ; ["Offset of field: aws_credentials_provider_profile_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , function_table) - 88usize] ; ["Offset of field: aws_credentials_provider_profile_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_profile_options , proxy_ev_settings) - 96usize] ; } ; impl Default for aws_credentials_provider_profile_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 () } } } # [doc = " Configuration options for a provider that functions as a caching decorator.  Credentials sourced through this\n provider will be cached within it until their expiration time.  When the cached credentials expire, new\n credentials will be fetched when next queried."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_cached_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub source : * mut aws_credentials_provider , pub refresh_time_in_milliseconds : u64 , pub high_res_clock_fn : aws_io_clock_fn , pub system_clock_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_cached_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_cached_options > () - 48usize] ; ["Alignment of aws_credentials_provider_cached_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_cached_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_cached_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_cached_options::source"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , source) - 16usize] ; ["Offset of field: aws_credentials_provider_cached_options::refresh_time_in_milliseconds"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , refresh_time_in_milliseconds) - 24usize] ; ["Offset of field: aws_credentials_provider_cached_options::high_res_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , high_res_clock_fn) - 32usize] ; ["Offset of field: aws_credentials_provider_cached_options::system_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cached_options , system_clock_fn) - 40usize] ; } ; impl Default for aws_credentials_provider_cached_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 () } } } # [doc = " Configuration options for a provider that queries, in order, a list of providers.  This provider uses the\n first set of credentials successfully queried.  Providers are queried one at a time; a provider is not queried\n until the preceding provider has failed to source credentials."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_chain_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub providers : * mut * mut aws_credentials_provider , pub provider_count : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_chain_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_chain_options > () - 32usize] ; ["Alignment of aws_credentials_provider_chain_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_chain_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_chain_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_chain_options::providers"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_options , providers) - 16usize] ; ["Offset of field: aws_credentials_provider_chain_options::provider_count"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_options , provider_count) - 24usize] ; } ; impl Default for aws_credentials_provider_chain_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 (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_imds_protocol_version { # [doc = " Defaults to IMDS_PROTOCOL_V2. It can be set to either one and IMDS Client\n will figure out (by looking at response code) which protocol an instance\n is using. But a more clear setting will reduce unnecessary network request."] IMDS_PROTOCOL_V2 = 0 , # [doc = " Defaults to IMDS_PROTOCOL_V2. It can be set to either one and IMDS Client\n will figure out (by looking at response code) which protocol an instance\n is using. But a more clear setting will reduce unnecessary network request."] IMDS_PROTOCOL_V1 = 1 , } # [doc = " Configuration options for the provider that sources credentials from ec2 instance metadata"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_imds_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub imds_version : aws_imds_protocol_version , pub ec2_metadata_v1_disabled : bool , pub function_table : * mut aws_auth_http_system_vtable , pub proxy_ev_settings : * const proxy_env_var_settings , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_imds_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_imds_options > () - 48usize] ; ["Alignment of aws_credentials_provider_imds_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_imds_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_imds_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_imds_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_imds_options::imds_version"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , imds_version) - 24usize] ; ["Offset of field: aws_credentials_provider_imds_options::ec2_metadata_v1_disabled"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , ec2_metadata_v1_disabled) - 28usize] ; ["Offset of field: aws_credentials_provider_imds_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , function_table) - 32usize] ; ["Offset of field: aws_credentials_provider_imds_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_imds_options , proxy_ev_settings) - 40usize] ; } ; impl Default for aws_credentials_provider_imds_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)] pub struct aws_credentials_provider_ecs_environment_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_ecs_environment_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_ecs_environment_options > () - 48usize] ; ["Alignment of aws_credentials_provider_ecs_environment_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_ecs_environment_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , tls_ctx) - 24usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , proxy_ev_settings) - 32usize] ; ["Offset of field: aws_credentials_provider_ecs_environment_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_environment_options , function_table) - 40usize] ; } ; impl Default for aws_credentials_provider_ecs_environment_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)] pub struct aws_credentials_provider_ecs_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub host : aws_byte_cursor , pub path_and_query : aws_byte_cursor , pub auth_token_file_path : aws_byte_cursor , pub auth_token : aws_byte_cursor , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , pub port : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_ecs_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_ecs_options > () - 120usize] ; ["Alignment of aws_credentials_provider_ecs_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_ecs_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_ecs_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_ecs_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_ecs_options::host"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , host) - 24usize] ; ["Offset of field: aws_credentials_provider_ecs_options::path_and_query"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , path_and_query) - 40usize] ; ["Offset of field: aws_credentials_provider_ecs_options::auth_token_file_path"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , auth_token_file_path) - 56usize] ; ["Offset of field: aws_credentials_provider_ecs_options::auth_token"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , auth_token) - 72usize] ; ["Offset of field: aws_credentials_provider_ecs_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , tls_ctx) - 88usize] ; ["Offset of field: aws_credentials_provider_ecs_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , proxy_ev_settings) - 96usize] ; ["Offset of field: aws_credentials_provider_ecs_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , function_table) - 104usize] ; ["Offset of field: aws_credentials_provider_ecs_options::port"] [:: std :: mem :: offset_of ! (aws_credentials_provider_ecs_options , port) - 112usize] ; } ; impl Default for aws_credentials_provider_ecs_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 () } } } # [doc = " Configuration options for the X509 credentials provider\n\n The x509 credentials provider sources temporary credentials from AWS IoT Core using TLS mutual authentication.\n See details: https://docs.aws.amazon.com/iot/latest/developerguide/authorizing-direct-aws.html\n An end to end demo with detailed steps can be found here:\n https://aws.amazon.com/blogs/security/how-to-eliminate-the-need-for-hardcoded-aws-credentials-in-devices-by-using-the-aws-iot-credentials-provider/"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_x509_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub tls_connection_options : * const aws_tls_connection_options , pub thing_name : aws_byte_cursor , pub role_alias : aws_byte_cursor , # [doc = " Per-account X509 credentials sourcing endpoint."] pub endpoint : aws_byte_cursor , # [doc = " (Optional) Http proxy configuration for the http request that fetches credentials"] pub proxy_options : * const aws_http_proxy_options , # [doc = " (Optional) Settings propagated down to http connection manager to choose proxy options from environment. Read\n aws_http_credentials_provider.h for more information."] pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_x509_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_x509_options > () - 104usize] ; ["Alignment of aws_credentials_provider_x509_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_x509_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_x509_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_x509_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_x509_options::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , tls_connection_options) - 24usize] ; ["Offset of field: aws_credentials_provider_x509_options::thing_name"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , thing_name) - 32usize] ; ["Offset of field: aws_credentials_provider_x509_options::role_alias"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , role_alias) - 48usize] ; ["Offset of field: aws_credentials_provider_x509_options::endpoint"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , endpoint) - 64usize] ; ["Offset of field: aws_credentials_provider_x509_options::proxy_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , proxy_options) - 80usize] ; ["Offset of field: aws_credentials_provider_x509_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , proxy_ev_settings) - 88usize] ; ["Offset of field: aws_credentials_provider_x509_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_x509_options , function_table) - 96usize] ; } ; impl Default for aws_credentials_provider_x509_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 () } } } # [doc = " Configuration options for the STS web identity provider\n\n Sts with web identity credentials provider sources a set of temporary security credentials for users who have been\n authenticated in a mobile or web application with a web identity provider.\n Example providers include Amazon Cognito, Login with Amazon, Facebook, Google, or any OpenID Connect-compatible\n identity provider like Elastic Kubernetes Service\n https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoleWithWebIdentity.html\n The required parameters used in the request (region, roleArn, sessionName, tokenFilePath) are automatically resolved\n by SDK from envrionment variables or config file if not set.\n---------------------------------------------------------------------------------\n| Parameter           | Environment Variable Name    | Config File Property Name |\n----------------------------------------------------------------------------------\n| region              | AWS_REGION/AWS_DEFAULT_REGION| region                    |\n| role_arn            | AWS_ROLE_ARN                 | role_arn                  |\n| role_session_name   | AWS_ROLE_SESSION_NAME        | role_session_name         |\n| token_file_path     | AWS_WEB_IDENTITY_TOKEN_FILE  | web_identity_token_file   |\n|--------------------------------------------------------------------------------|\n The order of resolution is the following\n 1. Parameters\n 2. Environment Variables (in case of region, the AWS_REGION is preferred over the AWS_DEFAULT_REGION)\n 3. Config File"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_sts_web_identity_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , # [doc = " (Optional)\n Use a cached config profile collection. You can also pass a merged collection."] pub config_profile_collection_cached : * mut aws_profile_collection , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , pub profile_name_override : aws_byte_cursor , pub region : aws_byte_cursor , pub role_arn : aws_byte_cursor , pub role_session_name : aws_byte_cursor , pub token_file_path : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_sts_web_identity_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_sts_web_identity_options > () - 136usize] ; ["Alignment of aws_credentials_provider_sts_web_identity_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_sts_web_identity_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::config_profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , config_profile_collection_cached) - 24usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , tls_ctx) - 32usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , proxy_ev_settings) - 40usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , function_table) - 48usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , profile_name_override) - 56usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::region"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , region) - 72usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::role_arn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , role_arn) - 88usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::role_session_name"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , role_session_name) - 104usize] ; ["Offset of field: aws_credentials_provider_sts_web_identity_options::token_file_path"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_web_identity_options , token_file_path) - 120usize] ; } ; impl Default for aws_credentials_provider_sts_web_identity_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)] pub struct aws_credentials_provider_sso_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub profile_name_override : aws_byte_cursor , pub config_file_name_override : aws_byte_cursor , # [doc = " (Optional)\n Use a cached config profile collection. You can also pass a merged collection.\n config_file_name_override will be ignored if this option is provided."] pub config_file_cached : * mut aws_profile_collection , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , pub system_clock_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_sso_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_sso_options > () - 96usize] ; ["Alignment of aws_credentials_provider_sso_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_sso_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_sso_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_sso_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , profile_name_override) - 16usize] ; ["Offset of field: aws_credentials_provider_sso_options::config_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , config_file_name_override) - 32usize] ; ["Offset of field: aws_credentials_provider_sso_options::config_file_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , config_file_cached) - 48usize] ; ["Offset of field: aws_credentials_provider_sso_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , bootstrap) - 56usize] ; ["Offset of field: aws_credentials_provider_sso_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , tls_ctx) - 64usize] ; ["Offset of field: aws_credentials_provider_sso_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , proxy_ev_settings) - 72usize] ; ["Offset of field: aws_credentials_provider_sso_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , function_table) - 80usize] ; ["Offset of field: aws_credentials_provider_sso_options::system_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sso_options , system_clock_fn) - 88usize] ; } ; impl Default for aws_credentials_provider_sso_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 () } } } # [doc = " Configuration options for the STS credentials provider.\n STS Credentials Provider will try to automatically resolve the region and use a regional STS endpoint if successful.\n The region resolution order is the following:\n 1. AWS_REGION environment variable\n 2. AWS_DEFAULT_REGION environment variable\n 3. The region property in the config file."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_sts_options { pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub creds_provider : * mut aws_credentials_provider , pub role_arn : aws_byte_cursor , pub session_name : aws_byte_cursor , pub external_id : aws_byte_cursor , pub duration_seconds : u16 , # [doc = " (Optional) Http proxy configuration for the AssumeRole http request that fetches credentials"] pub http_proxy_options : * const aws_http_proxy_options , # [doc = " (Optional) Settings propagated down to http connection manager to choose proxy options from environment. Read\n aws_http_credentials_provider.h for more information."] pub proxy_ev_settings : * const proxy_env_var_settings , # [doc = " (Optional)\n Uses a cached config file profile collection (~/.aws/config). You can also pass a merged profile collection,\n which contains both a config file and a credentials file.\n If provided, config_file_name_override is ignored."] pub profile_collection_cached : * mut aws_profile_collection , pub profile_name_override : aws_byte_cursor , pub config_file_name_override : aws_byte_cursor , pub shutdown_options : aws_credentials_provider_shutdown_options , pub function_table : * mut aws_auth_http_system_vtable , pub system_clock_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_sts_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_sts_options > () - 168usize] ; ["Alignment of aws_credentials_provider_sts_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_sts_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_sts_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , bootstrap) - 0usize] ; ["Offset of field: aws_credentials_provider_sts_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , tls_ctx) - 8usize] ; ["Offset of field: aws_credentials_provider_sts_options::creds_provider"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , creds_provider) - 16usize] ; ["Offset of field: aws_credentials_provider_sts_options::role_arn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , role_arn) - 24usize] ; ["Offset of field: aws_credentials_provider_sts_options::session_name"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , session_name) - 40usize] ; ["Offset of field: aws_credentials_provider_sts_options::external_id"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , external_id) - 56usize] ; ["Offset of field: aws_credentials_provider_sts_options::duration_seconds"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , duration_seconds) - 72usize] ; ["Offset of field: aws_credentials_provider_sts_options::http_proxy_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , http_proxy_options) - 80usize] ; ["Offset of field: aws_credentials_provider_sts_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , proxy_ev_settings) - 88usize] ; ["Offset of field: aws_credentials_provider_sts_options::profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , profile_collection_cached) - 96usize] ; ["Offset of field: aws_credentials_provider_sts_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , profile_name_override) - 104usize] ; ["Offset of field: aws_credentials_provider_sts_options::config_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , config_file_name_override) - 120usize] ; ["Offset of field: aws_credentials_provider_sts_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , shutdown_options) - 136usize] ; ["Offset of field: aws_credentials_provider_sts_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , function_table) - 152usize] ; ["Offset of field: aws_credentials_provider_sts_options::system_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_sts_options , system_clock_fn) - 160usize] ; } ; impl Default for aws_credentials_provider_sts_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 () } } } # [doc = " Configuration options for the process credentials provider\n\n The process credentials provider sources credentials from running a command or process.\n The command to run is sourced from a profile in the AWS config file, using the standard\n profile selection rules. The profile key the command is read from is \"credential_process.\"\n E.g.:\n  [default]\n  credential_process=/opt/amazon/bin/my-credential-fetcher --argsA=abc\n On successfully running the command, the output should be a json data with the following\n format:\n {\n\"Version\": 1,\n\"AccessKeyId\": \"accesskey\",\n\"SecretAccessKey\": \"secretAccessKey\"\n\"SessionToken\": \"....\",\n\"Expiration\": \"2019-05-29T00:21:43Z\"\n}\n Version here identifies the command output format version."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_process_options { pub shutdown_options : aws_credentials_provider_shutdown_options , # [doc = " In which profile name to look for credential_process,\n if not provided, we will try environment variable: AWS_PROFILE."] pub profile_to_use : aws_byte_cursor , # [doc = " (Optional)\n Use a cached config profile collection. You can also pass a merged collection."] pub config_profile_collection_cached : * mut aws_profile_collection , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_process_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_process_options > () - 40usize] ; ["Alignment of aws_credentials_provider_process_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_process_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_process_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_process_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_process_options::profile_to_use"] [:: std :: mem :: offset_of ! (aws_credentials_provider_process_options , profile_to_use) - 16usize] ; ["Offset of field: aws_credentials_provider_process_options::config_profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_process_options , config_profile_collection_cached) - 32usize] ; } ; impl Default for aws_credentials_provider_process_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 () } } } # [doc = " Configuration options for the default credentials provider chain."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_chain_default_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , # [doc = " (Optional)\n Use a cached merged profile collection. A merge collection has both config file\n (~/.aws/config) and credentials file based profile collection (~/.aws/credentials) using\n `aws_profile_collection_new_from_merge`."] pub profile_collection_cached : * mut aws_profile_collection , pub profile_name_override : aws_byte_cursor , pub skip_environment_credentials_provider : bool , pub proxy_ev_settings : * const proxy_env_var_settings , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_chain_default_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_chain_default_options > () - 72usize] ; ["Alignment of aws_credentials_provider_chain_default_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_chain_default_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , bootstrap) - 16usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , tls_ctx) - 24usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::profile_collection_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , profile_collection_cached) - 32usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , profile_name_override) - 40usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::skip_environment_credentials_provider"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , skip_environment_credentials_provider) - 56usize] ; ["Offset of field: aws_credentials_provider_chain_default_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_chain_default_options , proxy_ev_settings) - 64usize] ; } ; impl Default for aws_credentials_provider_chain_default_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_credentials_provider_delegate_get_credentials_fn = :: std :: option :: Option < unsafe extern "C" fn (delegate_user_data : * mut :: libc :: c_void , callback : aws_on_get_credentials_callback_fn , callback_user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Configuration options for the delegate credentials provider."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_delegate_options { pub shutdown_options : aws_credentials_provider_shutdown_options , # [doc = " Delegated get_credentials() callback."] pub get_credentials : aws_credentials_provider_delegate_get_credentials_fn , # [doc = " User data for delegated callbacks."] pub delegate_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_delegate_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_delegate_options > () - 32usize] ; ["Alignment of aws_credentials_provider_delegate_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_delegate_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_delegate_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_delegate_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_delegate_options::get_credentials"] [:: std :: mem :: offset_of ! (aws_credentials_provider_delegate_options , get_credentials) - 16usize] ; ["Offset of field: aws_credentials_provider_delegate_options::delegate_user_data"] [:: std :: mem :: offset_of ! (aws_credentials_provider_delegate_options , delegate_user_data) - 24usize] ; } ; impl Default for aws_credentials_provider_delegate_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 () } } } # [doc = " A (string) pair defining an identity provider and a valid login token sourced from it."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_cognito_identity_provider_token_pair { # [doc = " Name of an identity provider"] pub identity_provider_name : aws_byte_cursor , # [doc = " Valid login token source from the identity provider"] pub identity_provider_token : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_cognito_identity_provider_token_pair"] [:: std :: mem :: size_of :: < aws_cognito_identity_provider_token_pair > () - 32usize] ; ["Alignment of aws_cognito_identity_provider_token_pair"] [:: std :: mem :: align_of :: < aws_cognito_identity_provider_token_pair > () - 8usize] ; ["Offset of field: aws_cognito_identity_provider_token_pair::identity_provider_name"] [:: std :: mem :: offset_of ! (aws_cognito_identity_provider_token_pair , identity_provider_name) - 0usize] ; ["Offset of field: aws_cognito_identity_provider_token_pair::identity_provider_token"] [:: std :: mem :: offset_of ! (aws_cognito_identity_provider_token_pair , identity_provider_token) - 16usize] ; } ; impl Default for aws_cognito_identity_provider_token_pair { 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_credentials_provider_cognito_get_token_pairs_completion_fn = :: std :: option :: Option < unsafe extern "C" fn (logins : * mut aws_cognito_identity_provider_token_pair , login_count : usize , error_code : :: libc :: c_int , completion_user_data : * mut :: libc :: c_void) > ; pub type aws_credentials_provider_cognito_get_token_pairs_async_fn = :: std :: option :: Option < unsafe extern "C" fn (get_token_pairs_user_data : * mut :: libc :: c_void , completion_callback : aws_credentials_provider_cognito_get_token_pairs_completion_fn , completion_user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Configuration options needed to create a Cognito-based Credentials Provider"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_provider_cognito_options { pub shutdown_options : aws_credentials_provider_shutdown_options , # [doc = " Cognito service regional endpoint to source credentials from."] pub endpoint : aws_byte_cursor , # [doc = " Cognito identity to fetch credentials relative to."] pub identity : aws_byte_cursor , # [doc = " Optional set of identity provider token pairs to allow for authenticated identity access."] pub logins : * mut aws_cognito_identity_provider_token_pair , pub login_count : usize , # [doc = " Optional ARN of the role to be assumed when multiple roles were received in the token from the identity provider."] pub custom_role_arn : * mut aws_byte_cursor , # [doc = " Connection bootstrap to use for network connections made while sourcing credentials"] pub bootstrap : * mut aws_client_bootstrap , # [doc = " Client TLS context to use when querying cognito credentials.\n Required."] pub tls_ctx : * mut aws_tls_ctx , # [doc = " (Optional) Http proxy configuration for the http request that fetches credentials"] pub http_proxy_options : * const aws_http_proxy_options , # [doc = " (Optional) Settings propagated down to http connection manager to choose proxy options from environment. Read\n aws_http_credentials_provider.h for more information."] pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , # [doc = " Optional async function to allow for dynamic augmentation of the token pair set on a per-request basis."] pub get_token_pairs : aws_credentials_provider_cognito_get_token_pairs_async_fn , # [doc = " User data that should be passed in to the get_token_pairs function as the first parameter.  In practice, this\n will be a reference to a CRT binding object."] pub get_token_pairs_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_cognito_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_cognito_options > () - 128usize] ; ["Alignment of aws_credentials_provider_cognito_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_cognito_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_cognito_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_cognito_options::endpoint"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , endpoint) - 16usize] ; ["Offset of field: aws_credentials_provider_cognito_options::identity"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , identity) - 32usize] ; ["Offset of field: aws_credentials_provider_cognito_options::logins"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , logins) - 48usize] ; ["Offset of field: aws_credentials_provider_cognito_options::login_count"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , login_count) - 56usize] ; ["Offset of field: aws_credentials_provider_cognito_options::custom_role_arn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , custom_role_arn) - 64usize] ; ["Offset of field: aws_credentials_provider_cognito_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , bootstrap) - 72usize] ; ["Offset of field: aws_credentials_provider_cognito_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , tls_ctx) - 80usize] ; ["Offset of field: aws_credentials_provider_cognito_options::http_proxy_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , http_proxy_options) - 88usize] ; ["Offset of field: aws_credentials_provider_cognito_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , proxy_ev_settings) - 96usize] ; ["Offset of field: aws_credentials_provider_cognito_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , function_table) - 104usize] ; ["Offset of field: aws_credentials_provider_cognito_options::get_token_pairs"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , get_token_pairs) - 112usize] ; ["Offset of field: aws_credentials_provider_cognito_options::get_token_pairs_user_data"] [:: std :: mem :: offset_of ! (aws_credentials_provider_cognito_options , get_token_pairs_user_data) - 120usize] ; } ; impl Default for aws_credentials_provider_cognito_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)] pub struct aws_credentials_provider_login_options { pub shutdown_options : aws_credentials_provider_shutdown_options , pub login_session : aws_byte_cursor , pub login_region : aws_byte_cursor , pub login_cache_directory_override : aws_byte_cursor , pub profile_name_override : aws_byte_cursor , pub config_file_name_override : aws_byte_cursor , pub config_file_cached : * mut aws_profile_collection , pub bootstrap : * mut aws_client_bootstrap , pub tls_ctx : * mut aws_tls_ctx , pub proxy_ev_settings : * const proxy_env_var_settings , pub function_table : * mut aws_auth_http_system_vtable , pub system_clock_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_provider_login_options"] [:: std :: mem :: size_of :: < aws_credentials_provider_login_options > () - 144usize] ; ["Alignment of aws_credentials_provider_login_options"] [:: std :: mem :: align_of :: < aws_credentials_provider_login_options > () - 8usize] ; ["Offset of field: aws_credentials_provider_login_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , shutdown_options) - 0usize] ; ["Offset of field: aws_credentials_provider_login_options::login_session"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , login_session) - 16usize] ; ["Offset of field: aws_credentials_provider_login_options::login_region"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , login_region) - 32usize] ; ["Offset of field: aws_credentials_provider_login_options::login_cache_directory_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , login_cache_directory_override) - 48usize] ; ["Offset of field: aws_credentials_provider_login_options::profile_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , profile_name_override) - 64usize] ; ["Offset of field: aws_credentials_provider_login_options::config_file_name_override"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , config_file_name_override) - 80usize] ; ["Offset of field: aws_credentials_provider_login_options::config_file_cached"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , config_file_cached) - 96usize] ; ["Offset of field: aws_credentials_provider_login_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , bootstrap) - 104usize] ; ["Offset of field: aws_credentials_provider_login_options::tls_ctx"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , tls_ctx) - 112usize] ; ["Offset of field: aws_credentials_provider_login_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , proxy_ev_settings) - 120usize] ; ["Offset of field: aws_credentials_provider_login_options::function_table"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , function_table) - 128usize] ; ["Offset of field: aws_credentials_provider_login_options::system_clock_fn"] [:: std :: mem :: offset_of ! (aws_credentials_provider_login_options , system_clock_fn) - 136usize] ; } ; impl Default for aws_credentials_provider_login_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 () } } } # [doc = " Configuration options for `aws_credentials_new_with_options`"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_options { pub access_key_id_cursor : aws_byte_cursor , pub secret_access_key_cursor : aws_byte_cursor , pub session_token_cursor : aws_byte_cursor , pub account_id_cursor : aws_byte_cursor , pub expiration_timepoint_seconds : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_credentials_options"] [:: std :: mem :: size_of :: < aws_credentials_options > () - 72usize] ; ["Alignment of aws_credentials_options"] [:: std :: mem :: align_of :: < aws_credentials_options > () - 8usize] ; ["Offset of field: aws_credentials_options::access_key_id_cursor"] [:: std :: mem :: offset_of ! (aws_credentials_options , access_key_id_cursor) - 0usize] ; ["Offset of field: aws_credentials_options::secret_access_key_cursor"] [:: std :: mem :: offset_of ! (aws_credentials_options , secret_access_key_cursor) - 16usize] ; ["Offset of field: aws_credentials_options::session_token_cursor"] [:: std :: mem :: offset_of ! (aws_credentials_options , session_token_cursor) - 32usize] ; ["Offset of field: aws_credentials_options::account_id_cursor"] [:: std :: mem :: offset_of ! (aws_credentials_options , account_id_cursor) - 48usize] ; ["Offset of field: aws_credentials_options::expiration_timepoint_seconds"] [:: std :: mem :: offset_of ! (aws_credentials_options , expiration_timepoint_seconds) - 64usize] ; } ; impl Default for aws_credentials_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 () } } } unsafe extern "C" { # [doc = " Creates a new set of aws credentials\n\n @param allocator memory allocator to use\n @param access_key_id_cursor value for the aws access key id field\n @param secret_access_key_cursor value for the secret access key field\n @param session_token_cursor (optional) security token associated with the credentials\n @param expiration_timepoint_seconds timepoint, in seconds since epoch, that the credentials will no longer\n be valid past.  For credentials that do not expire, use UINT64_MAX\n\n @return a valid credentials object, or NULL"] pub fn aws_credentials_new (allocator : * mut aws_allocator , access_key_id_cursor : aws_byte_cursor , secret_access_key_cursor : aws_byte_cursor , session_token_cursor : aws_byte_cursor , expiration_timepoint_seconds : u64) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Creates a new set of aws credentials with account_id\n\n @param allocator memory allocator to use\n @param access_key_id_cursor value for the aws access key id field\n @param secret_access_key_cursor value for the secret access key field\n @param session_token_cursor (optional) security token associated with the credentials\n @param account_id (optional) value for the account_id field\n @param expiration_timepoint_seconds timepoint, in seconds since epoch, that the credentials will no longer\n be valid past.  For credentials that do not expire, use UINT64_MAX\n\n @return a valid credentials object, or NULL"] pub fn aws_credentials_new_with_options (allocator : * mut aws_allocator , options : * const aws_credentials_options) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Creates a new set of aws anonymous credentials.\n Use Anonymous credentials, when you want to skip the signing process.\n\n @param allocator memory allocator to use\n\n @return a valid credentials object, or NULL"] pub fn aws_credentials_new_anonymous (allocator : * mut aws_allocator) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Creates a new set of AWS credentials\n\n @param allocator memory allocator to use\n @param access_key_id  value for the aws access key id field\n @param secret_access_key value for the secret access key field\n @param session_token (optional) security token associated with the credentials\n @param expiration_timepoint_seconds timepoint, in seconds since epoch, that the credentials will no longer\n be valid past.  For credentials that do not expire, use UINT64_MAX\n\n @return a valid credentials object, or NULL"] pub fn aws_credentials_new_from_string (allocator : * mut aws_allocator , access_key_id : * const aws_string , secret_access_key : * const aws_string , session_token : * const aws_string , expiration_timepoint_seconds : u64) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Creates a set of AWS credentials that includes an ECC key pair.  These credentials do not have a value for\n the secret access key; the ecc key takes over that field's role in sigv4a signing.\n\n @param allocator memory allocator to use for all memory allocations\n @param access_key_id access key id for the credential set\n @param ecc_key ecc key to use during signing when using these credentials\n @param session_token (optional) session token associated with the credentials\n @param expiration_timepoint_in_seconds (optional) if session-based, time at which these credentials expire\n @return a new pair of AWS credentials, or NULL"] pub fn aws_credentials_new_ecc (allocator : * mut aws_allocator , access_key_id : aws_byte_cursor , ecc_key : * mut aws_ecc_key_pair , session_token : aws_byte_cursor , expiration_timepoint_in_seconds : u64) -> * mut aws_credentials ; } unsafe extern "C" { pub fn aws_credentials_new_ecc_from_aws_credentials (allocator : * mut aws_allocator , credentials : * const aws_credentials) -> * mut aws_credentials ; } unsafe extern "C" { # [doc = " Add a reference to some credentials\n\n @param credentials credentials to increment the ref count on"] pub fn aws_credentials_acquire (credentials : * const aws_credentials) ; } unsafe extern "C" { # [doc = " Remove a reference to some credentials\n\n @param credentials credentials to decrement the ref count on"] pub fn aws_credentials_release (credentials : * const aws_credentials) ; } unsafe extern "C" { # [doc = " Get the AWS access key id from a set of credentials\n\n @param credentials credentials to get the access key id from\n @return a byte cursor to the access key id"] pub fn aws_credentials_get_access_key_id (credentials : * const aws_credentials) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the AWS secret access key from a set of credentials\n\n @param credentials credentials to get the secret access key from\n @return a byte cursor to the secret access key"] pub fn aws_credentials_get_secret_access_key (credentials : * const aws_credentials) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the AWS session token from a set of credentials\n\n @param credentials credentials to get the session token from\n @return a byte cursor to the session token or an empty byte cursor if there is no session token"] pub fn aws_credentials_get_session_token (credentials : * const aws_credentials) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the AWS account id from a set of credentials\n\n @param credentials to get the account id from\n @return a byte cursor to the account id or an empty byte cursor if there is no account id"] pub fn aws_credentials_get_account_id (credentials : * const aws_credentials) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the expiration timepoint (in seconds since epoch) associated with a set of credentials\n\n @param credentials credentials to get the expiration timepoint for\n @return the time, in seconds since epoch, the credentials will expire; UINT64_MAX for credentials\n without a specific expiration time"] pub fn aws_credentials_get_expiration_timepoint_seconds (credentials : * const aws_credentials) -> u64 ; } unsafe extern "C" { # [doc = " Get the elliptic curve key associated with this set of credentials\n @param credentials credentials to get the the elliptic curve key for\n @return the elliptic curve key associated with the credentials, or NULL if no key is associated with\n these credentials"] pub fn aws_credentials_get_ecc_key_pair (credentials : * const aws_credentials) -> * mut aws_ecc_key_pair ; } unsafe extern "C" { # [doc = " If credentials are anonymous, then the signing process is skipped.\n\n @param credentials credentials to check\n\n @return true if the credentials are anonymous; false otherwise."] pub fn aws_credentials_is_anonymous (credentials : * const aws_credentials) -> bool ; } unsafe extern "C" { # [doc = " Derives an ecc key pair (based on the nist P256 curve) from the access key id and secret access key components\n of a set of AWS credentials using an internal key derivation specification.  Used to perform sigv4a signing in\n the hybrid mode based on AWS credentials.\n\n @param allocator memory allocator to use for all memory allocations\n @param credentials AWS credentials to derive the ECC key from using the AWS sigv4a key derivation specification\n @return a new ecc key pair or NULL on failure"] pub fn aws_ecc_key_pair_new_ecdsa_p256_key_from_aws_credentials (allocator : * mut aws_allocator , credentials : * const aws_credentials) -> * mut aws_ecc_key_pair ; } unsafe extern "C" { # [doc = " Release a reference to a credentials provider\n\n @param provider provider to decrement the ref count on"] pub fn aws_credentials_provider_release (provider : * mut aws_credentials_provider) -> * mut aws_credentials_provider ; } unsafe extern "C" { pub fn aws_credentials_provider_acquire (provider : * mut aws_credentials_provider) -> * mut aws_credentials_provider ; } unsafe extern "C" { pub fn aws_credentials_provider_get_credentials (provider : * mut aws_credentials_provider , callback : aws_on_get_credentials_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Creates a simple provider that just returns a fixed set of credentials\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_static (allocator : * mut aws_allocator , options : * const aws_credentials_provider_static_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a simple anonymous credentials provider\n\n @param allocator memory allocator to use for all memory allocation\n @param shutdown_options an optional shutdown callback that gets\n invoked when the resources used by the provider are no longer in use.\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_anonymous (allocator : * mut aws_allocator , shutdown_options : * const aws_credentials_provider_shutdown_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that returns credentials sourced from the environment variables:\n\n AWS_ACCESS_KEY_ID\n AWS_SECRET_ACCESS_KEY\n AWS_SESSION_TOKEN\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_environment (allocator : * mut aws_allocator , options : * const aws_credentials_provider_environment_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that functions as a caching decorating of another provider.\n\n For example, the default chain is implemented as:\n\n CachedProvider -> ProviderChain(EnvironmentProvider -> ProfileProvider -> ECS/EC2IMD etc...)\n\n A reference is taken on the target provider\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_cached (allocator : * mut aws_allocator , options : * const aws_credentials_provider_cached_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from key-value profiles loaded from the aws credentials\n file (\"~/.aws/credentials\" by default) and the aws config file (\"~/.aws/config\" by\n default)\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_profile (allocator : * mut aws_allocator , options : * const aws_credentials_provider_profile_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that assumes an IAM role via. STS AssumeRole() API. This provider will fetch new credentials\n upon each call to aws_credentials_provider_get_credentials().\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_sts (allocator : * mut aws_allocator , options : * const aws_credentials_provider_sts_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from an ordered sequence of providers, with the overall result\n being from the first provider to return a valid set of credentials\n\n References are taken on all supplied providers\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_chain (allocator : * mut aws_allocator , options : * const aws_credentials_provider_chain_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from the ec2 instance metadata service\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_imds (allocator : * mut aws_allocator , options : * const aws_credentials_provider_imds_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from the ecs role credentials service and reads the required params from\n environment variables\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_ecs_from_environment (allocator : * mut aws_allocator , options : * const aws_credentials_provider_ecs_environment_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from the ecs role credentials service\n This function doesn't read anything from the environment and requires everything to be explicitly passed in.\n If you need to read properties from the environment, use the `aws_credentials_provider_new_ecs_from_environment`.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_ecs (allocator : * mut aws_allocator , options : * const aws_credentials_provider_ecs_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from IoT Core\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_x509 (allocator : * mut aws_allocator , options : * const aws_credentials_provider_x509_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from STS using AssumeRoleWithWebIdentity\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_sts_web_identity (allocator : * mut aws_allocator , options : * const aws_credentials_provider_sts_web_identity_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from SSO using a SSOToken.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_sso (allocator : * mut aws_allocator , options : * const aws_credentials_provider_sso_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { pub fn aws_credentials_provider_new_process (allocator : * mut aws_allocator , options : * const aws_credentials_provider_process_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Create a credentials provider depends on provided vtable to fetch the credentials.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_delegate (allocator : * mut aws_allocator , options : * const aws_credentials_provider_delegate_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from the Cognito-Identity service via an\n invocation of the GetCredentialsForIdentity API call.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_cognito (allocator : * mut aws_allocator , options : * const aws_credentials_provider_cognito_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a cognito-based provider that has a caching layer wrapped around it\n\n @param allocator memory allocator to use for all memory allocation\n @param options cognito-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_cognito_caching (allocator : * mut aws_allocator , options : * const aws_credentials_provider_cognito_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates a provider that sources credentials from AWS Login.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_login (allocator : * mut aws_allocator , options : * const aws_credentials_provider_login_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { # [doc = " Creates the default provider chain used by most AWS SDKs.\n\n Generally:\n\n (1) Environment\n (2) Profile\n    - STSCredentialsProvider\n    - ProcessCredentialsProvider\n    - ProfileCredentialsProvider\n (3) STS web identity\n (4) (conditional, off by default) ECS\n (5) (conditional, on by default) EC2 Instance Metadata\n\n Support for environmental control of the default provider chain is not yet\n implemented.\n\n @param allocator memory allocator to use for all memory allocation\n @param options provider-specific configuration options\n\n @return the newly-constructed credentials provider, or NULL if an error occurred."] pub fn aws_credentials_provider_new_chain_default (allocator : * mut aws_allocator , options : * const aws_credentials_provider_chain_default_options) -> * mut aws_credentials_provider ; } unsafe extern "C" { pub static mut g_aws_credentials_provider_http_function_table : * const aws_auth_http_system_vtable ; } pub const AWS_DATE_TIME_STR_MAX_LEN : _bindgen_ty_21 = _bindgen_ty_21 :: AWS_DATE_TIME_STR_MAX_LEN ; pub const AWS_DATE_TIME_STR_MAX_BASIC_LEN : _bindgen_ty_21 = _bindgen_ty_21 :: AWS_DATE_TIME_STR_MAX_BASIC_LEN ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_21 { AWS_DATE_TIME_STR_MAX_LEN = 100 , AWS_DATE_TIME_STR_MAX_BASIC_LEN = 20 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_date_format { AWS_DATE_FORMAT_RFC822 = 0 , AWS_DATE_FORMAT_ISO_8601 = 1 , AWS_DATE_FORMAT_ISO_8601_BASIC = 2 , AWS_DATE_FORMAT_AUTO_DETECT = 3 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_date_month { AWS_DATE_MONTH_JANUARY = 0 , AWS_DATE_MONTH_FEBRUARY = 1 , AWS_DATE_MONTH_MARCH = 2 , AWS_DATE_MONTH_APRIL = 3 , AWS_DATE_MONTH_MAY = 4 , AWS_DATE_MONTH_JUNE = 5 , AWS_DATE_MONTH_JULY = 6 , AWS_DATE_MONTH_AUGUST = 7 , AWS_DATE_MONTH_SEPTEMBER = 8 , AWS_DATE_MONTH_OCTOBER = 9 , AWS_DATE_MONTH_NOVEMBER = 10 , AWS_DATE_MONTH_DECEMBER = 11 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_date_day_of_week { AWS_DATE_DAY_OF_WEEK_SUNDAY = 0 , AWS_DATE_DAY_OF_WEEK_MONDAY = 1 , AWS_DATE_DAY_OF_WEEK_TUESDAY = 2 , AWS_DATE_DAY_OF_WEEK_WEDNESDAY = 3 , AWS_DATE_DAY_OF_WEEK_THURSDAY = 4 , AWS_DATE_DAY_OF_WEEK_FRIDAY = 5 , AWS_DATE_DAY_OF_WEEK_SATURDAY = 6 , } # [repr (C)] pub struct aws_date_time { pub timestamp : time_t , pub milliseconds : u16 , pub tz : [:: libc :: c_char ; 6usize] , pub gmt_time : tm , pub local_time : tm , pub utc_assumed : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_date_time"] [:: std :: mem :: size_of :: < aws_date_time > () - 136usize] ; ["Alignment of aws_date_time"] [:: std :: mem :: align_of :: < aws_date_time > () - 8usize] ; ["Offset of field: aws_date_time::timestamp"] [:: std :: mem :: offset_of ! (aws_date_time , timestamp) - 0usize] ; ["Offset of field: aws_date_time::milliseconds"] [:: std :: mem :: offset_of ! (aws_date_time , milliseconds) - 8usize] ; ["Offset of field: aws_date_time::tz"] [:: std :: mem :: offset_of ! (aws_date_time , tz) - 10usize] ; ["Offset of field: aws_date_time::gmt_time"] [:: std :: mem :: offset_of ! (aws_date_time , gmt_time) - 16usize] ; ["Offset of field: aws_date_time::local_time"] [:: std :: mem :: offset_of ! (aws_date_time , local_time) - 72usize] ; ["Offset of field: aws_date_time::utc_assumed"] [:: std :: mem :: offset_of ! (aws_date_time , utc_assumed) - 128usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Initializes dt to be the current system time."] pub fn aws_date_time_init_now (dt : * mut aws_date_time) ; } unsafe 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) ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Initializes dt to be the time represented by date_str in format 'fmt'. Returns AWS_OP_SUCCESS if the\n string was successfully parsed, returns  AWS_OP_ERR if parsing failed.\n\n The parser is lenient regarding AWS_DATE_FORMAT_ISO_8601 vs AWS_DATE_FORMAT_ISO_8601_BASIC.\n Regardless of which you pass in, both \"2002-10-02T08:05:09Z\" and \"20021002T080509Z\" would be accepted.\n\n Notes for AWS_DATE_FORMAT_RFC822:\n If no time zone information is provided, it is assumed to be local time (please don't do this).\n\n Only time zones indicating Universal Time (e.g. Z, UT, UTC, or GMT),\n or offsets from UTC (e.g. +0100, -0700), are accepted.\n\n 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) -> :: libc :: c_int ; } unsafe 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) -> :: libc :: c_int ; } unsafe 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\n return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not\n 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) -> :: libc :: c_int ; } unsafe 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\n return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not\n 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) -> :: libc :: c_int ; } unsafe 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\n will return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not\n 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) -> :: libc :: c_int ; } unsafe 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\n return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not\n 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) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_date_time_as_epoch_secs (dt : * const aws_date_time) -> f64 ; } unsafe extern "C" { pub fn aws_date_time_as_nanos (dt : * const aws_date_time) -> u64 ; } unsafe extern "C" { pub fn aws_date_time_as_millis (dt : * const aws_date_time) -> u64 ; } unsafe extern "C" { pub fn aws_date_time_year (dt : * const aws_date_time , local_time : bool) -> u16 ; } unsafe extern "C" { pub fn aws_date_time_month (dt : * const aws_date_time , local_time : bool) -> aws_date_month ; } unsafe extern "C" { pub fn aws_date_time_month_day (dt : * const aws_date_time , local_time : bool) -> u8 ; } unsafe extern "C" { pub fn aws_date_time_day_of_week (dt : * const aws_date_time , local_time : bool) -> aws_date_day_of_week ; } unsafe extern "C" { pub fn aws_date_time_hour (dt : * const aws_date_time , local_time : bool) -> u8 ; } unsafe extern "C" { pub fn aws_date_time_minute (dt : * const aws_date_time , local_time : bool) -> u8 ; } unsafe extern "C" { pub fn aws_date_time_second (dt : * const aws_date_time , local_time : bool) -> u8 ; } unsafe extern "C" { pub fn aws_date_time_dst (dt : * const aws_date_time , local_time : bool) -> bool ; } unsafe 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 ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_connection_manager { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_socket_options { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_tls_connection_options { _unused : [u8 ; 0] , } pub type aws_http_connection_manager_on_connection_setup_fn = :: std :: option :: Option < unsafe extern "C" fn (connection : * mut aws_http_connection , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_http_connection_manager_shutdown_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " Metrics for logging and debugging purpose."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http_manager_metrics { # [doc = " The number of additional concurrent requests that can be supported by the HTTP manager without needing to\n establish additional connections to the target server.\n\n For connection manager, it equals to connections that's idle.\n For stream manager, it equals to the number of streams that are possible to be made without creating new\n connection, although the implementation can create new connection without fully filling it."] pub available_concurrency : usize , pub pending_concurrency_acquires : usize , pub leased_concurrency : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_manager_metrics"] [:: std :: mem :: size_of :: < aws_http_manager_metrics > () - 24usize] ; ["Alignment of aws_http_manager_metrics"] [:: std :: mem :: align_of :: < aws_http_manager_metrics > () - 8usize] ; ["Offset of field: aws_http_manager_metrics::available_concurrency"] [:: std :: mem :: offset_of ! (aws_http_manager_metrics , available_concurrency) - 0usize] ; ["Offset of field: aws_http_manager_metrics::pending_concurrency_acquires"] [:: std :: mem :: offset_of ! (aws_http_manager_metrics , pending_concurrency_acquires) - 8usize] ; ["Offset of field: aws_http_manager_metrics::leased_concurrency"] [:: std :: mem :: offset_of ! (aws_http_manager_metrics , leased_concurrency) - 16usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_connection_manager_options { pub bootstrap : * mut aws_client_bootstrap , pub initial_window_size : usize , pub socket_options : * const aws_socket_options , # [doc = " Optional (ignored if 0).\n After a request is fully sent, if the server does not begin responding within N milliseconds,\n then fail with AWS_ERROR_HTTP_RESPONSE_FIRST_BYTE_TIMEOUT.\n This can be overridden per-request by aws_http_make_request_options.response_first_byte_timeout_ms.\n TODO: Only supported in HTTP/1.1 now, support it in HTTP/2"] pub response_first_byte_timeout_ms : u64 , # [doc = " Options to create secure (HTTPS) connections.\n For secure connections, set \"h2\" in the ALPN string for HTTP/2, otherwise HTTP/1.1 is used.\n\n Leave NULL to create cleartext (HTTP) connections.\n For cleartext connections, use `http2_prior_knowledge` (RFC-7540 3.4)\n to control whether that are treated as HTTP/1.1 or HTTP/2."] pub tls_connection_options : * const aws_tls_connection_options , # [doc = " Specify whether you have prior knowledge that cleartext (HTTP) connections are HTTP/2 (RFC-7540 3.4).\n If false, then cleartext connections are treated as HTTP/1.1.\n It is illegal to set this true when secure connections are being used.\n Note that upgrading from HTTP/1.1 to HTTP/2 is not supported (RFC-7540 3.2)."] pub http2_prior_knowledge : bool , pub monitoring_options : * const aws_http_connection_monitoring_options , pub host : aws_byte_cursor , pub port : u32 , # [doc = " Optional.\n HTTP/2 specific configuration. Check `struct aws_http2_connection_options` for details of each config"] pub initial_settings_array : * const aws_http2_setting , pub num_initial_settings : usize , pub max_closed_streams : usize , pub http2_conn_manual_window_management : bool , pub proxy_options : * const aws_http_proxy_options , pub proxy_ev_settings : * const proxy_env_var_settings , pub max_connections : usize , pub shutdown_complete_user_data : * mut :: libc :: c_void , pub shutdown_complete_callback : aws_http_connection_manager_shutdown_complete_fn , # [doc = " If set to true, the read back pressure mechanism will be enabled."] pub enable_read_back_pressure : bool , # [doc = " If set to a non-zero value, then connections that stay in the pool longer than the specified\n timeout will be closed automatically."] pub max_connection_idle_in_milliseconds : u64 , # [doc = " If set to a non-zero value, aws_http_connection_manager_acquire_connection() calls\n will give up after waiting this long for a connection from the pool,\n failing with error AWS_ERROR_HTTP_CONNECTION_MANAGER_ACQUISITION_TIMEOUT."] pub connection_acquisition_timeout_ms : u64 , pub max_pending_connection_acquisitions : u64 , # [doc = " THIS IS AN EXPERIMENTAL AND UNSTABLE API\n (Optional)\n An array of network interface names. The manager will distribute the\n connections across network interface names provided in this array. If any interface name is invalid, goes down,\n or has any issues like network access, you will see connection failures. If\n `socket_options.network_interface_name` is also set, an `AWS_ERROR_INVALID_ARGUMENT` error will be raised.\n\n This option is only supported on Linux, MacOS, and platforms that have either SO_BINDTODEVICE or IP_BOUND_IF. It\n is not supported on Windows. `AWS_ERROR_PLATFORM_NOT_SUPPORTED` will be raised on unsupported platforms."] pub network_interface_names_array : * const aws_byte_cursor , pub num_network_interface_names : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_connection_manager_options"] [:: std :: mem :: size_of :: < aws_http_connection_manager_options > () - 200usize] ; ["Alignment of aws_http_connection_manager_options"] [:: std :: mem :: align_of :: < aws_http_connection_manager_options > () - 8usize] ; ["Offset of field: aws_http_connection_manager_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , bootstrap) - 0usize] ; ["Offset of field: aws_http_connection_manager_options::initial_window_size"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , initial_window_size) - 8usize] ; ["Offset of field: aws_http_connection_manager_options::socket_options"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , socket_options) - 16usize] ; ["Offset of field: aws_http_connection_manager_options::response_first_byte_timeout_ms"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , response_first_byte_timeout_ms) - 24usize] ; ["Offset of field: aws_http_connection_manager_options::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , tls_connection_options) - 32usize] ; ["Offset of field: aws_http_connection_manager_options::http2_prior_knowledge"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , http2_prior_knowledge) - 40usize] ; ["Offset of field: aws_http_connection_manager_options::monitoring_options"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , monitoring_options) - 48usize] ; ["Offset of field: aws_http_connection_manager_options::host"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , host) - 56usize] ; ["Offset of field: aws_http_connection_manager_options::port"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , port) - 72usize] ; ["Offset of field: aws_http_connection_manager_options::initial_settings_array"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , initial_settings_array) - 80usize] ; ["Offset of field: aws_http_connection_manager_options::num_initial_settings"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , num_initial_settings) - 88usize] ; ["Offset of field: aws_http_connection_manager_options::max_closed_streams"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , max_closed_streams) - 96usize] ; ["Offset of field: aws_http_connection_manager_options::http2_conn_manual_window_management"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , http2_conn_manual_window_management) - 104usize] ; ["Offset of field: aws_http_connection_manager_options::proxy_options"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , proxy_options) - 112usize] ; ["Offset of field: aws_http_connection_manager_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , proxy_ev_settings) - 120usize] ; ["Offset of field: aws_http_connection_manager_options::max_connections"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , max_connections) - 128usize] ; ["Offset of field: aws_http_connection_manager_options::shutdown_complete_user_data"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , shutdown_complete_user_data) - 136usize] ; ["Offset of field: aws_http_connection_manager_options::shutdown_complete_callback"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , shutdown_complete_callback) - 144usize] ; ["Offset of field: aws_http_connection_manager_options::enable_read_back_pressure"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , enable_read_back_pressure) - 152usize] ; ["Offset of field: aws_http_connection_manager_options::max_connection_idle_in_milliseconds"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , max_connection_idle_in_milliseconds) - 160usize] ; ["Offset of field: aws_http_connection_manager_options::connection_acquisition_timeout_ms"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , connection_acquisition_timeout_ms) - 168usize] ; ["Offset of field: aws_http_connection_manager_options::max_pending_connection_acquisitions"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , max_pending_connection_acquisitions) - 176usize] ; ["Offset of field: aws_http_connection_manager_options::network_interface_names_array"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , network_interface_names_array) - 184usize] ; ["Offset of field: aws_http_connection_manager_options::num_network_interface_names"] [:: std :: mem :: offset_of ! (aws_http_connection_manager_options , num_network_interface_names) - 192usize] ; } ; impl Default for aws_http_connection_manager_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 () } } } unsafe extern "C" { pub fn aws_http_connection_manager_acquire (manager : * mut aws_http_connection_manager) ; } unsafe extern "C" { pub fn aws_http_connection_manager_release (manager : * mut aws_http_connection_manager) ; } unsafe extern "C" { pub fn aws_http_connection_manager_new (allocator : * mut aws_allocator , options : * const aws_http_connection_manager_options) -> * mut aws_http_connection_manager ; } unsafe extern "C" { pub fn aws_http_connection_manager_acquire_connection (manager : * mut aws_http_connection_manager , callback : aws_http_connection_manager_on_connection_setup_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_http_connection_manager_release_connection (manager : * mut aws_http_connection_manager , connection : * mut aws_http_connection) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Fetch the current manager metrics from connection manager."] pub fn aws_http_connection_manager_fetch_metrics (manager : * const aws_http_connection_manager , out_metrics : * mut aws_http_manager_metrics) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop_group { _unused : [u8 ; 0] , } # [doc = " Invoked upon the acquisition, or failure to acquire a retry token. This function will always be invoked if and only\n if aws_retry_strategy_acquire_retry_token() returns AWS_OP_SUCCESS. It will never be invoked synchronously from\n aws_retry_strategy_acquire_retry_token(). Token will always be NULL if error_code is non-zero, and vice-versa. If\n token is non-null, it will have a reference count of 1, and you must call aws_retry_token_release() on it later. See\n the comments for aws_retry_strategy_on_retry_ready_fn for more info."] pub type aws_retry_strategy_on_retry_token_acquired_fn = :: std :: option :: Option < unsafe extern "C" fn (retry_strategy : * mut aws_retry_strategy , error_code : :: libc :: c_int , token : * mut aws_retry_token , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked after a successful call to aws_retry_strategy_schedule_retry(). This function will always be invoked if and\n only if aws_retry_strategy_schedule_retry() returns AWS_OP_SUCCESS. It will never be invoked synchronously from\n aws_retry_strategy_schedule_retry(). After attempting the operation, either call aws_retry_strategy_schedule_retry()\n with an aws_retry_error_type or call aws_retry_token_record_success() and then release the token via.\n aws_retry_token_release()."] pub type aws_retry_strategy_on_retry_ready_fn = :: std :: option :: Option < unsafe extern "C" fn (token : * mut aws_retry_token , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Optional function to supply your own generate random implementation"] pub type aws_generate_random_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) -> u64 > ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_retry_error_type { # [doc = " This is a connection level error such as a socket timeout, socket connect error, tls negotiation timeout etc...\n Typically these should never be applied for non-idempotent request types since in this scenario, it's impossible\n to know whether the operation had a side effect on the server."] AWS_RETRY_ERROR_TYPE_TRANSIENT = 0 , # [doc = " This is an error where the server explicitly told the client to back off, such as a 429 or 503 Http error."] AWS_RETRY_ERROR_TYPE_THROTTLING = 1 , # [doc = " This is a server error that isn't explicitly throttling but is considered by the client\n to be something that should be retried."] AWS_RETRY_ERROR_TYPE_SERVER_ERROR = 2 , # [doc = " Doesn't count against any budgets. This could be something like a 401 challenge in Http."] AWS_RETRY_ERROR_TYPE_CLIENT_ERROR = 3 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_retry_strategy_vtable { pub destroy : :: std :: option :: Option < unsafe extern "C" fn (retry_strategy : * mut aws_retry_strategy) > , pub acquire_token : :: std :: option :: Option < unsafe extern "C" fn (retry_strategy : * mut aws_retry_strategy , partition_id : * const aws_byte_cursor , on_acquired : aws_retry_strategy_on_retry_token_acquired_fn , user_data : * mut :: libc :: c_void , timeout_ms : u64) -> :: libc :: c_int > , pub schedule_retry : :: std :: option :: Option < unsafe extern "C" fn (token : * mut aws_retry_token , error_type : aws_retry_error_type , retry_ready : aws_retry_strategy_on_retry_ready_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > , pub record_success : :: std :: option :: Option < unsafe extern "C" fn (token : * mut aws_retry_token) -> :: libc :: c_int > , pub release_token : :: std :: option :: Option < unsafe extern "C" fn (token : * mut aws_retry_token) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_retry_strategy_vtable"] [:: std :: mem :: size_of :: < aws_retry_strategy_vtable > () - 40usize] ; ["Alignment of aws_retry_strategy_vtable"] [:: std :: mem :: align_of :: < aws_retry_strategy_vtable > () - 8usize] ; ["Offset of field: aws_retry_strategy_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , destroy) - 0usize] ; ["Offset of field: aws_retry_strategy_vtable::acquire_token"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , acquire_token) - 8usize] ; ["Offset of field: aws_retry_strategy_vtable::schedule_retry"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , schedule_retry) - 16usize] ; ["Offset of field: aws_retry_strategy_vtable::record_success"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , record_success) - 24usize] ; ["Offset of field: aws_retry_strategy_vtable::release_token"] [:: std :: mem :: offset_of ! (aws_retry_strategy_vtable , release_token) - 32usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_retry_strategy { pub allocator : * mut aws_allocator , pub vtable : * mut aws_retry_strategy_vtable , pub ref_count : aws_atomic_var , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_retry_strategy"] [:: std :: mem :: size_of :: < aws_retry_strategy > () - 32usize] ; ["Alignment of aws_retry_strategy"] [:: std :: mem :: align_of :: < aws_retry_strategy > () - 8usize] ; ["Offset of field: aws_retry_strategy::allocator"] [:: std :: mem :: offset_of ! (aws_retry_strategy , allocator) - 0usize] ; ["Offset of field: aws_retry_strategy::vtable"] [:: std :: mem :: offset_of ! (aws_retry_strategy , vtable) - 8usize] ; ["Offset of field: aws_retry_strategy::ref_count"] [:: std :: mem :: offset_of ! (aws_retry_strategy , ref_count) - 16usize] ; ["Offset of field: aws_retry_strategy::impl_"] [:: std :: mem :: offset_of ! (aws_retry_strategy , impl_) - 24usize] ; } ; impl Default for aws_retry_strategy { 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)] pub struct aws_retry_token { pub allocator : * mut aws_allocator , pub retry_strategy : * mut aws_retry_strategy , pub ref_count : aws_atomic_var , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_retry_token"] [:: std :: mem :: size_of :: < aws_retry_token > () - 32usize] ; ["Alignment of aws_retry_token"] [:: std :: mem :: align_of :: < aws_retry_token > () - 8usize] ; ["Offset of field: aws_retry_token::allocator"] [:: std :: mem :: offset_of ! (aws_retry_token , allocator) - 0usize] ; ["Offset of field: aws_retry_token::retry_strategy"] [:: std :: mem :: offset_of ! (aws_retry_token , retry_strategy) - 8usize] ; ["Offset of field: aws_retry_token::ref_count"] [:: std :: mem :: offset_of ! (aws_retry_token , ref_count) - 16usize] ; ["Offset of field: aws_retry_token::impl_"] [:: std :: mem :: offset_of ! (aws_retry_token , impl_) - 24usize] ; } ; impl Default for aws_retry_token { 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 (u32)] # [non_exhaustive] # [doc = " Jitter mode for exponential backoff.\n\n For a great writeup on these options see:\n https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_exponential_backoff_jitter_mode { AWS_EXPONENTIAL_BACKOFF_JITTER_DEFAULT = 0 , AWS_EXPONENTIAL_BACKOFF_JITTER_NONE = 1 , AWS_EXPONENTIAL_BACKOFF_JITTER_FULL = 2 , AWS_EXPONENTIAL_BACKOFF_JITTER_DECORRELATED = 3 , } # [doc = " Options for exponential backoff retry strategy. el_group must be set, any other option, if set to 0 will signify\n \"use defaults\""] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_exponential_backoff_retry_options { pub el_group : * mut aws_event_loop_group , pub max_retries : usize , pub backoff_scale_factor_ms : u32 , pub max_backoff_secs : u32 , # [doc = " Jitter mode to use, see comments for aws_exponential_backoff_jitter_mode.\n Default is AWS_EXPONENTIAL_BACKOFF_JITTER_DEFAULT"] pub jitter_mode : aws_exponential_backoff_jitter_mode , # [doc = " Deprecated. Use generate_random_impl instead\n By default this will be set to use aws_device_random. If you want something else, set it here."] pub generate_random : :: std :: option :: Option < unsafe extern "C" fn () -> u64 > , pub generate_random_impl : aws_generate_random_fn , # [doc = " Optional user data for the generate random generate_random_impl."] pub generate_random_user_data : * mut :: libc :: c_void , # [doc = " Optional shutdown callback that gets invoked, with appropriate user data,\n when the resources used by the retry_strategy are no longer in use."] pub shutdown_options : * const aws_shutdown_callback_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_exponential_backoff_retry_options"] [:: std :: mem :: size_of :: < aws_exponential_backoff_retry_options > () - 64usize] ; ["Alignment of aws_exponential_backoff_retry_options"] [:: std :: mem :: align_of :: < aws_exponential_backoff_retry_options > () - 8usize] ; ["Offset of field: aws_exponential_backoff_retry_options::el_group"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , el_group) - 0usize] ; ["Offset of field: aws_exponential_backoff_retry_options::max_retries"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , max_retries) - 8usize] ; ["Offset of field: aws_exponential_backoff_retry_options::backoff_scale_factor_ms"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , backoff_scale_factor_ms) - 16usize] ; ["Offset of field: aws_exponential_backoff_retry_options::max_backoff_secs"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , max_backoff_secs) - 20usize] ; ["Offset of field: aws_exponential_backoff_retry_options::jitter_mode"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , jitter_mode) - 24usize] ; ["Offset of field: aws_exponential_backoff_retry_options::generate_random"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , generate_random) - 32usize] ; ["Offset of field: aws_exponential_backoff_retry_options::generate_random_impl"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , generate_random_impl) - 40usize] ; ["Offset of field: aws_exponential_backoff_retry_options::generate_random_user_data"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , generate_random_user_data) - 48usize] ; ["Offset of field: aws_exponential_backoff_retry_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_exponential_backoff_retry_options , shutdown_options) - 56usize] ; } ; impl Default for aws_exponential_backoff_retry_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)] pub struct aws_no_retry_options { # [doc = " Optional shutdown callback that gets invoked, with appropriate user data,\n when the resources used by the retry_strategy are no longer in use."] pub shutdown_options : * const aws_shutdown_callback_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_no_retry_options"] [:: std :: mem :: size_of :: < aws_no_retry_options > () - 8usize] ; ["Alignment of aws_no_retry_options"] [:: std :: mem :: align_of :: < aws_no_retry_options > () - 8usize] ; ["Offset of field: aws_no_retry_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_no_retry_options , shutdown_options) - 0usize] ; } ; impl Default for aws_no_retry_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)] pub struct aws_standard_retry_options { pub backoff_retry_options : aws_exponential_backoff_retry_options , # [doc = " capacity for partitions. Defaults to 500"] pub initial_bucket_capacity : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_standard_retry_options"] [:: std :: mem :: size_of :: < aws_standard_retry_options > () - 72usize] ; ["Alignment of aws_standard_retry_options"] [:: std :: mem :: align_of :: < aws_standard_retry_options > () - 8usize] ; ["Offset of field: aws_standard_retry_options::backoff_retry_options"] [:: std :: mem :: offset_of ! (aws_standard_retry_options , backoff_retry_options) - 0usize] ; ["Offset of field: aws_standard_retry_options::initial_bucket_capacity"] [:: std :: mem :: offset_of ! (aws_standard_retry_options , initial_bucket_capacity) - 64usize] ; } ; impl Default for aws_standard_retry_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 () } } } unsafe extern "C" { # [doc = " Acquire a reference count on retry_strategy."] pub fn aws_retry_strategy_acquire (retry_strategy : * mut aws_retry_strategy) ; } unsafe extern "C" { # [doc = " Releases a reference count on retry_strategy."] pub fn aws_retry_strategy_release (retry_strategy : * mut aws_retry_strategy) ; } unsafe extern "C" { # [doc = " Attempts to acquire a retry token for use with retries. On success, on_acquired will be invoked when a token is\n available, or an error will be returned if the timeout expires. partition_id identifies operations that should be\n grouped together. This allows for more sophisticated strategies such as AIMD and circuit breaker patterns. Pass NULL\n to use the global partition."] pub fn aws_retry_strategy_acquire_retry_token (retry_strategy : * mut aws_retry_strategy , partition_id : * const aws_byte_cursor , on_acquired : aws_retry_strategy_on_retry_token_acquired_fn , user_data : * mut :: libc :: c_void , timeout_ms : u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Schedules a retry based on the backoff and token based strategies. retry_ready is invoked when the retry is either\n ready for execution or if it has been canceled due to application shutdown.\n\n This function can return an error to reject the retry attempt if, for example, a circuit breaker has opened. If this\n occurs users should fail their calls back to their callers.\n\n error_type is used for book keeping. See the comments above for aws_retry_error_type."] pub fn aws_retry_strategy_schedule_retry (token : * mut aws_retry_token , error_type : aws_retry_error_type , retry_ready : aws_retry_strategy_on_retry_ready_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Records a successful retry. This is used for making future decisions to open up token buckets, AIMD breakers etc...\n some strategies such as exponential backoff will ignore this, but you should always call it after a successful\n operation or your system will never recover during an outage."] pub fn aws_retry_token_record_success (token : * mut aws_retry_token) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Increments reference count for token. This should be called any time you seat the token to a pointer you own."] pub fn aws_retry_token_acquire (token : * mut aws_retry_token) ; } unsafe extern "C" { # [doc = " Releases the reference count for token. This should always be invoked after either calling\n aws_retry_strategy_schedule_retry() and failing, or after calling aws_retry_token_record_success()."] pub fn aws_retry_token_release (token : * mut aws_retry_token) ; } unsafe extern "C" { # [doc = " Creates a retry strategy using exponential backoff. This strategy does not perform any bookkeeping on error types and\n success. There is no circuit breaker functionality in here. See the comments above for\n aws_exponential_backoff_retry_options."] pub fn aws_retry_strategy_new_exponential_backoff (allocator : * mut aws_allocator , config : * const aws_exponential_backoff_retry_options) -> * mut aws_retry_strategy ; } unsafe extern "C" { # [doc = " This is a retry implementation that cuts off traffic if it's\n detected that an endpoint partition is having availability\n problems. This is necessary to keep from making outages worse\n by scheduling work that's unlikely to succeed yet increases\n load on an already ailing system.\n\n We do this by creating a bucket for each partition. A partition\n is an arbitrary specifier. It can be anything: a region, a service,\n a combination of region and service, a literal dns name.... doesn't matter.\n\n Each bucket has a budget for maximum allowed retries. Different types of events\n carry different weights. Things that indicate an unhealthy partition such as\n transient errors (timeouts, unhealthy connection etc...) cost more.\n A retry for any other reason (service sending a 5xx response code) cost a bit less.\n When a retry is attempted this capacity is leased out to the retry. On success it is\n released back to the capacity pool. On failure, it remains leased.\n Operations that succeed without a retry slowly restore the capacity pool.\n\n If a partition runs out of capacity it is assumed unhealthy and retries will be blocked\n until capacity returns to the pool. To prevent a partition from staying unhealthy after\n an outage has recovered, new requests that succeed without a retry will increase the capacity\n slowly ( a new request gets a payback lease of 1, but the lease is never actually deducted from the capacity pool)."] pub fn aws_retry_strategy_new_standard (allocator : * mut aws_allocator , config : * const aws_standard_retry_options) -> * mut aws_retry_strategy ; } unsafe extern "C" { # [doc = " This retry strategy is used to disable retries. Passed config can be null.\n Calling `aws_retry_strategy_acquire_retry_token` will raise error `AWS_IO_RETRY_PERMISSION_DENIED`.\n Calling any function apart from the `aws_retry_strategy_acquire_retry_token` and `aws_retry_strategy_release` will\n result in a fatal error."] pub fn aws_retry_strategy_new_no_retry (allocator : * mut aws_allocator , config : * const aws_no_retry_options) -> * mut aws_retry_strategy ; } pub type aws_imds_client_shutdown_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " Optional callback and user data to be invoked when an imds client has fully shut down"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_imds_client_shutdown_options { pub shutdown_callback : aws_imds_client_shutdown_completed_fn , pub shutdown_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_imds_client_shutdown_options"] [:: std :: mem :: size_of :: < aws_imds_client_shutdown_options > () - 16usize] ; ["Alignment of aws_imds_client_shutdown_options"] [:: std :: mem :: align_of :: < aws_imds_client_shutdown_options > () - 8usize] ; ["Offset of field: aws_imds_client_shutdown_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_imds_client_shutdown_options , shutdown_callback) - 0usize] ; ["Offset of field: aws_imds_client_shutdown_options::shutdown_user_data"] [:: std :: mem :: offset_of ! (aws_imds_client_shutdown_options , shutdown_user_data) - 8usize] ; } ; impl Default for aws_imds_client_shutdown_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 () } } } # [doc = " Configuration options when creating an imds client"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_imds_client_options { pub shutdown_options : aws_imds_client_shutdown_options , pub bootstrap : * mut aws_client_bootstrap , pub retry_strategy : * mut aws_retry_strategy , pub proxy_ev_settings : * const proxy_env_var_settings , pub imds_version : aws_imds_protocol_version , pub ec2_metadata_v1_disabled : bool , pub function_table : * mut aws_auth_http_system_vtable , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_imds_client_options"] [:: std :: mem :: size_of :: < aws_imds_client_options > () - 56usize] ; ["Alignment of aws_imds_client_options"] [:: std :: mem :: align_of :: < aws_imds_client_options > () - 8usize] ; ["Offset of field: aws_imds_client_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_imds_client_options , shutdown_options) - 0usize] ; ["Offset of field: aws_imds_client_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_imds_client_options , bootstrap) - 16usize] ; ["Offset of field: aws_imds_client_options::retry_strategy"] [:: std :: mem :: offset_of ! (aws_imds_client_options , retry_strategy) - 24usize] ; ["Offset of field: aws_imds_client_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_imds_client_options , proxy_ev_settings) - 32usize] ; ["Offset of field: aws_imds_client_options::imds_version"] [:: std :: mem :: offset_of ! (aws_imds_client_options , imds_version) - 40usize] ; ["Offset of field: aws_imds_client_options::ec2_metadata_v1_disabled"] [:: std :: mem :: offset_of ! (aws_imds_client_options , ec2_metadata_v1_disabled) - 44usize] ; ["Offset of field: aws_imds_client_options::function_table"] [:: std :: mem :: offset_of ! (aws_imds_client_options , function_table) - 48usize] ; } ; impl Default for aws_imds_client_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_imds_client_on_get_resource_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (resource : * const aws_byte_buf , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-categories.html"] # [repr (C)] pub struct aws_imds_iam_profile { pub last_updated : aws_date_time , pub instance_profile_arn : aws_byte_cursor , pub instance_profile_id : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_imds_iam_profile"] [:: std :: mem :: size_of :: < aws_imds_iam_profile > () - 168usize] ; ["Alignment of aws_imds_iam_profile"] [:: std :: mem :: align_of :: < aws_imds_iam_profile > () - 8usize] ; ["Offset of field: aws_imds_iam_profile::last_updated"] [:: std :: mem :: offset_of ! (aws_imds_iam_profile , last_updated) - 0usize] ; ["Offset of field: aws_imds_iam_profile::instance_profile_arn"] [:: std :: mem :: offset_of ! (aws_imds_iam_profile , instance_profile_arn) - 136usize] ; ["Offset of field: aws_imds_iam_profile::instance_profile_id"] [:: std :: mem :: offset_of ! (aws_imds_iam_profile , instance_profile_id) - 152usize] ; } ; impl Default for aws_imds_iam_profile { 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 = " Block of per-instance EC2-specific data\n\n https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html"] # [repr (C)] pub struct aws_imds_instance_info { pub marketplace_product_codes : aws_array_list , pub availability_zone : aws_byte_cursor , pub private_ip : aws_byte_cursor , pub version : aws_byte_cursor , pub instance_id : aws_byte_cursor , pub billing_products : aws_array_list , pub instance_type : aws_byte_cursor , pub account_id : aws_byte_cursor , pub image_id : aws_byte_cursor , pub pending_time : aws_date_time , pub architecture : aws_byte_cursor , pub kernel_id : aws_byte_cursor , pub ramdisk_id : aws_byte_cursor , pub region : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_imds_instance_info"] [:: std :: mem :: size_of :: < aws_imds_instance_info > () - 392usize] ; ["Alignment of aws_imds_instance_info"] [:: std :: mem :: align_of :: < aws_imds_instance_info > () - 8usize] ; ["Offset of field: aws_imds_instance_info::marketplace_product_codes"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , marketplace_product_codes) - 0usize] ; ["Offset of field: aws_imds_instance_info::availability_zone"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , availability_zone) - 40usize] ; ["Offset of field: aws_imds_instance_info::private_ip"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , private_ip) - 56usize] ; ["Offset of field: aws_imds_instance_info::version"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , version) - 72usize] ; ["Offset of field: aws_imds_instance_info::instance_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , instance_id) - 88usize] ; ["Offset of field: aws_imds_instance_info::billing_products"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , billing_products) - 104usize] ; ["Offset of field: aws_imds_instance_info::instance_type"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , instance_type) - 144usize] ; ["Offset of field: aws_imds_instance_info::account_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , account_id) - 160usize] ; ["Offset of field: aws_imds_instance_info::image_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , image_id) - 176usize] ; ["Offset of field: aws_imds_instance_info::pending_time"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , pending_time) - 192usize] ; ["Offset of field: aws_imds_instance_info::architecture"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , architecture) - 328usize] ; ["Offset of field: aws_imds_instance_info::kernel_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , kernel_id) - 344usize] ; ["Offset of field: aws_imds_instance_info::ramdisk_id"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , ramdisk_id) - 360usize] ; ["Offset of field: aws_imds_instance_info::region"] [:: std :: mem :: offset_of ! (aws_imds_instance_info , region) - 376usize] ; } ; impl Default for aws_imds_instance_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 () } } } pub type aws_imds_client_on_get_array_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (array : * const aws_array_list , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_imds_client_on_get_credentials_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (credentials : * const aws_credentials , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_imds_client_on_get_iam_profile_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (iam_profile_info : * const aws_imds_iam_profile , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_imds_client_on_get_instance_info_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (instance_info : * const aws_imds_instance_info , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " AWS EC2 Metadata Client is used to retrieve AWS EC2 Instance Metadata info."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_imds_client { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " Creates a new imds client\n\n @param allocator memory allocator to use for creation and queries\n @param options configuration options for the imds client\n\n @return a newly-constructed imds client, or NULL on failure"] pub fn aws_imds_client_new (allocator : * mut aws_allocator , options : * const aws_imds_client_options) -> * mut aws_imds_client ; } unsafe extern "C" { # [doc = " Increments the ref count on the client\n\n @param client imds client to acquire a reference to"] pub fn aws_imds_client_acquire (client : * mut aws_imds_client) ; } unsafe extern "C" { # [doc = " Decrements the ref count on the client\n\n @param client imds client to release a reference to"] pub fn aws_imds_client_release (client : * mut aws_imds_client) ; } unsafe extern "C" { # [doc = " Queries a generic resource (string) from the ec2 instance metadata document\n\n @param client imds client to use for the query\n @param resource_path path of the resource to query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_resource_async (client : * mut aws_imds_client , resource_path : aws_byte_cursor , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the ami id of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ami_id (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the ami launch index of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ami_launch_index (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the ami manifest path of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ami_manifest_path (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the list of ancestor ami ids of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ancestor_ami_ids (client : * mut aws_imds_client , callback : aws_imds_client_on_get_array_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the instance-action of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_action (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the instance id of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_id (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the instance type of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_type (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the mac address of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_mac_address (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the private ip address of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_private_ip_address (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the availability zone of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_availability_zone (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the product codes of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_product_codes (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the public key of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_public_key (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the ramdisk id of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_ramdisk_id (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the reservation id of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_reservation_id (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the list of the security groups of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_security_groups (client : * mut aws_imds_client , callback : aws_imds_client_on_get_array_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the list of block device mappings of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_block_device_mapping (client : * mut aws_imds_client , callback : aws_imds_client_on_get_array_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the attached iam role of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_attached_iam_role (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets temporary credentials based on the attached iam role of the ec2 instance\n\n @param client imds client to use for the query\n @param iam_role_name iam role name to get temporary credentials through\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_credentials (client : * mut aws_imds_client , iam_role_name : aws_byte_cursor , callback : aws_imds_client_on_get_credentials_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the iam profile information of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_iam_profile (client : * mut aws_imds_client , callback : aws_imds_client_on_get_iam_profile_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the user data of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_user_data (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the signature of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_signature (client : * mut aws_imds_client , callback : aws_imds_client_on_get_resource_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Gets the instance information data block of the ec2 instance from the instance metadata document\n\n @param client imds client to use for the query\n @param callback callback function to invoke on query success or failure\n @param user_data opaque data to invoke the completion callback with\n @return AWS_OP_SUCCESS if the query was successfully started, AWS_OP_ERR otherwise"] pub fn aws_imds_client_get_instance_info (client : * mut aws_imds_client , callback : aws_imds_client_on_get_instance_info_callback_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_hash_vtable { pub alg_name : * const :: libc :: c_char , pub provider : * const :: libc :: c_char , pub destroy : :: std :: option :: Option < unsafe extern "C" fn (hash : * mut aws_hash) > , pub update : :: std :: option :: Option < unsafe extern "C" fn (hash : * mut aws_hash , buf : * const aws_byte_cursor) -> :: libc :: c_int > , pub finalize : :: std :: option :: Option < unsafe extern "C" fn (hash : * mut aws_hash , out : * mut aws_byte_buf) -> :: libc :: c_int > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash_vtable"] [:: std :: mem :: size_of :: < aws_hash_vtable > () - 40usize] ; ["Alignment of aws_hash_vtable"] [:: std :: mem :: align_of :: < aws_hash_vtable > () - 8usize] ; ["Offset of field: aws_hash_vtable::alg_name"] [:: std :: mem :: offset_of ! (aws_hash_vtable , alg_name) - 0usize] ; ["Offset of field: aws_hash_vtable::provider"] [:: std :: mem :: offset_of ! (aws_hash_vtable , provider) - 8usize] ; ["Offset of field: aws_hash_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_hash_vtable , destroy) - 16usize] ; ["Offset of field: aws_hash_vtable::update"] [:: std :: mem :: offset_of ! (aws_hash_vtable , update) - 24usize] ; ["Offset of field: aws_hash_vtable::finalize"] [:: std :: mem :: offset_of ! (aws_hash_vtable , finalize) - 32usize] ; } ; impl Default for aws_hash_vtable { 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)] pub struct aws_hash { pub allocator : * mut aws_allocator , pub vtable : * mut aws_hash_vtable , pub digest_size : usize , pub good : bool , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash"] [:: std :: mem :: size_of :: < aws_hash > () - 40usize] ; ["Alignment of aws_hash"] [:: std :: mem :: align_of :: < aws_hash > () - 8usize] ; ["Offset of field: aws_hash::allocator"] [:: std :: mem :: offset_of ! (aws_hash , allocator) - 0usize] ; ["Offset of field: aws_hash::vtable"] [:: std :: mem :: offset_of ! (aws_hash , vtable) - 8usize] ; ["Offset of field: aws_hash::digest_size"] [:: std :: mem :: offset_of ! (aws_hash , digest_size) - 16usize] ; ["Offset of field: aws_hash::good"] [:: std :: mem :: offset_of ! (aws_hash , good) - 24usize] ; ["Offset of field: aws_hash::impl_"] [:: std :: mem :: offset_of ! (aws_hash , impl_) - 32usize] ; } ; impl Default for aws_hash { 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_hash_new_fn = :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator) -> * mut aws_hash > ; unsafe extern "C" { # [doc = " Allocates and initializes a sha512 hash instance."] pub fn aws_sha512_new (allocator : * mut aws_allocator) -> * mut aws_hash ; } unsafe extern "C" { # [doc = " Allocates and initializes a sha256 hash instance."] pub fn aws_sha256_new (allocator : * mut aws_allocator) -> * mut aws_hash ; } unsafe extern "C" { # [doc = " Allocates and initializes a sha1 hash instance."] pub fn aws_sha1_new (allocator : * mut aws_allocator) -> * mut aws_hash ; } unsafe extern "C" { # [doc = " Allocates and initializes an md5 hash instance."] pub fn aws_md5_new (allocator : * mut aws_allocator) -> * mut aws_hash ; } unsafe extern "C" { # [doc = " Cleans up and deallocates hash."] pub fn aws_hash_destroy (hash : * mut aws_hash) ; } unsafe extern "C" { # [doc = " Updates the running hash with to_hash. this can be called multiple times."] pub fn aws_hash_update (hash : * mut aws_hash , to_hash : * const aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Completes the hash computation and writes the final digest to output.\n Allocation of output is the caller's responsibility. If you specify\n truncate_to to something other than 0, the output will be truncated to that\n number of bytes. For example, if you want a SHA256 digest as the first 16\n bytes, set truncate_to to 16. If you want the full digest size, just set this\n to 0."] pub fn aws_hash_finalize (hash : * mut aws_hash , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Computes the md5 hash over input and writes the digest output to 'output'.\n Use this if you don't need to stream the data you're hashing and you can load\n the entire input to hash into memory."] pub fn aws_md5_compute (allocator : * mut aws_allocator , input : * const aws_byte_cursor , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Computes the sha512 hash over input and writes the digest output to 'output'.\n Use this if you don't need to stream the data you're hashing and you can load\n the entire input to hash into memory. If you specify truncate_to to something\n other than 0, the output will be truncated to that number of bytes. For\n example, if you want a SHA512 digest as the first 16 bytes, set truncate_to\n to 16. If you want the full digest size, just set this to 0."] pub fn aws_sha512_compute (allocator : * mut aws_allocator , input : * const aws_byte_cursor , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Computes the sha256 hash over input and writes the digest output to 'output'.\n Use this if you don't need to stream the data you're hashing and you can load\n the entire input to hash into memory. If you specify truncate_to to something\n other than 0, the output will be truncated to that number of bytes. For\n example, if you want a SHA256 digest as the first 16 bytes, set truncate_to\n to 16. If you want the full digest size, just set this to 0."] pub fn aws_sha256_compute (allocator : * mut aws_allocator , input : * const aws_byte_cursor , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Computes the sha1 hash over input and writes the digest output to 'output'.\n Use this if you don't need to stream the data you're hashing and you can load\n the entire input to hash into memory. If you specify truncate_to to something\n other than 0, the output will be truncated to that number of bytes. For\n example, if you want a SHA1 digest as the first 16 bytes, set truncate_to\n to 16. If you want the full digest size, just set this to 0."] pub fn aws_sha1_compute (allocator : * mut aws_allocator , input : * const aws_byte_cursor , output : * mut aws_byte_buf , truncate_to : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Set the implementation of md5 to use. If you compiled without BYO_CRYPTO,\n you do not need to call this. However, if use this, we will honor it,\n regardless of compile options. This may be useful for testing purposes. If\n you did set BYO_CRYPTO, and you do not call this function you will\n segfault."] pub fn aws_set_md5_new_fn (fn_ : aws_hash_new_fn) ; } unsafe extern "C" { # [doc = " Set the implementation of sha512 to use. If you compiled without\n BYO_CRYPTO, you do not need to call this. However, if use this, we will\n honor it, regardless of compile options. This may be useful for testing\n purposes. If you did set BYO_CRYPTO, and you do not call this function\n you will segfault."] pub fn aws_set_sha512_new_fn (fn_ : aws_hash_new_fn) ; } unsafe extern "C" { # [doc = " Set the implementation of sha256 to use. If you compiled without\n BYO_CRYPTO, you do not need to call this. However, if use this, we will\n honor it, regardless of compile options. This may be useful for testing\n purposes. If you did set BYO_CRYPTO, and you do not call this function\n you will segfault."] pub fn aws_set_sha256_new_fn (fn_ : aws_hash_new_fn) ; } unsafe extern "C" { # [doc = " Set the implementation of sha1 to use. If you compiled without\n BYO_CRYPTO, you do not need to call this. However, if use this, we will\n honor it, regardless of compile options. This may be useful for testing\n purposes. If you did set BYO_CRYPTO, and you do not call this function\n you will segfault."] pub fn aws_set_sha1_new_fn (fn_ : aws_hash_new_fn) ; } unsafe extern "C" { # [doc = " The entry point function to perform a CRC32 (Ethernet, gzip) computation.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc32 parameter as an initial value unless continuing\n to update a running crc in a subsequent call."] pub fn aws_checksums_crc32 (input : * const u8 , length : :: libc :: c_int , previous_crc32 : u32) -> u32 ; } unsafe extern "C" { # [doc = " The entry point function to perform a CRC32 (Ethernet, gzip) computation.\n Supports buffer lengths up to size_t max.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc32 parameter as an initial value unless continuing\n to update a running crc in a subsequent call."] pub fn aws_checksums_crc32_ex (input : * const u8 , length : usize , previous_crc32 : u32) -> u32 ; } unsafe extern "C" { # [doc = " The entry point function to perform a Castagnoli CRC32c (iSCSI) computation.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc32 parameter as an initial value unless continuing\n to update a running crc in a subsequent call."] pub fn aws_checksums_crc32c (input : * const u8 , length : :: libc :: c_int , previous_crc32c : u32) -> u32 ; } unsafe extern "C" { # [doc = " The entry point function to perform a Castagnoli CRC32c (iSCSI) computation.\n Supports buffer lengths up to size_t max.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc32 parameter as an initial value unless continuing\n to update a running crc in a subsequent call."] pub fn aws_checksums_crc32c_ex (input : * const u8 , length : usize , previous_crc32c : u32) -> u32 ; } unsafe extern "C" { # [doc = " The entry point function to perform a CRC64-NVME (a.k.a. CRC64-Rocksoft) computation.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc64 parameter as an initial value unless continuing\n to update a running crc in a subsequent call.\n There are many variants of CRC64 algorithms. This CRC64 variant is bit-reflected (based on\n the non bit-reflected polynomial 0xad93d23594c93659) and inverts the CRC input and output bits."] pub fn aws_checksums_crc64nvme (input : * const u8 , length : :: libc :: c_int , previous_crc64 : u64) -> u64 ; } unsafe extern "C" { # [doc = " The entry point function to perform a CRC64-NVME (a.k.a. CRC64-Rocksoft) computation.\n Supports buffer lengths up to size_t max.\n Selects a suitable implementation based on hardware capabilities.\n Pass 0 in the previousCrc64 parameter as an initial value unless continuing\n to update a running crc in a subsequent call.\n There are many variants of CRC64 algorithms. This CRC64 variant is bit-reflected (based on\n the non bit-reflected polynomial 0xad93d23594c93659) and inverts the CRC input and output bits."] pub fn aws_checksums_crc64nvme_ex (input : * const u8 , length : usize , previous_crc64 : u64) -> u64 ; } unsafe extern "C" { # [doc = " Combines two CRC32 (Ethernet, gzip) checksums computed over separate data blocks.\n This is equivalent to computing the CRC32 of the concatenated data blocks without\n having to re-scan the data.\n\n Given:\n   crc1 = CRC32(data_block_A)\n   crc2 = CRC32(data_block_B)\n\n This function computes:\n   result = CRC32(data_block_A || data_block_B)\n\n @param crc1 The CRC32 checksum of the first data block\n @param crc2 The CRC32 checksum of the second data block\n @param len2 The length (in bytes) of the original data that produced crc2.\n             This is NOT the size of the checksum (which is always 4 bytes),\n             but rather the size of the data block that was checksummed.\n @return The combined CRC32 checksum as if computed over the concatenated data"] pub fn aws_checksums_crc32_combine (crc1 : u32 , crc2 : u32 , len2 : u64) -> u32 ; } unsafe extern "C" { # [doc = " Combines two CRC32C (Castagnoli, iSCSI) checksums computed over separate data blocks.\n This is equivalent to computing the CRC32C of the concatenated data blocks without\n having to re-scan the data.\n\n Given:\n   crc1 = CRC32C(data_block_A)\n   crc2 = CRC32C(data_block_B)\n\n This function computes:\n   result = CRC32C(data_block_A || data_block_B)\n\n @param crc1 The CRC32C checksum of the first data block\n @param crc2 The CRC32C checksum of the second data block\n @param len2 The length (in bytes) of the original data that produced crc2.\n             This is NOT the size of the checksum (which is always 4 bytes),\n             but rather the size of the data block that was checksummed.\n @return The combined CRC32C checksum as if computed over the concatenated data"] pub fn aws_checksums_crc32c_combine (crc1 : u32 , crc2 : u32 , len2 : u64) -> u32 ; } unsafe extern "C" { # [doc = " Combines two CRC64-NVME (CRC64-Rocksoft) checksums computed over separate data blocks.\n This is equivalent to computing the CRC64-NVME of the concatenated data blocks without\n having to re-scan the data.\n\n Given:\n   crc1 = CRC64_NVME(data_block_A)\n   crc2 = CRC64_NVME(data_block_B)\n\n This function computes:\n   result = CRC64_NVME(data_block_A || data_block_B)\n\n @param crc1 The CRC64-NVME checksum of the first data block\n @param crc2 The CRC64-NVME checksum of the second data block\n @param len2 The length (in bytes) of the original data that produced crc2.\n             This is NOT the size of the checksum (which is always 8 bytes),\n             but rather the size of the data block that was checksummed.\n @return The combined CRC64-NVME checksum as if computed over the concatenated data"] pub fn aws_checksums_crc64nvme_combine (crc1 : u64 , crc2 : u64 , len2 : u64) -> u64 ; } pub type aws_log_channel_send_fn = :: std :: option :: Option < unsafe extern "C" fn (channel : * mut aws_log_channel , output : * mut aws_string) -> :: libc :: 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)] pub struct aws_log_channel_vtable { pub send : aws_log_channel_send_fn , pub clean_up : aws_log_channel_clean_up_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_channel_vtable"] [:: std :: mem :: size_of :: < aws_log_channel_vtable > () - 16usize] ; ["Alignment of aws_log_channel_vtable"] [:: std :: mem :: align_of :: < aws_log_channel_vtable > () - 8usize] ; ["Offset of field: aws_log_channel_vtable::send"] [:: std :: mem :: offset_of ! (aws_log_channel_vtable , send) - 0usize] ; ["Offset of field: aws_log_channel_vtable::clean_up"] [:: std :: mem :: offset_of ! (aws_log_channel_vtable , clean_up) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] 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 :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_channel"] [:: std :: mem :: size_of :: < aws_log_channel > () - 32usize] ; ["Alignment of aws_log_channel"] [:: std :: mem :: align_of :: < aws_log_channel > () - 8usize] ; ["Offset of field: aws_log_channel::vtable"] [:: std :: mem :: offset_of ! (aws_log_channel , vtable) - 0usize] ; ["Offset of field: aws_log_channel::allocator"] [:: std :: mem :: offset_of ! (aws_log_channel , allocator) - 8usize] ; ["Offset of field: aws_log_channel::writer"] [:: std :: mem :: offset_of ! (aws_log_channel , writer) - 16usize] ; ["Offset of field: aws_log_channel::impl_"] [:: std :: mem :: offset_of ! (aws_log_channel , impl_) - 24usize] ; } ; 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 () } } } unsafe extern "C" { pub fn aws_log_channel_init_foreground (channel : * mut aws_log_channel , allocator : * mut aws_allocator , writer : * mut aws_log_writer) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_channel_init_background (channel : * mut aws_log_channel , allocator : * mut aws_allocator , writer : * mut aws_log_writer) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_channel_clean_up (channel : * mut aws_log_channel) ; } pub type aws_log_formatter_format_fn = :: std :: option :: Option < unsafe extern "C" fn (formatter : * mut aws_log_formatter , formatted_output : * mut * mut aws_string , level : aws_log_level :: Type , subject : aws_log_subject_t , format : * const :: libc :: c_char , args : * mut __va_list_tag) -> :: libc :: 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)] pub struct aws_log_formatter_vtable { pub format : aws_log_formatter_format_fn , pub clean_up : aws_log_formatter_clean_up_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_formatter_vtable"] [:: std :: mem :: size_of :: < aws_log_formatter_vtable > () - 16usize] ; ["Alignment of aws_log_formatter_vtable"] [:: std :: mem :: align_of :: < aws_log_formatter_vtable > () - 8usize] ; ["Offset of field: aws_log_formatter_vtable::format"] [:: std :: mem :: offset_of ! (aws_log_formatter_vtable , format) - 0usize] ; ["Offset of field: aws_log_formatter_vtable::clean_up"] [:: std :: mem :: offset_of ! (aws_log_formatter_vtable , clean_up) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_log_formatter { pub vtable : * mut aws_log_formatter_vtable , pub allocator : * mut aws_allocator , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_formatter"] [:: std :: mem :: size_of :: < aws_log_formatter > () - 24usize] ; ["Alignment of aws_log_formatter"] [:: std :: mem :: align_of :: < aws_log_formatter > () - 8usize] ; ["Offset of field: aws_log_formatter::vtable"] [:: std :: mem :: offset_of ! (aws_log_formatter , vtable) - 0usize] ; ["Offset of field: aws_log_formatter::allocator"] [:: std :: mem :: offset_of ! (aws_log_formatter , allocator) - 8usize] ; ["Offset of field: aws_log_formatter::impl_"] [:: std :: mem :: offset_of ! (aws_log_formatter , impl_) - 16usize] ; } ; 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)] pub struct aws_log_formatter_standard_options { pub date_format : aws_date_format , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_formatter_standard_options"] [:: std :: mem :: size_of :: < aws_log_formatter_standard_options > () - 4usize] ; ["Alignment of aws_log_formatter_standard_options"] [:: std :: mem :: align_of :: < aws_log_formatter_standard_options > () - 4usize] ; ["Offset of field: aws_log_formatter_standard_options::date_format"] [:: std :: mem :: offset_of ! (aws_log_formatter_standard_options , date_format) - 0usize] ; } ; 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)] pub struct aws_logging_standard_formatting_data { pub log_line_buffer : * mut :: libc :: c_char , pub total_length : usize , pub level : aws_log_level :: Type , pub subject_name : * const :: libc :: c_char , pub format : * const :: libc :: c_char , pub date_format : aws_date_format , pub allocator : * mut aws_allocator , pub amount_written : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_logging_standard_formatting_data"] [:: std :: mem :: size_of :: < aws_logging_standard_formatting_data > () - 64usize] ; ["Alignment of aws_logging_standard_formatting_data"] [:: std :: mem :: align_of :: < aws_logging_standard_formatting_data > () - 8usize] ; ["Offset of field: aws_logging_standard_formatting_data::log_line_buffer"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , log_line_buffer) - 0usize] ; ["Offset of field: aws_logging_standard_formatting_data::total_length"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , total_length) - 8usize] ; ["Offset of field: aws_logging_standard_formatting_data::level"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , level) - 16usize] ; ["Offset of field: aws_logging_standard_formatting_data::subject_name"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , subject_name) - 24usize] ; ["Offset of field: aws_logging_standard_formatting_data::format"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , format) - 32usize] ; ["Offset of field: aws_logging_standard_formatting_data::date_format"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , date_format) - 40usize] ; ["Offset of field: aws_logging_standard_formatting_data::allocator"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , allocator) - 48usize] ; ["Offset of field: aws_logging_standard_formatting_data::amount_written"] [:: std :: mem :: offset_of ! (aws_logging_standard_formatting_data , amount_written) - 56usize] ; } ; 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 () } } } unsafe 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) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_formatter_clean_up (formatter : * mut aws_log_formatter) ; } unsafe extern "C" { pub fn aws_format_standard_log_line (formatting_data : * mut aws_logging_standard_formatting_data , args : * mut __va_list_tag) -> :: libc :: 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) -> :: libc :: 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)] pub struct aws_log_writer_vtable { pub write : aws_log_writer_write_fn , pub clean_up : aws_log_writer_clean_up_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_writer_vtable"] [:: std :: mem :: size_of :: < aws_log_writer_vtable > () - 16usize] ; ["Alignment of aws_log_writer_vtable"] [:: std :: mem :: align_of :: < aws_log_writer_vtable > () - 8usize] ; ["Offset of field: aws_log_writer_vtable::write"] [:: std :: mem :: offset_of ! (aws_log_writer_vtable , write) - 0usize] ; ["Offset of field: aws_log_writer_vtable::clean_up"] [:: std :: mem :: offset_of ! (aws_log_writer_vtable , clean_up) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_log_writer { pub vtable : * mut aws_log_writer_vtable , pub allocator : * mut aws_allocator , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_writer"] [:: std :: mem :: size_of :: < aws_log_writer > () - 24usize] ; ["Alignment of aws_log_writer"] [:: std :: mem :: align_of :: < aws_log_writer > () - 8usize] ; ["Offset of field: aws_log_writer::vtable"] [:: std :: mem :: offset_of ! (aws_log_writer , vtable) - 0usize] ; ["Offset of field: aws_log_writer::allocator"] [:: std :: mem :: offset_of ! (aws_log_writer , allocator) - 8usize] ; ["Offset of field: aws_log_writer::impl_"] [:: std :: mem :: offset_of ! (aws_log_writer , impl_) - 16usize] ; } ; 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)] pub struct aws_log_writer_file_options { pub filename : * const :: libc :: c_char , pub file : * mut FILE , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_log_writer_file_options"] [:: std :: mem :: size_of :: < aws_log_writer_file_options > () - 16usize] ; ["Alignment of aws_log_writer_file_options"] [:: std :: mem :: align_of :: < aws_log_writer_file_options > () - 8usize] ; ["Offset of field: aws_log_writer_file_options::filename"] [:: std :: mem :: offset_of ! (aws_log_writer_file_options , filename) - 0usize] ; ["Offset of field: aws_log_writer_file_options::file"] [:: std :: mem :: offset_of ! (aws_log_writer_file_options , file) - 8usize] ; } ; 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 () } } } unsafe extern "C" { pub fn aws_log_writer_init_stdout (writer : * mut aws_log_writer , allocator : * mut aws_allocator) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_writer_init_stderr (writer : * mut aws_log_writer , allocator : * mut aws_allocator) -> :: libc :: c_int ; } unsafe 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) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_log_writer_clean_up (writer : * mut aws_log_writer) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_socket_endpoint { _unused : [u8 ; 0] , } # [doc = " Invoked when connect completes.\n\n If unsuccessful, error_code will be set, connection will be NULL,\n and the on_shutdown callback will never be invoked.\n\n If successful, error_code will be 0 and connection will be valid.\n The user is now responsible for the connection and must\n call aws_http_connection_release() when they are done with it.\n\n The connection uses one event-loop thread to do all its work.\n The thread invoking this callback will be the same thread that invokes all\n future callbacks for this connection and its streams."] pub type aws_http_on_client_connection_setup_fn = :: std :: option :: Option < unsafe extern "C" fn (connection : * mut aws_http_connection , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when the connection has finished shutting down.\n Never invoked if on_setup failed.\n This is always invoked on connection's event-loop thread.\n Note that the connection is not completely done until on_shutdown has been invoked\n AND aws_http_connection_release() has been called."] pub type aws_http_on_client_connection_shutdown_fn = :: std :: option :: Option < unsafe extern "C" fn (connection : * mut aws_http_connection , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when the HTTP/2 settings change is complete.\n If connection setup successfully this will always be invoked whether settings change successfully or unsuccessfully.\n If error_code is AWS_ERROR_SUCCESS (0), then the peer has acknowledged the settings and the change has been applied.\n If error_code is non-zero, then a connection error occurred before the settings could be fully acknowledged and\n applied. This is always invoked on the connection's event-loop thread."] pub type aws_http2_on_change_settings_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (http2_connection : * mut aws_http_connection , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when the HTTP/2 PING completes, whether peer has acknowledged it or not.\n If error_code is AWS_ERROR_SUCCESS (0), then the peer has acknowledged the PING and round_trip_time_ns will be the\n round trip time in nano seconds for the connection.\n If error_code is non-zero, then a connection error occurred before the PING get acknowledgment and round_trip_time_ns\n will be useless in this case."] pub type aws_http2_on_ping_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (http2_connection : * mut aws_http_connection , round_trip_time_ns : u64 , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when an HTTP/2 GOAWAY frame is received from peer.\n Implies that the peer has initiated shutdown, or encountered a serious error.\n Once a GOAWAY is received, no further streams may be created on this connection.\n\n @param http2_connection This HTTP/2 connection.\n @param last_stream_id ID of the last locally-initiated stream that peer will\n      process. Any locally-initiated streams with a higher ID are ignored by\n      peer, and are safe to retry on another connection.\n @param http2_error_code The HTTP/2 error code (RFC-7540 section 7) sent by peer.\n      `enum aws_http2_error_code` lists official codes.\n @param debug_data The debug data sent by peer. It can be empty. (NOTE: this data is only valid for the lifetime of\n      the callback. Make a deep copy if you wish to keep it longer.)\n @param user_data User-data passed to the callback."] pub type aws_http2_on_goaway_received_fn = :: std :: option :: Option < unsafe extern "C" fn (http2_connection : * mut aws_http_connection , last_stream_id : u32 , http2_error_code : u32 , debug_data : aws_byte_cursor , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked when new HTTP/2 settings from peer have been applied.\n Settings_array is the array of aws_http2_settings that contains all the settings we just changed in the order we\n applied (the order settings arrived). Num_settings is the number of elements in that array."] pub type aws_http2_on_remote_settings_change_fn = :: std :: option :: Option < unsafe extern "C" fn (http2_connection : * mut aws_http_connection , settings_array : * const aws_http2_setting , num_settings : usize , user_data : * mut :: libc :: c_void) > ; # [doc = " Callback invoked on each statistics sample.\n\n connection_nonce is unique to each connection for disambiguation of each callback per connection."] pub type aws_http_statistics_observer_fn = :: std :: option :: Option < unsafe extern "C" fn (connection_nonce : usize , stats_list : * const aws_array_list , user_data : * mut :: libc :: c_void) > ; # [doc = " Configuration options for connection monitoring"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_connection_monitoring_options { # [doc = " minimum required throughput of the connection.  Throughput is only measured against the interval of time where\n there is actual io to perform.  Read and write throughput are measured and checked independently of one another."] pub minimum_throughput_bytes_per_second : u64 , pub allowable_throughput_failure_interval_seconds : u32 , # [doc = " invoked on each statistics publish by the underlying IO channel. Install this callback to receive the statistics\n for observation. This field is optional."] pub statistics_observer_fn : aws_http_statistics_observer_fn , # [doc = " user_data to be passed to statistics_observer_fn."] pub statistics_observer_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_connection_monitoring_options"] [:: std :: mem :: size_of :: < aws_http_connection_monitoring_options > () - 32usize] ; ["Alignment of aws_http_connection_monitoring_options"] [:: std :: mem :: align_of :: < aws_http_connection_monitoring_options > () - 8usize] ; ["Offset of field: aws_http_connection_monitoring_options::minimum_throughput_bytes_per_second"] [:: std :: mem :: offset_of ! (aws_http_connection_monitoring_options , minimum_throughput_bytes_per_second) - 0usize] ; ["Offset of field: aws_http_connection_monitoring_options::allowable_throughput_failure_interval_seconds"] [:: std :: mem :: offset_of ! (aws_http_connection_monitoring_options , allowable_throughput_failure_interval_seconds) - 8usize] ; ["Offset of field: aws_http_connection_monitoring_options::statistics_observer_fn"] [:: std :: mem :: offset_of ! (aws_http_connection_monitoring_options , statistics_observer_fn) - 16usize] ; ["Offset of field: aws_http_connection_monitoring_options::statistics_observer_user_data"] [:: std :: mem :: offset_of ! (aws_http_connection_monitoring_options , statistics_observer_user_data) - 24usize] ; } ; impl Default for aws_http_connection_monitoring_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 () } } } # [doc = " Options specific to HTTP/1.x connections."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_http1_connection_options { # [doc = " Optional\n Capacity in bytes of the HTTP/1 connection's read buffer.\n The buffer grows if the flow-control window of the incoming HTTP-stream\n reaches zero. If the buffer reaches capacity, no further socket data is\n read until the HTTP-stream's window opens again, allowing data to resume flowing.\n\n Ignored if `manual_window_management` is false.\n If zero is specified (the default) then a default capacity is chosen.\n A capacity that is too small may hinder throughput.\n A capacity that is too big may waste memory without helping throughput."] pub read_buffer_capacity : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http1_connection_options"] [:: std :: mem :: size_of :: < aws_http1_connection_options > () - 8usize] ; ["Alignment of aws_http1_connection_options"] [:: std :: mem :: align_of :: < aws_http1_connection_options > () - 8usize] ; ["Offset of field: aws_http1_connection_options::read_buffer_capacity"] [:: std :: mem :: offset_of ! (aws_http1_connection_options , read_buffer_capacity) - 0usize] ; } ; # [doc = " Options specific to HTTP/2 connections."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http2_connection_options { # [doc = " Optional\n The data of settings to change for initial settings.\n Note: each setting has its boundary. If settings_array is not set, num_settings has to be 0 to send an empty\n SETTINGS frame."] pub initial_settings_array : * mut aws_http2_setting , # [doc = " Required\n The num of settings to change (Length of the initial_settings_array)."] pub num_initial_settings : usize , # [doc = " Optional.\n Invoked when the HTTP/2 initial settings change is complete.\n If failed to setup the connection, this will not be invoked.\n Otherwise, this will be invoked, whether settings change successfully or unsuccessfully.\n See `aws_http2_on_change_settings_complete_fn`."] pub on_initial_settings_completed : aws_http2_on_change_settings_complete_fn , # [doc = " Optional\n The max number of recently-closed streams to remember.\n Set it to zero to use the default setting, AWS_HTTP2_DEFAULT_MAX_CLOSED_STREAMS\n\n If the connection receives a frame for a closed stream,\n the frame will be ignored or cause a connection error,\n depending on the frame type and how the stream was closed.\n Remembering more streams reduces the chances that a late frame causes\n a connection error, but costs some memory."] pub max_closed_streams : usize , # [doc = " Optional.\n Invoked when a valid GOAWAY frame received.\n See `aws_http2_on_goaway_received_fn`."] pub on_goaway_received : aws_http2_on_goaway_received_fn , # [doc = " Optional.\n Invoked when new settings from peer have been applied.\n See `aws_http2_on_remote_settings_change_fn`."] pub on_remote_settings_change : aws_http2_on_remote_settings_change_fn , # [doc = " Optional.\n Set to true to manually manage the flow-control window of whole HTTP/2 connection.\n\n If false, the connection will maintain its flow-control windows such that\n no back-pressure is applied and data arrives as fast as possible.\n\n If true, the flow-control window of the whole connection will shrink as body data\n is received (headers, padding, and other metadata do not affect the window) for every streams\n created on this connection.\n The initial connection flow-control window is 65,535.\n Once the connection's flow-control window reaches to 0, all the streams on the connection stop receiving any\n further data.\n The user must call aws_http2_connection_update_window() to increment the connection's\n window and keep data flowing.\n Note: the padding of data frame counts to the flow-control window.\n But, the client will always automatically update the window for padding even for manual window update."] pub conn_manual_window_management : bool , # [doc = " Optional.\n The threshold to send out a window update frame for the connection.\n Ignored if `conn_manual_window_management` is false.\n When the window_size_self for the connection is larger than the threshold,\n client will batch the window update and not send it out until the window_size_self\n drops below the threshold.\n Default to half of the initial connection flow-control window size, which is 32767."] pub conn_window_size_threshold_to_send_update : u32 , # [doc = " Optional.\n The threshold to send out a window update frame for the streams.\n Ignored if `manual_window_management` is false.\n When the window_size_self for the stream is larger than the threshold,\n client will batch the window update and not send it out until the window_size_self\n drops below the threshold.\n Default to half of the `initial_window_size`."] pub stream_window_size_threshold_to_send_update : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http2_connection_options"] [:: std :: mem :: size_of :: < aws_http2_connection_options > () - 64usize] ; ["Alignment of aws_http2_connection_options"] [:: std :: mem :: align_of :: < aws_http2_connection_options > () - 8usize] ; ["Offset of field: aws_http2_connection_options::initial_settings_array"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , initial_settings_array) - 0usize] ; ["Offset of field: aws_http2_connection_options::num_initial_settings"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , num_initial_settings) - 8usize] ; ["Offset of field: aws_http2_connection_options::on_initial_settings_completed"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , on_initial_settings_completed) - 16usize] ; ["Offset of field: aws_http2_connection_options::max_closed_streams"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , max_closed_streams) - 24usize] ; ["Offset of field: aws_http2_connection_options::on_goaway_received"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , on_goaway_received) - 32usize] ; ["Offset of field: aws_http2_connection_options::on_remote_settings_change"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , on_remote_settings_change) - 40usize] ; ["Offset of field: aws_http2_connection_options::conn_manual_window_management"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , conn_manual_window_management) - 48usize] ; ["Offset of field: aws_http2_connection_options::conn_window_size_threshold_to_send_update"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , conn_window_size_threshold_to_send_update) - 52usize] ; ["Offset of field: aws_http2_connection_options::stream_window_size_threshold_to_send_update"] [:: std :: mem :: offset_of ! (aws_http2_connection_options , stream_window_size_threshold_to_send_update) - 56usize] ; } ; impl Default for aws_http2_connection_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 () } } } # [doc = " Options for creating an HTTP client connection.\n Initialize with AWS_HTTP_CLIENT_CONNECTION_OPTIONS_INIT to set default values."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http_client_connection_options { # [doc = " The sizeof() this struct, used for versioning.\n Set by AWS_HTTP_CLIENT_CONNECTION_OPTIONS_INIT."] pub self_size : usize , # [doc = " Required.\n Must outlive the connection."] pub allocator : * mut aws_allocator , # [doc = " Required.\n The connection keeps the bootstrap alive via ref-counting."] pub bootstrap : * mut aws_client_bootstrap , # [doc = " Required.\n aws_http_client_connect() makes a copy."] pub host_name : aws_byte_cursor , # [doc = " Required."] pub port : u32 , # [doc = " Required.\n aws_http_client_connect() makes a copy."] pub socket_options : * const aws_socket_options , # [doc = " Optional.\n aws_http_client_connect() deep-copies all contents,\n and keeps `aws_tls_ctx` alive via ref-counting."] pub tls_options : * const aws_tls_connection_options , # [doc = " Optional\n Configuration options related to http proxy usage.\n Relevant fields are copied internally."] pub proxy_options : * const aws_http_proxy_options , pub proxy_ev_settings : * const proxy_env_var_settings , # [doc = " Optional\n Configuration options related to connection health monitoring"] pub monitoring_options : * const aws_http_connection_monitoring_options , # [doc = " Optional (ignored if 0).\n After a request is fully sent, if the server does not begin responding within N milliseconds,\n then fail with AWS_ERROR_HTTP_RESPONSE_FIRST_BYTE_TIMEOUT.\n This can be overridden per-request by aws_http_make_request_options.response_first_byte_timeout_ms.\n TODO: Only supported in HTTP/1.1 now, support it in HTTP/2"] pub response_first_byte_timeout_ms : u64 , # [doc = " Set to true to manually manage the flow-control window of each stream.\n\n If false, the connection will maintain its flow-control windows such that\n no back-pressure is applied and data arrives as fast as possible.\n\n If true, the flow-control window of each stream will shrink as body data\n is received (headers, padding, and other metadata do not affect the window).\n `initial_window_size` determines the starting size of each stream's window.\n\n If a stream's flow-control window reaches 0, no further data will be received. The user must call\n aws_http_stream_update_window() to increment the stream's window and keep data flowing.\n\n If a HTTP/2 connection created, it will ONLY control the stream window management.\n Connection window management is controlled by `conn_manual_window_management`.\n `stream_window_size_threshold_to_send_update` controls when to send the WINDOW_UPDATE frame for the stream.\n Note: the padding of data frame counts to the flow-control window. But, the client will always automatically\n update the window for padding even for manual window update."] pub manual_window_management : bool , # [doc = " The starting size of each HTTP stream's flow-control window.\n Required if `manual_window_management` is true,\n ignored if `manual_window_management` is false.\n\n For HTTP/2 connection, this value will end up being one of the initial settings for the connection,\n `AWS_HTTP2_SETTINGS_INITIAL_WINDOW_SIZE`.\n The corresponding settings from `initial_settings_array` will override this value.\n Notes:\n  - the setting value has the limitation of 2^31-1, otherwise the connection will be failed to be established with\n      AWS_ERROR_INVALID_ARGUMENT.\n  - when this set to 0, the initial window size will be set to 0, when `manual_window_management` is true."] pub initial_window_size : usize , # [doc = " User data for callbacks\n Optional."] pub user_data : * mut :: libc :: c_void , # [doc = " Invoked when connect completes.\n Required.\n See `aws_http_on_client_connection_setup_fn`."] pub on_setup : aws_http_on_client_connection_setup_fn , # [doc = " Invoked when the connection has finished shutting down.\n Never invoked if setup failed.\n Optional.\n See `aws_http_on_client_connection_shutdown_fn`."] pub on_shutdown : aws_http_on_client_connection_shutdown_fn , # [doc = " Optional.\n When true, use prior knowledge to set up an HTTP/2 connection on a cleartext\n connection.\n When TLS is set and this is true, the connection will failed to be established,\n as prior knowledge only works for cleartext TLS.\n Refer to RFC7540 3.4"] pub prior_knowledge_http2 : bool , # [doc = " Optional.\n Pointer to the hash map containing the ALPN string to protocol to use.\n Hash from `struct aws_string *` to `enum aws_http_version`.\n If not set, only the predefined string `h2` and `http/1.1` will be recognized. Other negotiated ALPN string will\n result in a HTTP1/1 connection\n Note: Connection will keep a deep copy of the table and the strings."] pub alpn_string_map : * mut aws_hash_table , # [doc = " Options specific to HTTP/1.x connections.\n Optional.\n Ignored if connection is not HTTP/1.x.\n If connection is HTTP/1.x and options were not specified, default values are used."] pub http1_options : * const aws_http1_connection_options , # [doc = " Options specific to HTTP/2 connections.\n Optional.\n Ignored if connection is not HTTP/2.\n If connection is HTTP/2 and options were not specified, default values are used."] pub http2_options : * const aws_http2_connection_options , # [doc = " Optional.\n Requests the channel/connection be bound to a specific event loop rather than chosen sequentially from the\n event loop group associated with the client bootstrap."] pub requested_event_loop : * mut aws_event_loop , # [doc = " Optional\n Host resolution override that allows the user to override DNS behavior for this particular connection."] pub host_resolution_config : * const aws_host_resolution_config , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http_client_connection_options"] [:: std :: mem :: size_of :: < aws_http_client_connection_options > () - 184usize] ; ["Alignment of aws_http_client_connection_options"] [:: std :: mem :: align_of :: < aws_http_client_connection_options > () - 8usize] ; ["Offset of field: aws_http_client_connection_options::self_size"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , self_size) - 0usize] ; ["Offset of field: aws_http_client_connection_options::allocator"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , allocator) - 8usize] ; ["Offset of field: aws_http_client_connection_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , bootstrap) - 16usize] ; ["Offset of field: aws_http_client_connection_options::host_name"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , host_name) - 24usize] ; ["Offset of field: aws_http_client_connection_options::port"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , port) - 40usize] ; ["Offset of field: aws_http_client_connection_options::socket_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , socket_options) - 48usize] ; ["Offset of field: aws_http_client_connection_options::tls_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , tls_options) - 56usize] ; ["Offset of field: aws_http_client_connection_options::proxy_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , proxy_options) - 64usize] ; ["Offset of field: aws_http_client_connection_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , proxy_ev_settings) - 72usize] ; ["Offset of field: aws_http_client_connection_options::monitoring_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , monitoring_options) - 80usize] ; ["Offset of field: aws_http_client_connection_options::response_first_byte_timeout_ms"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , response_first_byte_timeout_ms) - 88usize] ; ["Offset of field: aws_http_client_connection_options::manual_window_management"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , manual_window_management) - 96usize] ; ["Offset of field: aws_http_client_connection_options::initial_window_size"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , initial_window_size) - 104usize] ; ["Offset of field: aws_http_client_connection_options::user_data"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , user_data) - 112usize] ; ["Offset of field: aws_http_client_connection_options::on_setup"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , on_setup) - 120usize] ; ["Offset of field: aws_http_client_connection_options::on_shutdown"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , on_shutdown) - 128usize] ; ["Offset of field: aws_http_client_connection_options::prior_knowledge_http2"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , prior_knowledge_http2) - 136usize] ; ["Offset of field: aws_http_client_connection_options::alpn_string_map"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , alpn_string_map) - 144usize] ; ["Offset of field: aws_http_client_connection_options::http1_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , http1_options) - 152usize] ; ["Offset of field: aws_http_client_connection_options::http2_options"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , http2_options) - 160usize] ; ["Offset of field: aws_http_client_connection_options::requested_event_loop"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , requested_event_loop) - 168usize] ; ["Offset of field: aws_http_client_connection_options::host_resolution_config"] [:: std :: mem :: offset_of ! (aws_http_client_connection_options , host_resolution_config) - 176usize] ; } ; impl Default for aws_http_client_connection_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 () } } } impl aws_http2_settings_id { pub const AWS_HTTP2_SETTINGS_HEADER_TABLE_SIZE : aws_http2_settings_id = aws_http2_settings_id :: AWS_HTTP2_SETTINGS_BEGIN_RANGE ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_http2_settings_id { AWS_HTTP2_SETTINGS_BEGIN_RANGE = 1 , AWS_HTTP2_SETTINGS_ENABLE_PUSH = 2 , AWS_HTTP2_SETTINGS_MAX_CONCURRENT_STREAMS = 3 , AWS_HTTP2_SETTINGS_INITIAL_WINDOW_SIZE = 4 , AWS_HTTP2_SETTINGS_MAX_FRAME_SIZE = 5 , AWS_HTTP2_SETTINGS_MAX_HEADER_LIST_SIZE = 6 , AWS_HTTP2_SETTINGS_END_RANGE = 7 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_http2_setting { pub id : aws_http2_settings_id , pub value : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_http2_setting"] [:: std :: mem :: size_of :: < aws_http2_setting > () - 8usize] ; ["Alignment of aws_http2_setting"] [:: std :: mem :: align_of :: < aws_http2_setting > () - 4usize] ; ["Offset of field: aws_http2_setting::id"] [:: std :: mem :: offset_of ! (aws_http2_setting , id) - 0usize] ; ["Offset of field: aws_http2_setting::value"] [:: std :: mem :: offset_of ! (aws_http2_setting , value) - 4usize] ; } ; impl Default for aws_http2_setting { 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 () } } } unsafe extern "C" { # [doc = " Asynchronously establish a client connection.\n The on_setup callback is invoked when the operation has created a connection or failed."] pub fn aws_http_client_connect (options : * const aws_http_client_connection_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Users must release the connection when they are done with it.\n The connection's memory cannot be reclaimed until this is done.\n If the connection was not already shutting down, it will be shut down.\n\n Users should always wait for the on_shutdown() callback to be called before releasing any data passed to the\n http_connection (Eg aws_tls_connection_options, aws_socket_options) otherwise there will be race conditions between\n http_connection shutdown tasks and memory release tasks, causing Segfaults."] pub fn aws_http_connection_release (connection : * mut aws_http_connection) ; } unsafe extern "C" { # [doc = " Begin shutdown sequence of the connection if it hasn't already started. This will schedule shutdown tasks on the\n EventLoop that may send HTTP/TLS/TCP shutdown messages to peers if necessary, and will eventually cause internal\n connection memory to stop being accessed and on_shutdown() callback to be called.\n\n It's safe to call this function regardless of the connection state as long as you hold a reference to the connection."] pub fn aws_http_connection_close (connection : * mut aws_http_connection) ; } unsafe extern "C" { # [doc = " Stop accepting new requests for the connection. It will NOT start the shutdown process for the connection. The\n requests that are already open can still wait to be completed, but new requests will fail to be created,"] pub fn aws_http_connection_stop_new_requests (connection : * mut aws_http_connection) ; } unsafe extern "C" { # [doc = " Returns true unless the connection is closed or closing."] pub fn aws_http_connection_is_open (connection : * const aws_http_connection) -> bool ; } unsafe extern "C" { # [doc = " Return whether the connection can make a new requests.\n If false, then a new connection must be established to make further requests."] pub fn aws_http_connection_new_requests_allowed (connection : * const aws_http_connection) -> bool ; } unsafe extern "C" { # [doc = " Returns true if this is a client connection."] pub fn aws_http_connection_is_client (connection : * const aws_http_connection) -> bool ; } unsafe extern "C" { pub fn aws_http_connection_get_version (connection : * const aws_http_connection) -> aws_http_version ; } unsafe extern "C" { # [doc = " Returns the channel hosting the HTTP connection.\n Do not expose this function to language bindings."] pub fn aws_http_connection_get_channel (connection : * mut aws_http_connection) -> * mut aws_channel ; } unsafe extern "C" { # [doc = " Returns the remote endpoint of the HTTP connection."] pub fn aws_http_connection_get_remote_endpoint (connection : * const aws_http_connection) -> * const aws_socket_endpoint ; } unsafe extern "C" { # [doc = " Initialize an map copied from the *src map, which maps `struct aws_string *` to `enum aws_http_version`."] pub fn aws_http_alpn_map_init_copy (allocator : * mut aws_allocator , dest : * mut aws_hash_table , src : * mut aws_hash_table) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initialize an empty hash-table that maps `struct aws_string *` to `enum aws_http_version`.\n This map can used in aws_http_client_connections_options.alpn_string_map."] pub fn aws_http_alpn_map_init (allocator : * mut aws_allocator , map : * mut aws_hash_table) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Checks http proxy options for correctness"] pub fn aws_http_options_validate_proxy_configuration (options : * const aws_http_client_connection_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Send a SETTINGS frame (HTTP/2 only).\n SETTINGS will be applied locally when SETTINGS ACK is received from peer.\n\n @param http2_connection HTTP/2 connection.\n @param settings_array The array of settings to change. Note: each setting has its boundary.\n @param num_settings The num of settings to change in settings_array.\n @param on_completed Optional callback, see `aws_http2_on_change_settings_complete_fn`.\n @param user_data User-data pass to on_completed callback."] pub fn aws_http2_connection_change_settings (http2_connection : * mut aws_http_connection , settings_array : * const aws_http2_setting , num_settings : usize , on_completed : aws_http2_on_change_settings_complete_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Send a PING frame (HTTP/2 only).\n Round-trip-time is calculated when PING ACK is received from peer.\n\n @param http2_connection HTTP/2 connection.\n @param optional_opaque_data Optional payload for PING frame.\n      Must be NULL, or exactly 8 bytes (AWS_HTTP2_PING_DATA_SIZE).\n      If NULL, the 8 byte payload will be all zeroes.\n @param on_completed Optional callback, invoked when PING ACK is received from peer,\n      or when a connection error prevents the PING ACK from being received.\n      Callback always fires on the connection's event-loop thread.\n @param user_data User-data pass to on_completed callback."] pub fn aws_http2_connection_ping (http2_connection : * mut aws_http_connection , optional_opaque_data : * const aws_byte_cursor , on_completed : aws_http2_on_ping_complete_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the local settings we are using to affect the decoding.\n\n @param http2_connection HTTP/2 connection.\n @param out_settings fixed size array of aws_http2_setting gets set to the local settings"] pub fn aws_http2_connection_get_local_settings (http2_connection : * const aws_http_connection , out_settings : * mut aws_http2_setting) ; } unsafe extern "C" { # [doc = " Get the settings received from remote peer, which we are using to restricts the message to send.\n\n @param http2_connection HTTP/2 connection.\n @param out_settings fixed size array of aws_http2_setting gets set to the remote settings"] pub fn aws_http2_connection_get_remote_settings (http2_connection : * const aws_http_connection , out_settings : * mut aws_http2_setting) ; } unsafe extern "C" { # [doc = " Send a custom GOAWAY frame (HTTP/2 only).\n\n Note that the connection automatically attempts to send a GOAWAY during\n shutdown (unless a GOAWAY with a valid Last-Stream-ID has already been sent).\n\n This call can be used to gracefully warn the peer of an impending shutdown\n (http2_error=0, allow_more_streams=true), or to customize the final GOAWAY\n frame that is sent by this connection.\n\n The other end may not receive the goaway, if the connection already closed.\n\n @param http2_connection HTTP/2 connection.\n @param http2_error The HTTP/2 error code (RFC-7540 section 7) to send.\n      `enum aws_http2_error_code` lists official codes.\n @param allow_more_streams If true, new peer-initiated streams will continue\n      to be acknowledged and the GOAWAY's Last-Stream-ID will be set to a max value.\n      If false, new peer-initiated streams will be ignored and the GOAWAY's\n      Last-Stream-ID will be set to the latest acknowledged stream.\n @param optional_debug_data Optional debug data to send. Size must not exceed 16KB."] pub fn aws_http2_connection_send_goaway (http2_connection : * mut aws_http_connection , http2_error : u32 , allow_more_streams : bool , optional_debug_data : * const aws_byte_cursor) ; } unsafe extern "C" { # [doc = " Get data about the latest GOAWAY frame sent to peer (HTTP/2 only).\n If no GOAWAY has been sent, AWS_ERROR_HTTP_DATA_NOT_AVAILABLE will be raised.\n Note that GOAWAY frames are typically sent automatically by the connection\n during shutdown.\n\n @param http2_connection HTTP/2 connection.\n @param out_http2_error Gets set to HTTP/2 error code sent in most recent GOAWAY.\n @param out_last_stream_id Gets set to Last-Stream-ID sent in most recent GOAWAY."] pub fn aws_http2_connection_get_sent_goaway (http2_connection : * mut aws_http_connection , out_http2_error : * mut u32 , out_last_stream_id : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get data about the latest GOAWAY frame received from peer (HTTP/2 only).\n If no GOAWAY has been received, or the GOAWAY payload is still in transmitting,\n AWS_ERROR_HTTP_DATA_NOT_AVAILABLE will be raised.\n\n @param http2_connection HTTP/2 connection.\n @param out_http2_error Gets set to HTTP/2 error code received in most recent GOAWAY.\n @param out_last_stream_id Gets set to Last-Stream-ID received in most recent GOAWAY."] pub fn aws_http2_connection_get_received_goaway (http2_connection : * mut aws_http_connection , out_http2_error : * mut u32 , out_last_stream_id : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Increment the connection's flow-control window to keep data flowing (HTTP/2 only).\n\n If the connection was created with `conn_manual_window_management` set true,\n the flow-control window of the connection will shrink as body data is received for all the streams created on it.\n (headers, padding, and other metadata do not affect the window).\n The initial connection flow-control window is 65,535.\n Once the connection's flow-control window reaches to 0, all the streams on the connection stop receiving any further\n data.\n\n If `conn_manual_window_management` is false, this call will have no effect.\n The connection maintains its flow-control windows such that\n no back-pressure is applied and data arrives as fast as possible.\n\n If you are not connected, this call will have no effect.\n\n Crashes when the connection is not http2 connection.\n The limit of the Maximum Size is 2**31 - 1.\n And client will make sure the WINDOW_UPDATE frame to be valid.\n\n The client control exactly when the WINDOW_UPDATE frame sent.\n Check `conn_window_size_threshold_to_send_update` for details.\n\n @param http2_connection HTTP/2 connection.\n @param increment_size The size to increment for the connection's flow control window"] pub fn aws_http2_connection_update_window (http2_connection : * mut aws_http_connection , increment_size : u32) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_async_input_stream { pub vtable : * const aws_async_input_stream_vtable , pub alloc : * mut aws_allocator , pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_async_input_stream"] [:: std :: mem :: size_of :: < aws_async_input_stream > () - 48usize] ; ["Alignment of aws_async_input_stream"] [:: std :: mem :: align_of :: < aws_async_input_stream > () - 8usize] ; ["Offset of field: aws_async_input_stream::vtable"] [:: std :: mem :: offset_of ! (aws_async_input_stream , vtable) - 0usize] ; ["Offset of field: aws_async_input_stream::alloc"] [:: std :: mem :: offset_of ! (aws_async_input_stream , alloc) - 8usize] ; ["Offset of field: aws_async_input_stream::ref_count"] [:: std :: mem :: offset_of ! (aws_async_input_stream , ref_count) - 16usize] ; ["Offset of field: aws_async_input_stream::impl_"] [:: std :: mem :: offset_of ! (aws_async_input_stream , impl_) - 40usize] ; } ; impl Default for aws_async_input_stream { 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)] pub struct aws_async_input_stream_vtable { # [doc = " Destroy the stream, its refcount has reached 0."] pub destroy : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_async_input_stream) > , # [doc = " Read once into the buffer.\n Complete the read when at least 1 byte is read, the buffer is full, or EOF is reached.\n Do not resize the buffer (do not use \"aws_byte_buf_xyz_dynamic()\" functions)\n Do not assume that buffer len starts at 0.\n You may assume that read() won't be called again until the current one completes.\n You may assume that the buffer has some space available.\n Return a future, which will contain an error code if something went wrong,\n or a result bool indicating whether EOF has been reached."] pub read : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_async_input_stream , dest : * mut aws_byte_buf) -> * mut aws_future_bool > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_async_input_stream_vtable"] [:: std :: mem :: size_of :: < aws_async_input_stream_vtable > () - 16usize] ; ["Alignment of aws_async_input_stream_vtable"] [:: std :: mem :: align_of :: < aws_async_input_stream_vtable > () - 8usize] ; ["Offset of field: aws_async_input_stream_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_async_input_stream_vtable , destroy) - 0usize] ; ["Offset of field: aws_async_input_stream_vtable::read"] [:: std :: mem :: offset_of ! (aws_async_input_stream_vtable , read) - 8usize] ; } ; unsafe extern "C" { # [doc = " Initialize aws_async_input_stream \"base class\""] pub fn aws_async_input_stream_init_base (stream : * mut aws_async_input_stream , alloc : * mut aws_allocator , vtable : * const aws_async_input_stream_vtable , impl_ : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Increment reference count.\n You may pass in NULL (has no effect).\n Returns whatever pointer was passed in."] pub fn aws_async_input_stream_acquire (stream : * mut aws_async_input_stream) -> * mut aws_async_input_stream ; } unsafe extern "C" { # [doc = " Decrement reference count.\n You may pass in NULL (has no effect).\n Always returns NULL."] pub fn aws_async_input_stream_release (stream : * mut aws_async_input_stream) -> * mut aws_async_input_stream ; } unsafe extern "C" { # [doc = " Read once from the async stream into the buffer.\n The read completes when at least 1 byte is read, the buffer is full, or EOF is reached.\n Depending on implementation, the read could complete at any time.\n It may complete synchronously. It may complete on another thread.\n Returns a future, which will contain an error code if something went wrong,\n or a result bool indicating whether EOF has been reached.\n\n WARNING: The buffer must have space available.\n WARNING: Do not read again until the previous read is complete."] pub fn aws_async_input_stream_read (stream : * mut aws_async_input_stream , dest : * mut aws_byte_buf) -> * mut aws_future_bool ; } unsafe extern "C" { # [doc = " Read repeatedly from the async stream until the buffer is full, or EOF is reached.\n Depending on implementation, this could complete at any time.\n It may complete synchronously. It may complete on another thread.\n Returns a future, which will contain an error code if something went wrong,\n or a result bool indicating whether EOF has been reached.\n\n WARNING: The buffer must have space available.\n WARNING: Do not read again until the previous read is complete."] pub fn aws_async_input_stream_read_to_fill (stream : * mut aws_async_input_stream , dest : * mut aws_byte_buf) -> * mut aws_future_bool ; } pub type aws_crt_statistics_category_t = u32 ; pub const AWS_CRT_STATISTICS_CATEGORY_STRIDE_BITS : _bindgen_ty_22 = _bindgen_ty_22 :: AWS_CRT_STATISTICS_CATEGORY_STRIDE_BITS ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_22 { AWS_CRT_STATISTICS_CATEGORY_STRIDE_BITS = 8 , } # [repr (u32)] # [non_exhaustive] # [doc = " The common-specific range of the aws_crt_statistics_category cross-library enum.\n\n This enum functions as an RTTI value that lets statistics handler's interpret (via cast) a\n specific statistics structure if the RTTI value is understood.\n\n Common doesn't have any statistics structures presently, so its range is essentially empty.\n"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_crt_common_statistics_category { AWSCRT_STAT_CAT_INVALID = 0 , } # [doc = " Pattern-struct that functions as a base \"class\" for all statistics structures.  To conform\n to the pattern, a statistics structure must have its first member be the category.  In that\n case it becomes \"safe\" to cast from aws_crt_statistics_base to the specific statistics structure\n based on the category value."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_crt_statistics_base { pub category : aws_crt_statistics_category_t , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_crt_statistics_base"] [:: std :: mem :: size_of :: < aws_crt_statistics_base > () - 4usize] ; ["Alignment of aws_crt_statistics_base"] [:: std :: mem :: align_of :: < aws_crt_statistics_base > () - 4usize] ; ["Offset of field: aws_crt_statistics_base::category"] [:: std :: mem :: offset_of ! (aws_crt_statistics_base , category) - 0usize] ; } ; # [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)] pub struct aws_crt_statistics_sample_interval { pub begin_time_ms : u64 , pub end_time_ms : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_crt_statistics_sample_interval"] [:: std :: mem :: size_of :: < aws_crt_statistics_sample_interval > () - 16usize] ; ["Alignment of aws_crt_statistics_sample_interval"] [:: std :: mem :: align_of :: < aws_crt_statistics_sample_interval > () - 8usize] ; ["Offset of field: aws_crt_statistics_sample_interval::begin_time_ms"] [:: std :: mem :: offset_of ! (aws_crt_statistics_sample_interval , begin_time_ms) - 0usize] ; ["Offset of field: aws_crt_statistics_sample_interval::end_time_ms"] [:: std :: mem :: offset_of ! (aws_crt_statistics_sample_interval , end_time_ms) - 8usize] ; } ; 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 :: libc :: 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_crt_statistics_handler_vtable"] [:: std :: mem :: size_of :: < aws_crt_statistics_handler_vtable > () - 24usize] ; ["Alignment of aws_crt_statistics_handler_vtable"] [:: std :: mem :: align_of :: < aws_crt_statistics_handler_vtable > () - 8usize] ; ["Offset of field: aws_crt_statistics_handler_vtable::process_statistics"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler_vtable , process_statistics) - 0usize] ; ["Offset of field: aws_crt_statistics_handler_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler_vtable , destroy) - 8usize] ; ["Offset of field: aws_crt_statistics_handler_vtable::get_report_interval_ms"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler_vtable , get_report_interval_ms) - 16usize] ; } ; # [doc = " Base structure for all statistics handler implementations.\n\n A statistics handler is an object that listens to a stream of polymorphic (via the category RTTI enum) statistics\n structures emitted from some arbitrary source.  In the initial implementation, statistics handlers are primarily\n attached to channels, where they monitor IO throughput and state data (from channel handlers) to determine a\n connection's health.\n\n Statistics handlers are a generalization of the timeout and bandwidth filters that are often associated with\n SDK network connections.  Configurable, default implementations are defined at the protocol level (http, etc...)\n where they can be attached at connection (channel) creation time."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_crt_statistics_handler { pub vtable : * mut aws_crt_statistics_handler_vtable , pub allocator : * mut aws_allocator , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_crt_statistics_handler"] [:: std :: mem :: size_of :: < aws_crt_statistics_handler > () - 24usize] ; ["Alignment of aws_crt_statistics_handler"] [:: std :: mem :: align_of :: < aws_crt_statistics_handler > () - 8usize] ; ["Offset of field: aws_crt_statistics_handler::vtable"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler , vtable) - 0usize] ; ["Offset of field: aws_crt_statistics_handler::allocator"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler , allocator) - 8usize] ; ["Offset of field: aws_crt_statistics_handler::impl_"] [:: std :: mem :: offset_of ! (aws_crt_statistics_handler , impl_) - 16usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Submits a list of statistics objects to a statistics handler for processing\n\n handler - the statistics handler that will process the statistics objects\n interval - time period over which the statistics were gathered\n stats - list of pointers to structures that can be case to aws_crt_statistics_base (i.e. have category as a first\n   member)\n 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 :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Queries the frequency (via an interval in milliseconds) which a statistics handler would like to be informed\n of statistics."] pub fn aws_crt_statistics_handler_get_report_interval_ms (handler : * mut aws_crt_statistics_handler) -> u64 ; } unsafe extern "C" { # [doc = " completely destroys a statistics handler.  The handler's cleanup function must clean up the impl portion completely\n (including its allocation, if done separately)."] pub fn aws_crt_statistics_handler_destroy (handler : * mut aws_crt_statistics_handler) ; } pub type aws_priority_queue_compare_fn = :: std :: option :: Option < unsafe extern "C" fn (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> :: libc :: c_int > ; # [repr (C)] # [derive (Debug , Copy , Clone)] 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\n the first call to aws_priority_queue_push_bp is made, and is subsequently maintained\n through any heap node manipulations.\n\n Each element is a struct aws_priority_queue_node *, pointing to a backpointer field\n owned by the calling code, or a NULL. The backpointer field is continually updated\n with information needed to locate and remove a specific node later on."] pub backpointers : aws_array_list , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_priority_queue"] [:: std :: mem :: size_of :: < aws_priority_queue > () - 88usize] ; ["Alignment of aws_priority_queue"] [:: std :: mem :: align_of :: < aws_priority_queue > () - 8usize] ; ["Offset of field: aws_priority_queue::pred"] [:: std :: mem :: offset_of ! (aws_priority_queue , pred) - 0usize] ; ["Offset of field: aws_priority_queue::container"] [:: std :: mem :: offset_of ! (aws_priority_queue , container) - 8usize] ; ["Offset of field: aws_priority_queue::backpointers"] [:: std :: mem :: offset_of ! (aws_priority_queue , backpointers) - 48usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_priority_queue_node"] [:: std :: mem :: size_of :: < aws_priority_queue_node > () - 8usize] ; ["Alignment of aws_priority_queue_node"] [:: std :: mem :: align_of :: < aws_priority_queue_node > () - 8usize] ; ["Offset of field: aws_priority_queue_node::current_index"] [:: std :: mem :: offset_of ! (aws_priority_queue_node , current_index) - 0usize] ; } ; unsafe extern "C" { # [doc = " Initializes a priority queue struct for use. This mode will grow memory automatically (exponential model)\n Default size is the inital size of the queue\n item_size is the size of each element in bytes. Mixing items types is not supported by this API.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes a priority queue struct for use. This mode will not allocate any additional memory. When the heap fills\n new enqueue operations will fail with AWS_ERROR_PRIORITY_QUEUE_FULL.\n\n Heaps initialized using this call do not support the aws_priority_queue_push_ref call with a non-NULL backpointer\n parameter.\n\n heap is the raw memory allocated for this priority_queue\n item_count is the maximum number of elements the raw heap can contain\n item_size is the size of each element in bytes. Mixing items types is not supported by this API.\n 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 :: libc :: c_void , item_count : usize , item_size : usize , pred : aws_priority_queue_compare_fn) ; } unsafe extern "C" { # [doc = " Checks that the backpointer at a specific index of the queue is\n 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 ; } unsafe extern "C" { # [doc = " Checks that the backpointers of the priority queue are either NULL\n or correctly allocated to point at aws_priority_queue_nodes. This\n check is O(n), as it accesses every backpointer in a loop, and thus\n shouldn't be used carelessly."] pub fn aws_priority_queue_backpointers_valid_deep (queue : * const aws_priority_queue) -> bool ; } unsafe extern "C" { # [doc = " Checks that the backpointers of the priority queue satisfy validity\n constraints."] pub fn aws_priority_queue_backpointers_valid (queue : * const aws_priority_queue) -> bool ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies item into the queue and places it in the proper priority order. Complexity: O(log(n)).\n\n If the backpointer parameter is non-null, the heap will continually update the pointed-to field\n with information needed to remove the node later on. *backpointer must remain valid until the node\n is removed from the heap, and may be updated on any mutating operation on the priority queue.\n\n If the node is removed, the backpointer will be set to a sentinel value that indicates that the\n node has already been removed. It is safe (and a no-op) to call aws_priority_queue_remove with\n such a sentinel value."] pub fn aws_priority_queue_push_ref (queue : * mut aws_priority_queue , item : * mut :: libc :: c_void , backpointer : * mut aws_priority_queue_node) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Copies the element of the highest priority, and removes it from the queue.. Complexity: O(log(n)).\n 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 :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes a specific node from the priority queue. Complexity: O(log(n))\n After removing a node (using either _remove or _pop), the backpointer set at push_ref time is set\n to a sentinel value. If this sentinel value is passed to aws_priority_queue_remove,\n AWS_ERROR_PRIORITY_QUEUE_BAD_NODE will be raised. Note, however, that passing uninitialized\n 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 :: libc :: c_void , node : * const aws_priority_queue_node) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Obtains a pointer to the element of the highest priority. Complexity: constant time.\n 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 :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes all elements from the queue, but does not free internal memory."] pub fn aws_priority_queue_clear (queue : * mut aws_priority_queue) ; } unsafe extern "C" { # [doc = " Current number of elements in the queue"] pub fn aws_priority_queue_size (queue : * const aws_priority_queue) -> usize ; } unsafe extern "C" { # [doc = " Current allocated capacity for the queue, in dynamic mode this grows over time, in static mode, this will never\n change."] pub fn aws_priority_queue_capacity (queue : * const aws_priority_queue) -> usize ; } unsafe extern "C" { # [doc = " Initializes a queue node to a default value that indicates the node is not in the queue.\n\n @param node priority queue node to initialize with a default value"] pub fn aws_priority_queue_node_init (node : * mut aws_priority_queue_node) ; } unsafe extern "C" { # [doc = " Checks if a priority queue node is currently in a priority queue.\n\n @param node priority queue node to check usage for\n\n @return true if the node is in a queue, false otherwise"] pub fn aws_priority_queue_node_is_in_queue (node : * const aws_priority_queue_node) -> bool ; } impl aws_task_status { pub const AWS_TASK_STATUS_RUN_READY : aws_task_status = aws_task_status (0) ; pub const AWS_TASK_STATUS_CANCELED : aws_task_status = aws_task_status (1) ; } # [repr (transparent)] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub struct aws_task_status (pub :: libc :: c_uint) ; # [doc = " A scheduled function."] pub type aws_task_fn = :: std :: option :: Option < unsafe extern "C" fn (task : * mut aws_task , arg : * mut :: libc :: c_void , arg1 : aws_task_status) > ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_task { pub fn_ : aws_task_fn , pub arg : * mut :: libc :: c_void , pub timestamp : u64 , pub node : aws_linked_list_node , pub priority_queue_node : aws_priority_queue_node , pub type_tag : * const :: libc :: 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_task__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_task__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_task__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_task__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_task__bindgen_ty_1::scheduled"] [:: std :: mem :: offset_of ! (aws_task__bindgen_ty_1 , scheduled) - 0usize] ; ["Offset of field: aws_task__bindgen_ty_1::reserved"] [:: std :: mem :: offset_of ! (aws_task__bindgen_ty_1 , reserved) - 0usize] ; } ; 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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_task"] [:: std :: mem :: size_of :: < aws_task > () - 64usize] ; ["Alignment of aws_task"] [:: std :: mem :: align_of :: < aws_task > () - 8usize] ; ["Offset of field: aws_task::fn_"] [:: std :: mem :: offset_of ! (aws_task , fn_) - 0usize] ; ["Offset of field: aws_task::arg"] [:: std :: mem :: offset_of ! (aws_task , arg) - 8usize] ; ["Offset of field: aws_task::timestamp"] [:: std :: mem :: offset_of ! (aws_task , timestamp) - 16usize] ; ["Offset of field: aws_task::node"] [:: std :: mem :: offset_of ! (aws_task , node) - 24usize] ; ["Offset of field: aws_task::priority_queue_node"] [:: std :: mem :: offset_of ! (aws_task , priority_queue_node) - 40usize] ; ["Offset of field: aws_task::type_tag"] [:: std :: mem :: offset_of ! (aws_task , type_tag) - 48usize] ; ["Offset of field: aws_task::abi_extension"] [:: std :: mem :: offset_of ! (aws_task , abi_extension) - 56usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_task_scheduler"] [:: std :: mem :: size_of :: < aws_task_scheduler > () - 160usize] ; ["Alignment of aws_task_scheduler"] [:: std :: mem :: align_of :: < aws_task_scheduler > () - 8usize] ; ["Offset of field: aws_task_scheduler::alloc"] [:: std :: mem :: offset_of ! (aws_task_scheduler , alloc) - 0usize] ; ["Offset of field: aws_task_scheduler::timed_queue"] [:: std :: mem :: offset_of ! (aws_task_scheduler , timed_queue) - 8usize] ; ["Offset of field: aws_task_scheduler::timed_list"] [:: std :: mem :: offset_of ! (aws_task_scheduler , timed_list) - 96usize] ; ["Offset of field: aws_task_scheduler::asap_list"] [:: std :: mem :: offset_of ! (aws_task_scheduler , asap_list) - 128usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Init an aws_task"] pub fn aws_task_init (task : * mut aws_task , fn_ : aws_task_fn , arg : * mut :: libc :: c_void , type_tag : * const :: libc :: c_char) ; } unsafe extern "C" { pub fn aws_task_run (task : * mut aws_task , status : aws_task_status) ; } unsafe extern "C" { # [doc = " Initializes a task scheduler instance."] pub fn aws_task_scheduler_init (scheduler : * mut aws_task_scheduler , alloc : * mut aws_allocator) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Empties and executes all queued tasks, passing the AWS_TASK_STATUS_CANCELED status to the task function.\n 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) ; } unsafe extern "C" { pub fn aws_task_scheduler_is_valid (scheduler : * const aws_task_scheduler) -> bool ; } unsafe extern "C" { # [doc = " Returns whether the scheduler has any scheduled tasks.\n next_task_time (optional) will be set to time of the next task, note that 0 will be set if tasks were\n 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 ; } unsafe extern "C" { # [doc = " Schedules a task to run immediately.\n 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) ; } unsafe extern "C" { # [doc = " Schedules a task to run at time_to_run.\n 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) ; } unsafe 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) ; } unsafe extern "C" { # [doc = " Sequentially execute all tasks scheduled to run at, or before current_time.\n AWS_TASK_STATUS_RUN_READY will be passed to the task function as the task status.\n\n 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) ; } unsafe 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 :: libc :: c_char ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_channel_direction { AWS_CHANNEL_DIR_READ = 0 , AWS_CHANNEL_DIR_WRITE = 1 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop_local_object { _unused : [u8 ; 0] , } pub type aws_channel_on_setup_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (channel : * mut aws_channel , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; pub type aws_channel_on_shutdown_completed_fn = :: std :: option :: Option < unsafe extern "C" fn (channel : * mut aws_channel , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_channel_slot { pub alloc : * mut aws_allocator , pub channel : * mut aws_channel , pub adj_left : * mut aws_channel_slot , pub adj_right : * mut aws_channel_slot , pub handler : * mut aws_channel_handler , pub window_size : usize , pub upstream_message_overhead : usize , pub current_window_update_batch_size : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_slot"] [:: std :: mem :: size_of :: < aws_channel_slot > () - 64usize] ; ["Alignment of aws_channel_slot"] [:: std :: mem :: align_of :: < aws_channel_slot > () - 8usize] ; ["Offset of field: aws_channel_slot::alloc"] [:: std :: mem :: offset_of ! (aws_channel_slot , alloc) - 0usize] ; ["Offset of field: aws_channel_slot::channel"] [:: std :: mem :: offset_of ! (aws_channel_slot , channel) - 8usize] ; ["Offset of field: aws_channel_slot::adj_left"] [:: std :: mem :: offset_of ! (aws_channel_slot , adj_left) - 16usize] ; ["Offset of field: aws_channel_slot::adj_right"] [:: std :: mem :: offset_of ! (aws_channel_slot , adj_right) - 24usize] ; ["Offset of field: aws_channel_slot::handler"] [:: std :: mem :: offset_of ! (aws_channel_slot , handler) - 32usize] ; ["Offset of field: aws_channel_slot::window_size"] [:: std :: mem :: offset_of ! (aws_channel_slot , window_size) - 40usize] ; ["Offset of field: aws_channel_slot::upstream_message_overhead"] [:: std :: mem :: offset_of ! (aws_channel_slot , upstream_message_overhead) - 48usize] ; ["Offset of field: aws_channel_slot::current_window_update_batch_size"] [:: std :: mem :: offset_of ! (aws_channel_slot , current_window_update_batch_size) - 56usize] ; } ; impl Default for aws_channel_slot { 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_channel_task_fn = :: std :: option :: Option < unsafe extern "C" fn (channel_task : * mut aws_channel_task , arg : * mut :: libc :: c_void , status : aws_task_status) > ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_channel_task { pub wrapper_task : aws_task , pub task_fn : aws_channel_task_fn , pub arg : * mut :: libc :: c_void , pub type_tag : * const :: libc :: c_char , pub node : aws_linked_list_node , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_task"] [:: std :: mem :: size_of :: < aws_channel_task > () - 104usize] ; ["Alignment of aws_channel_task"] [:: std :: mem :: align_of :: < aws_channel_task > () - 8usize] ; ["Offset of field: aws_channel_task::wrapper_task"] [:: std :: mem :: offset_of ! (aws_channel_task , wrapper_task) - 0usize] ; ["Offset of field: aws_channel_task::task_fn"] [:: std :: mem :: offset_of ! (aws_channel_task , task_fn) - 64usize] ; ["Offset of field: aws_channel_task::arg"] [:: std :: mem :: offset_of ! (aws_channel_task , arg) - 72usize] ; ["Offset of field: aws_channel_task::type_tag"] [:: std :: mem :: offset_of ! (aws_channel_task , type_tag) - 80usize] ; ["Offset of field: aws_channel_task::node"] [:: std :: mem :: offset_of ! (aws_channel_task , node) - 88usize] ; } ; impl Default for aws_channel_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 , Default , Copy , Clone)] pub struct aws_channel_handler_vtable { # [doc = " Called by the channel when a message is available for processing in the read direction. It is your\n responsibility to call aws_mem_release(message->allocator, message); on message when you are finished with it.\n You must only call `aws_mem_release(message->allocator, message);` if the `process_read_message`\n returns AWS_OP_SUCCESS. In case of an error, you must not clean up the message and should just raise the error.\n\n Also keep in mind that your slot's internal window has been decremented. You'll want to call\n aws_channel_slot_increment_read_window() at some point in the future if you want to keep receiving data."] pub process_read_message : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , message : * mut aws_io_message) -> :: libc :: c_int > , # [doc = " Called by the channel when a message is available for processing in the write direction. It is your\n responsibility to call aws_mem_release(message->allocator, message); on message when you are finished with it.\n You must only call `aws_mem_release(message->allocator, message);` if the `process_read_message`\n returns AWS_OP_SUCCESS. In case of an error, you must not clean up the message and should just raise the error."] pub process_write_message : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , message : * mut aws_io_message) -> :: libc :: c_int > , # [doc = " Called by the channel when a downstream handler has issued a window increment. You'll want to update your\n internal state and likely propagate a window increment message of your own by calling\n 'aws_channel_slot_increment_read_window()'"] pub increment_read_window : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , size : usize) -> :: libc :: c_int > , # [doc = " The channel calls shutdown on all handlers twice, once to shut down reading, and once to shut down writing.\n Shutdown always begins with the left-most handler, and proceeds to the right with dir set to\n AWS_CHANNEL_DIR_READ. Then shutdown is called on handlers from right to left with dir set to\n AWS_CHANNEL_DIR_WRITE.\n\n The shutdown process does not need to complete immediately and may rely on scheduled tasks.\n The handler must call aws_channel_slot_on_handler_shutdown_complete() when it is finished,\n which propagates shutdown to the next handler.  If 'free_scarce_resources_immediately' is true,\n then resources vulnerable to denial-of-service attacks (such as sockets and file handles)\n must be closed immediately before the shutdown() call returns."] pub shutdown : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , dir : aws_channel_direction , error_code : :: libc :: c_int , free_scarce_resources_immediately : bool) -> :: libc :: c_int > , # [doc = " Called by the channel when the handler is added to a slot, to get the initial window size."] pub initial_window_size : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) -> usize > , # [doc = " Called by the channel anytime a handler is added or removed, provides a hint for downstream\n handlers to avoid message fragmentation due to message overhead."] pub message_overhead : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) -> usize > , # [doc = " Clean up any resources and deallocate yourself. The shutdown process will already be completed before this\n function is called."] pub destroy : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) > , # [doc = " Directs the channel handler to reset all of the internal statistics it tracks about itself."] pub reset_statistics : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) > , # [doc = " Adds a pointer to the handler's internal statistics (if they exist) to a list of statistics structures\n associated with the channel's handler chain."] pub gather_statistics : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler , stats_list : * mut aws_array_list) > , pub trigger_read : :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_channel_handler) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_handler_vtable"] [:: std :: mem :: size_of :: < aws_channel_handler_vtable > () - 80usize] ; ["Alignment of aws_channel_handler_vtable"] [:: std :: mem :: align_of :: < aws_channel_handler_vtable > () - 8usize] ; ["Offset of field: aws_channel_handler_vtable::process_read_message"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , process_read_message) - 0usize] ; ["Offset of field: aws_channel_handler_vtable::process_write_message"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , process_write_message) - 8usize] ; ["Offset of field: aws_channel_handler_vtable::increment_read_window"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , increment_read_window) - 16usize] ; ["Offset of field: aws_channel_handler_vtable::shutdown"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , shutdown) - 24usize] ; ["Offset of field: aws_channel_handler_vtable::initial_window_size"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , initial_window_size) - 32usize] ; ["Offset of field: aws_channel_handler_vtable::message_overhead"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , message_overhead) - 40usize] ; ["Offset of field: aws_channel_handler_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , destroy) - 48usize] ; ["Offset of field: aws_channel_handler_vtable::reset_statistics"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , reset_statistics) - 56usize] ; ["Offset of field: aws_channel_handler_vtable::gather_statistics"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , gather_statistics) - 64usize] ; ["Offset of field: aws_channel_handler_vtable::trigger_read"] [:: std :: mem :: offset_of ! (aws_channel_handler_vtable , trigger_read) - 72usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_channel_handler { pub vtable : * mut aws_channel_handler_vtable , pub alloc : * mut aws_allocator , pub slot : * mut aws_channel_slot , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_handler"] [:: std :: mem :: size_of :: < aws_channel_handler > () - 32usize] ; ["Alignment of aws_channel_handler"] [:: std :: mem :: align_of :: < aws_channel_handler > () - 8usize] ; ["Offset of field: aws_channel_handler::vtable"] [:: std :: mem :: offset_of ! (aws_channel_handler , vtable) - 0usize] ; ["Offset of field: aws_channel_handler::alloc"] [:: std :: mem :: offset_of ! (aws_channel_handler , alloc) - 8usize] ; ["Offset of field: aws_channel_handler::slot"] [:: std :: mem :: offset_of ! (aws_channel_handler , slot) - 16usize] ; ["Offset of field: aws_channel_handler::impl_"] [:: std :: mem :: offset_of ! (aws_channel_handler , impl_) - 24usize] ; } ; impl Default for aws_channel_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 () } } } # [doc = " Args for creating a new channel.\n  event_loop to use for IO and tasks. on_setup_completed will be invoked when\n  the setup process is finished It will be executed in the event loop's thread.\n  on_shutdown_completed will be executed upon channel shutdown.\n\n  enable_read_back_pressure toggles whether or not back pressure will be applied in the channel.\n  Leave this option off unless you're using something like reactive-streams, since it is a slight throughput\n  penalty.\n\n  Unless otherwise\n  specified all functions for channels and channel slots must be executed within that channel's event-loop's thread."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_channel_options { pub event_loop : * mut aws_event_loop , pub on_setup_completed : aws_channel_on_setup_completed_fn , pub on_shutdown_completed : aws_channel_on_shutdown_completed_fn , pub setup_user_data : * mut :: libc :: c_void , pub shutdown_user_data : * mut :: libc :: c_void , pub enable_read_back_pressure : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_channel_options"] [:: std :: mem :: size_of :: < aws_channel_options > () - 48usize] ; ["Alignment of aws_channel_options"] [:: std :: mem :: align_of :: < aws_channel_options > () - 8usize] ; ["Offset of field: aws_channel_options::event_loop"] [:: std :: mem :: offset_of ! (aws_channel_options , event_loop) - 0usize] ; ["Offset of field: aws_channel_options::on_setup_completed"] [:: std :: mem :: offset_of ! (aws_channel_options , on_setup_completed) - 8usize] ; ["Offset of field: aws_channel_options::on_shutdown_completed"] [:: std :: mem :: offset_of ! (aws_channel_options , on_shutdown_completed) - 16usize] ; ["Offset of field: aws_channel_options::setup_user_data"] [:: std :: mem :: offset_of ! (aws_channel_options , setup_user_data) - 24usize] ; ["Offset of field: aws_channel_options::shutdown_user_data"] [:: std :: mem :: offset_of ! (aws_channel_options , shutdown_user_data) - 32usize] ; ["Offset of field: aws_channel_options::enable_read_back_pressure"] [:: std :: mem :: offset_of ! (aws_channel_options , enable_read_back_pressure) - 40usize] ; } ; impl Default for aws_channel_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 () } } } unsafe extern "C" { pub static mut g_aws_channel_max_fragment_size : usize ; } unsafe extern "C" { # [doc = " Initializes channel_task for use."] pub fn aws_channel_task_init (channel_task : * mut aws_channel_task , task_fn : aws_channel_task_fn , arg : * mut :: libc :: c_void , type_tag : * const :: libc :: c_char) ; } unsafe extern "C" { # [doc = " Allocates new channel, Unless otherwise specified all functions for channels and channel slots must be executed\n within that channel's event-loop's thread. channel_options are copied."] pub fn aws_channel_new (allocator : * mut aws_allocator , creation_args : * const aws_channel_options) -> * mut aws_channel ; } unsafe extern "C" { # [doc = " Mark the channel, along with all slots and handlers, for destruction.\n Must be called after shutdown has completed.\n Can be called from any thread assuming 'aws_channel_shutdown()' has completed.\n Note that memory will not be freed until all users which acquired holds on the channel via\n aws_channel_acquire_hold(), release them via aws_channel_release_hold()."] pub fn aws_channel_destroy (channel : * mut aws_channel) ; } unsafe extern "C" { # [doc = " Initiates shutdown of the channel. Shutdown will begin with the left-most slot. Each handler will invoke\n 'aws_channel_slot_on_handler_shutdown_complete' once they've finished their shutdown process for the read direction.\n Once the right-most slot has shutdown in the read direction, the process will start shutting down starting on the\n right-most slot. Once the left-most slot has shutdown in the write direction, 'callbacks->shutdown_completed' will be\n invoked in the event loop's thread.\n\n This function can be called from any thread."] pub fn aws_channel_shutdown (channel : * mut aws_channel , error_code : :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Prevent a channel's memory from being freed.\n Any number of users may acquire a hold to prevent a channel and its handlers from being unexpectedly freed.\n Any user which acquires a hold must release it via aws_channel_release_hold().\n Memory will be freed once all holds are released and aws_channel_destroy() has been called."] pub fn aws_channel_acquire_hold (channel : * mut aws_channel) ; } unsafe extern "C" { # [doc = " Release a hold on the channel's memory, allowing it to be freed.\n This may be called before or after aws_channel_destroy()."] pub fn aws_channel_release_hold (channel : * mut aws_channel) ; } unsafe extern "C" { # [doc = " Allocates and initializes a new slot for use with the channel. If this is the first slot in the channel, it will\n automatically be added to the channel as the first slot. For all subsequent calls on a given channel, the slot will\n need to be added to the channel via. the aws_channel_slot_insert_right(), aws_channel_slot_insert_end(), and\n aws_channel_slot_insert_left() APIs."] pub fn aws_channel_slot_new (channel : * mut aws_channel) -> * mut aws_channel_slot ; } unsafe extern "C" { # [doc = " Fetches the event loop the channel is a part of."] pub fn aws_channel_get_event_loop (channel : * mut aws_channel) -> * mut aws_event_loop ; } unsafe extern "C" { # [doc = " Fetches the current timestamp from the event-loop's clock, in nanoseconds."] pub fn aws_channel_current_clock_time (channel : * mut aws_channel , time_nanos : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Retrieves an object by key from the event loop's local storage."] pub fn aws_channel_fetch_local_object (channel : * mut aws_channel , key : * const :: libc :: c_void , obj : * mut aws_event_loop_local_object) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Stores an object by key in the event loop's local storage."] pub fn aws_channel_put_local_object (channel : * mut aws_channel , key : * const :: libc :: c_void , obj : * const aws_event_loop_local_object) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes an object by key from the event loop's local storage."] pub fn aws_channel_remove_local_object (channel : * mut aws_channel , key : * const :: libc :: c_void , removed_obj : * mut aws_event_loop_local_object) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Acquires a message from the event loop's message pool. size_hint is merely a hint, it may be smaller than you\n requested and you are responsible for checking the bounds of it. If the returned message is not large enough, you\n must send multiple messages. This cannot fail, it never returns NULL."] pub fn aws_channel_acquire_message_from_pool (channel : * mut aws_channel , message_type : aws_io_message_type , size_hint : usize) -> * mut aws_io_message ; } unsafe extern "C" { # [doc = " Schedules a task to run on the event loop as soon as possible.\n This is the ideal way to move a task into the correct thread. It's also handy for context switches.\n This function is safe to call from any thread.\n\n If called from the channel's event loop, the task will get directly added to the run-now list.\n If called from outside the channel's event loop, the task will go into a cross-thread task queue.\n\n If tasks must be serialized relative to some source synchronization, you may not want to use this API\n because tasks submitted from the event loop thread can \"jump ahead\" of tasks submitted from external threads\n due to this optimization.  If this is a problem, you can either refactor your submission logic or use\n the aws_channel_schedule_task_now_serialized variant which does not perform this optimization.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_channel_schedule_task_now (channel : * mut aws_channel , task : * mut aws_channel_task) ; } unsafe extern "C" { # [doc = " Schedules a task to run on the event loop as soon as possible.\n\n This variant always uses the cross thread queue rather than conditionally skipping it when already in\n the destination event loop.  While not \"optimal\", this allows us to serialize task execution no matter where\n the task was submitted from: if you are submitting tasks from a critical section, the serialized order that you\n submit is guaranteed to be the order that they execute on the event loop.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_channel_schedule_task_now_serialized (channel : * mut aws_channel , task : * mut aws_channel_task) ; } unsafe extern "C" { # [doc = " Schedules a task to run on the event loop at the specified time.\n This is the ideal way to move a task into the correct thread. It's also handy for context switches.\n Use aws_channel_current_clock_time() to get the current time in nanoseconds.\n This function is safe to call from any thread.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_channel_schedule_task_future (channel : * mut aws_channel , task : * mut aws_channel_task , run_at_nanos : u64) ; } unsafe extern "C" { # [doc = " Instrument a channel with a statistics handler.  While instrumented with a statistics handler, the channel\n will periodically report per-channel-handler-specific statistics about handler performance and state.\n\n Assigning a statistics handler to a channel is a transfer of ownership -- the channel will clean up\n the handler appropriately.  Statistics handlers may be changed dynamically (for example, the upgrade\n from a vanilla http channel to a websocket channel), but this function may only be called from the\n event loop thread that the channel is a part of.\n\n The first possible hook to set a statistics handler is the channel's creation callback."] pub fn aws_channel_set_statistics_handler (channel : * mut aws_channel , handler : * mut aws_crt_statistics_handler) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Returns true if the caller is on the event loop's thread. If false, you likely need to use\n aws_channel_schedule_task(). This function is safe to call from any thread."] pub fn aws_channel_thread_is_callers_thread (channel : * mut aws_channel) -> bool ; } unsafe extern "C" { # [doc = " Sets the handler for a slot, the slot will also call get_current_window_size() and propagate a window update\n upstream."] pub fn aws_channel_slot_set_handler (slot : * mut aws_channel_slot , handler : * mut aws_channel_handler) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes slot from the channel and deallocates the slot and its handler."] pub fn aws_channel_slot_remove (slot : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Replaces remove with new_slot. Deallocates remove and its handler."] pub fn aws_channel_slot_replace (remove : * mut aws_channel_slot , new_slot : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " inserts 'to_add' to the position immediately to the right of slot. Note that the first call to\n aws_channel_slot_new() adds it to the channel implicitly."] pub fn aws_channel_slot_insert_right (slot : * mut aws_channel_slot , to_add : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Inserts to 'to_add' the end of the channel. Note that the first call to\n aws_channel_slot_new() adds it to the channel implicitly."] pub fn aws_channel_slot_insert_end (channel : * mut aws_channel , to_add : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " inserts 'to_add' to the position immediately to the left of slot. Note that the first call to\n aws_channel_slot_new() adds it to the channel implicitly."] pub fn aws_channel_slot_insert_left (slot : * mut aws_channel_slot , to_add : * mut aws_channel_slot) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Sends a message to the adjacent slot in the channel based on dir. Also does window size checking.\n\n NOTE: if this function returns an error code, it is the caller's responsibility to release message\n back to the pool. If this function returns AWS_OP_SUCCESS, the recipient of the message has taken\n ownership of the message. So, for example, don't release a message to the pool and then return an error.\n If you encounter an error condition in this case, shutdown the channel with the appropriate error code."] pub fn aws_channel_slot_send_message (slot : * mut aws_channel_slot , message : * mut aws_io_message , dir : aws_channel_direction) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Convenience function that invokes aws_channel_acquire_message_from_pool(),\n asking for the largest reasonable DATA message that can be sent in the write direction,\n with upstream overhead accounted for. This cannot fail, it never returns NULL."] pub fn aws_channel_slot_acquire_max_message_for_write (slot : * mut aws_channel_slot) -> * mut aws_io_message ; } unsafe extern "C" { # [doc = " Issues a window update notification upstream (to the left.)"] pub fn aws_channel_slot_increment_read_window (slot : * mut aws_channel_slot , window : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Called by handlers once they have finished their shutdown in the 'dir' direction. Propagates the shutdown process\n to the next handler in the channel."] pub fn aws_channel_slot_on_handler_shutdown_complete (slot : * mut aws_channel_slot , dir : aws_channel_direction , err_code : :: libc :: c_int , free_scarce_resources_immediately : bool) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initiates shutdown on slot. callbacks->on_shutdown_completed will be called\n once the shutdown process is completed."] pub fn aws_channel_slot_shutdown (slot : * mut aws_channel_slot , dir : aws_channel_direction , err_code : :: libc :: c_int , free_scarce_resources_immediately : bool) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Fetches the downstream read window. This gives you the information necessary to honor the read window. If you call\n send_message() and it exceeds this window, the message will be rejected."] pub fn aws_channel_slot_downstream_read_window (slot : * mut aws_channel_slot) -> usize ; } unsafe extern "C" { # [doc = " Fetches the current overhead of upstream handlers. This provides a hint to avoid fragmentation if you care."] pub fn aws_channel_slot_upstream_message_overhead (slot : * mut aws_channel_slot) -> usize ; } unsafe extern "C" { # [doc = " Calls destroy on handler's vtable"] pub fn aws_channel_handler_destroy (handler : * mut aws_channel_handler) ; } unsafe extern "C" { # [doc = " Calls process_read_message on handler's vtable"] pub fn aws_channel_handler_process_read_message (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , message : * mut aws_io_message) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Calls process_write_message on handler's vtable."] pub fn aws_channel_handler_process_write_message (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , message : * mut aws_io_message) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Calls on_window_update on handler's vtable."] pub fn aws_channel_handler_increment_read_window (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , size : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " calls shutdown_direction on handler's vtable."] pub fn aws_channel_handler_shutdown (handler : * mut aws_channel_handler , slot : * mut aws_channel_slot , dir : aws_channel_direction , error_code : :: libc :: c_int , free_scarce_resources_immediately : bool) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Calls initial_window_size on handler's vtable."] pub fn aws_channel_handler_initial_window_size (handler : * mut aws_channel_handler) -> usize ; } unsafe extern "C" { pub fn aws_channel_get_first_slot (channel : * mut aws_channel) -> * mut aws_channel_slot ; } unsafe extern "C" { # [doc = " A way for external processes to force a read by the data-source channel handler.  Necessary in certain cases, like\n when a server channel finishes setting up its initial handlers, a read may have already been triggered on the\n socket (the client's CLIENT_HELLO tls payload, for example) and absent further data/notifications, this data\n would never get processed."] pub fn aws_channel_trigger_read (channel : * mut aws_channel) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_address_record_type { AWS_ADDRESS_RECORD_TYPE_A = 0 , AWS_ADDRESS_RECORD_TYPE_AAAA = 1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_get_host_address_flags { AWS_GET_HOST_ADDRESS_COUNT_RECORD_TYPE_A = 1 , AWS_GET_HOST_ADDRESS_COUNT_RECORD_TYPE_AAAA = 2 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_host_address { pub allocator : * mut aws_allocator , pub host : * const aws_string , pub address : * const aws_string , pub record_type : aws_address_record_type , pub expiry : u64 , pub use_count : usize , pub connection_failure_count : usize , pub weight : u8 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_address"] [:: std :: mem :: size_of :: < aws_host_address > () - 64usize] ; ["Alignment of aws_host_address"] [:: std :: mem :: align_of :: < aws_host_address > () - 8usize] ; ["Offset of field: aws_host_address::allocator"] [:: std :: mem :: offset_of ! (aws_host_address , allocator) - 0usize] ; ["Offset of field: aws_host_address::host"] [:: std :: mem :: offset_of ! (aws_host_address , host) - 8usize] ; ["Offset of field: aws_host_address::address"] [:: std :: mem :: offset_of ! (aws_host_address , address) - 16usize] ; ["Offset of field: aws_host_address::record_type"] [:: std :: mem :: offset_of ! (aws_host_address , record_type) - 24usize] ; ["Offset of field: aws_host_address::expiry"] [:: std :: mem :: offset_of ! (aws_host_address , expiry) - 32usize] ; ["Offset of field: aws_host_address::use_count"] [:: std :: mem :: offset_of ! (aws_host_address , use_count) - 40usize] ; ["Offset of field: aws_host_address::connection_failure_count"] [:: std :: mem :: offset_of ! (aws_host_address , connection_failure_count) - 48usize] ; ["Offset of field: aws_host_address::weight"] [:: std :: mem :: offset_of ! (aws_host_address , weight) - 56usize] ; } ; impl Default for aws_host_address { 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 once an address has been resolved for host. The type in host_addresses is struct aws_host_address (by-value).\n The caller does not own this memory and you must copy the host address before returning from this function if you\n plan to use it later. For convenience, we've provided the aws_host_address_copy() and aws_host_address_clean_up()\n functions."] pub type aws_on_host_resolved_result_fn = :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , host_name : * const aws_string , err_code : :: libc :: c_int , host_addresses : * const aws_array_list , user_data : * mut :: libc :: c_void) > ; # [doc = " Function signature for configuring your own resolver (the default just uses getaddrinfo()). The type in\n output_addresses is struct aws_host_address (by-value). We assume this function blocks, hence this absurdly\n complicated design."] pub type aws_resolve_host_implementation_fn = :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , host_name : * const aws_string , output_addresses : * mut aws_array_list , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_host_resolution_config { pub impl_ : aws_resolve_host_implementation_fn , pub max_ttl : usize , pub impl_data : * mut :: libc :: c_void , pub resolve_frequency_ns : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolution_config"] [:: std :: mem :: size_of :: < aws_host_resolution_config > () - 32usize] ; ["Alignment of aws_host_resolution_config"] [:: std :: mem :: align_of :: < aws_host_resolution_config > () - 8usize] ; ["Offset of field: aws_host_resolution_config::impl_"] [:: std :: mem :: offset_of ! (aws_host_resolution_config , impl_) - 0usize] ; ["Offset of field: aws_host_resolution_config::max_ttl"] [:: std :: mem :: offset_of ! (aws_host_resolution_config , max_ttl) - 8usize] ; ["Offset of field: aws_host_resolution_config::impl_data"] [:: std :: mem :: offset_of ! (aws_host_resolution_config , impl_data) - 16usize] ; ["Offset of field: aws_host_resolution_config::resolve_frequency_ns"] [:: std :: mem :: offset_of ! (aws_host_resolution_config , resolve_frequency_ns) - 24usize] ; } ; impl Default for aws_host_resolution_config { 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)] pub struct aws_host_resolver_purge_host_options { pub host : * const aws_string , pub on_host_purge_complete_callback : aws_simple_completion_callback , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolver_purge_host_options"] [:: std :: mem :: size_of :: < aws_host_resolver_purge_host_options > () - 24usize] ; ["Alignment of aws_host_resolver_purge_host_options"] [:: std :: mem :: align_of :: < aws_host_resolver_purge_host_options > () - 8usize] ; ["Offset of field: aws_host_resolver_purge_host_options::host"] [:: std :: mem :: offset_of ! (aws_host_resolver_purge_host_options , host) - 0usize] ; ["Offset of field: aws_host_resolver_purge_host_options::on_host_purge_complete_callback"] [:: std :: mem :: offset_of ! (aws_host_resolver_purge_host_options , on_host_purge_complete_callback) - 8usize] ; ["Offset of field: aws_host_resolver_purge_host_options::user_data"] [:: std :: mem :: offset_of ! (aws_host_resolver_purge_host_options , user_data) - 16usize] ; } ; impl Default for aws_host_resolver_purge_host_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 () } } } # [doc = " should you absolutely disdain the default implementation, feel free to implement your own."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_host_resolver_vtable { # [doc = " clean up everything you allocated, but not resolver itself."] pub destroy : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver) > , # [doc = " resolve the host by host_name, the user owns host_name, so it needs to be copied if you persist it,\n invoke res with the result. This function should never block."] pub resolve_host : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , host_name : * const aws_string , res : aws_on_host_resolved_result_fn , config : * const aws_host_resolution_config , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > , # [doc = " gives your implementation a hint that an address has some failed connections occuring. Do whatever you want (or\n nothing) about it."] pub record_connection_failure : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , address : * const aws_host_address) -> :: libc :: c_int > , # [doc = " @Deprecated Use purge_cache_with_callback instead\n wipe out anything you have cached."] pub purge_cache : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver) -> :: libc :: c_int > , # [doc = " wipe out anything you have cached."] pub purge_cache_with_callback : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , on_purge_cache_complete_callback : aws_simple_completion_callback , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > , # [doc = " wipe out anything cached for a specific host"] pub purge_host_cache : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , options : * const aws_host_resolver_purge_host_options) -> :: libc :: c_int > , # [doc = " get number of addresses for a given host."] pub get_host_address_count : :: std :: option :: Option < unsafe extern "C" fn (resolver : * mut aws_host_resolver , host_name : * const aws_string , flags : u32) -> usize > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolver_vtable"] [:: std :: mem :: size_of :: < aws_host_resolver_vtable > () - 56usize] ; ["Alignment of aws_host_resolver_vtable"] [:: std :: mem :: align_of :: < aws_host_resolver_vtable > () - 8usize] ; ["Offset of field: aws_host_resolver_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , destroy) - 0usize] ; ["Offset of field: aws_host_resolver_vtable::resolve_host"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , resolve_host) - 8usize] ; ["Offset of field: aws_host_resolver_vtable::record_connection_failure"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , record_connection_failure) - 16usize] ; ["Offset of field: aws_host_resolver_vtable::purge_cache"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , purge_cache) - 24usize] ; ["Offset of field: aws_host_resolver_vtable::purge_cache_with_callback"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , purge_cache_with_callback) - 32usize] ; ["Offset of field: aws_host_resolver_vtable::purge_host_cache"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , purge_host_cache) - 40usize] ; ["Offset of field: aws_host_resolver_vtable::get_host_address_count"] [:: std :: mem :: offset_of ! (aws_host_resolver_vtable , get_host_address_count) - 48usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_host_resolver { pub allocator : * mut aws_allocator , pub impl_ : * mut :: libc :: c_void , pub vtable : * mut aws_host_resolver_vtable , pub ref_count : aws_ref_count , pub shutdown_options : aws_shutdown_callback_options , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolver"] [:: std :: mem :: size_of :: < aws_host_resolver > () - 64usize] ; ["Alignment of aws_host_resolver"] [:: std :: mem :: align_of :: < aws_host_resolver > () - 8usize] ; ["Offset of field: aws_host_resolver::allocator"] [:: std :: mem :: offset_of ! (aws_host_resolver , allocator) - 0usize] ; ["Offset of field: aws_host_resolver::impl_"] [:: std :: mem :: offset_of ! (aws_host_resolver , impl_) - 8usize] ; ["Offset of field: aws_host_resolver::vtable"] [:: std :: mem :: offset_of ! (aws_host_resolver , vtable) - 16usize] ; ["Offset of field: aws_host_resolver::ref_count"] [:: std :: mem :: offset_of ! (aws_host_resolver , ref_count) - 24usize] ; ["Offset of field: aws_host_resolver::shutdown_options"] [:: std :: mem :: offset_of ! (aws_host_resolver , shutdown_options) - 48usize] ; } ; impl Default for aws_host_resolver { 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)] pub struct aws_host_resolver_default_options { pub max_entries : usize , pub el_group : * mut aws_event_loop_group , pub shutdown_options : * const aws_shutdown_callback_options , pub system_clock_override_fn : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_host_resolver_default_options"] [:: std :: mem :: size_of :: < aws_host_resolver_default_options > () - 32usize] ; ["Alignment of aws_host_resolver_default_options"] [:: std :: mem :: align_of :: < aws_host_resolver_default_options > () - 8usize] ; ["Offset of field: aws_host_resolver_default_options::max_entries"] [:: std :: mem :: offset_of ! (aws_host_resolver_default_options , max_entries) - 0usize] ; ["Offset of field: aws_host_resolver_default_options::el_group"] [:: std :: mem :: offset_of ! (aws_host_resolver_default_options , el_group) - 8usize] ; ["Offset of field: aws_host_resolver_default_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_host_resolver_default_options , shutdown_options) - 16usize] ; ["Offset of field: aws_host_resolver_default_options::system_clock_override_fn"] [:: std :: mem :: offset_of ! (aws_host_resolver_default_options , system_clock_override_fn) - 24usize] ; } ; impl Default for aws_host_resolver_default_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 () } } } unsafe extern "C" { # [doc = " Copies `from` to `to`."] pub fn aws_host_address_copy (from : * const aws_host_address , to : * mut aws_host_address) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Moves `from` to `to`. After this call, from is no longer usable. Though, it could be resused for another\n move or copy operation."] pub fn aws_host_address_move (from : * mut aws_host_address , to : * mut aws_host_address) ; } unsafe extern "C" { # [doc = " Cleans up the memory for `address`"] pub fn aws_host_address_clean_up (address : * mut aws_host_address) ; } unsafe extern "C" { # [doc = " WARNING! do not call this function directly (getaddrinfo()): it blocks. Provide a pointer to this function for other\n resolution functions."] pub fn aws_default_dns_resolve (allocator : * mut aws_allocator , host_name : * const aws_string , output_addresses : * mut aws_array_list , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Creates a host resolver with the default behavior. Here's the behavior:\n\n Since there's not a reliable way to do non-blocking DNS without a ton of risky work that would need years of testing\n on every Unix system in existence, we work around it by doing a threaded implementation.\n\n When you request an address, it checks the cache. If the entry isn't in the cache it creates a new one.\n Each entry has a potentially short lived back-ground thread based on ttl for the records. Once we've populated the\n cache and you keep the resolver active, the resolution callback will be invoked immediately. When it's idle, it will\n take a little while in the background thread to fetch more, evaluate TTLs etc... In that case your callback will be\n invoked from the background thread.\n\n --------------------------------------------------------------------------------------------------------------------\n\n A few things to note about TTLs and connection failures.\n\n We attempt to honor your max ttl but will not honor it if dns queries are failing or all of your connections are\n marked as failed. Once we are able to query dns again, we will re-evaluate the TTLs.\n\n Upon notification connection failures, we move them to a separate list. Eventually we retry them when it's likely\n that the endpoint is healthy again or we don't really have another choice, but we try to keep them out of your\n hot path.\n\n ---------------------------------------------------------------------------------------------------------------------\n\n Finally, this entire design attempts to prevent problems where developers have to choose between large TTLs and thus\n sticky hosts or short TTLs and good fleet utilization but now higher latencies. In this design, we resolve every\n second in the background (only while you're actually using the record), but we do not expire the earlier resolved\n addresses until max ttl has passed.\n\n This for example, should enable you to hit thousands of hosts in the Amazon S3 fleet instead of just one or two."] pub fn aws_host_resolver_new_default (allocator : * mut aws_allocator , options : * const aws_host_resolver_default_options) -> * mut aws_host_resolver ; } unsafe extern "C" { # [doc = " Increments the reference count on the host resolver, allowing the caller to take a reference to it.\n\n Returns the same host resolver passed in."] pub fn aws_host_resolver_acquire (resolver : * mut aws_host_resolver) -> * mut aws_host_resolver ; } unsafe extern "C" { # [doc = " Decrements a host resolver's ref count.  When the ref count drops to zero, the resolver will be destroyed."] pub fn aws_host_resolver_release (resolver : * mut aws_host_resolver) ; } unsafe extern "C" { # [doc = " calls resolve_host on the vtable. config will be copied."] pub fn aws_host_resolver_resolve_host (resolver : * mut aws_host_resolver , host_name : * const aws_string , res : aws_on_host_resolved_result_fn , config : * const aws_host_resolution_config , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " calls record_connection_failure on the vtable."] pub fn aws_host_resolver_record_connection_failure (resolver : * mut aws_host_resolver , address : * const aws_host_address) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " @Deprecated Use purge_cache_with_callback instead\n calls purge_cache on the vtable."] pub fn aws_host_resolver_purge_cache (resolver : * mut aws_host_resolver) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Calls aws_host_resolver_purge_cache_with_callback on the vtable which will wipe out everything host resolver has\n cached."] pub fn aws_host_resolver_purge_cache_with_callback (resolver : * mut aws_host_resolver , on_purge_cache_complete_callback : aws_simple_completion_callback , user_data : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes the cache for a host asynchronously."] pub fn aws_host_resolver_purge_host_cache (resolver : * mut aws_host_resolver , options : * const aws_host_resolver_purge_host_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " get number of addresses for a given host."] pub fn aws_host_resolver_get_host_address_count (resolver : * mut aws_host_resolver , host_name : * const aws_string , flags : u32) -> usize ; } unsafe extern "C" { # [doc = " Returns the default host resolution config used internally if none specified.\n\n @return default host resolution config"] pub fn aws_host_resolver_init_default_resolution_config () -> aws_host_resolution_config ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_socket { _unused : [u8 ; 0] , } # [doc = " Generic event function for channel lifecycle events.\n\n Callbacks are provided for:\n   (1) Channel creation\n   (2) Channel setup - If TLS is being used, this function is called once the socket has connected, the channel has\n been initialized, and TLS has been successfully negotiated. A TLS handler has already been added to the channel. If\n TLS negotiation fails, this function will be called with the corresponding error code. If TLS is not being used, this\n function is called once the socket has connected and the channel has been initialized.\n   (3) Channel shutdown\n\n These callbacks are always invoked within the thread of the event-loop that the channel is assigned to.\n\n This function does NOT always imply \"success\" -- if error_code is AWS_OP_SUCCESS then everything was successful,\n otherwise an error condition occurred."] pub type aws_client_bootstrap_on_channel_event_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_client_bootstrap , error_code : :: libc :: c_int , channel : * mut aws_channel , user_data : * mut :: libc :: c_void) > ; # [doc = " If ALPN is being used this function will be invoked by the channel once an ALPN message is received. The returned\n channel_handler will be added to, and managed by, the channel."] pub type aws_channel_on_protocol_negotiated_fn = :: std :: option :: Option < unsafe extern "C" fn (new_slot : * mut aws_channel_slot , protocol : * mut aws_byte_buf , user_data : * mut :: libc :: c_void) -> * mut aws_channel_handler > ; # [doc = " Called after client bootstrap has been completely cleaned up, after its last refcount is released."] pub type aws_client_bootstrap_shutdown_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " aws_client_bootstrap handles creation and setup of channels that communicate via socket with a specific endpoint."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_client_bootstrap { pub allocator : * mut aws_allocator , pub event_loop_group : * mut aws_event_loop_group , pub host_resolver : * mut aws_host_resolver , pub host_resolver_config : aws_host_resolution_config , pub on_protocol_negotiated : aws_channel_on_protocol_negotiated_fn , pub ref_count : aws_ref_count , pub on_shutdown_complete : aws_client_bootstrap_shutdown_complete_fn , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_client_bootstrap"] [:: std :: mem :: size_of :: < aws_client_bootstrap > () - 104usize] ; ["Alignment of aws_client_bootstrap"] [:: std :: mem :: align_of :: < aws_client_bootstrap > () - 8usize] ; ["Offset of field: aws_client_bootstrap::allocator"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , allocator) - 0usize] ; ["Offset of field: aws_client_bootstrap::event_loop_group"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , event_loop_group) - 8usize] ; ["Offset of field: aws_client_bootstrap::host_resolver"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , host_resolver) - 16usize] ; ["Offset of field: aws_client_bootstrap::host_resolver_config"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , host_resolver_config) - 24usize] ; ["Offset of field: aws_client_bootstrap::on_protocol_negotiated"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , on_protocol_negotiated) - 56usize] ; ["Offset of field: aws_client_bootstrap::ref_count"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , ref_count) - 64usize] ; ["Offset of field: aws_client_bootstrap::on_shutdown_complete"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , on_shutdown_complete) - 88usize] ; ["Offset of field: aws_client_bootstrap::user_data"] [:: std :: mem :: offset_of ! (aws_client_bootstrap , user_data) - 96usize] ; } ; impl Default for aws_client_bootstrap { 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 = " aws_client_bootstrap creation options."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_client_bootstrap_options { pub event_loop_group : * mut aws_event_loop_group , pub host_resolver : * mut aws_host_resolver , pub host_resolution_config : * const aws_host_resolution_config , pub on_shutdown_complete : aws_client_bootstrap_shutdown_complete_fn , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_client_bootstrap_options"] [:: std :: mem :: size_of :: < aws_client_bootstrap_options > () - 40usize] ; ["Alignment of aws_client_bootstrap_options"] [:: std :: mem :: align_of :: < aws_client_bootstrap_options > () - 8usize] ; ["Offset of field: aws_client_bootstrap_options::event_loop_group"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , event_loop_group) - 0usize] ; ["Offset of field: aws_client_bootstrap_options::host_resolver"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , host_resolver) - 8usize] ; ["Offset of field: aws_client_bootstrap_options::host_resolution_config"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , host_resolution_config) - 16usize] ; ["Offset of field: aws_client_bootstrap_options::on_shutdown_complete"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , on_shutdown_complete) - 24usize] ; ["Offset of field: aws_client_bootstrap_options::user_data"] [:: std :: mem :: offset_of ! (aws_client_bootstrap_options , user_data) - 32usize] ; } ; impl Default for aws_client_bootstrap_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 () } } } # [doc = " If TLS is being used, this function is called once the socket has received an incoming connection, the channel has\n been initialized, and TLS has been successfully negotiated. A TLS handler has already been added to the channel. If\n TLS negotiation fails, this function will be called with the corresponding error code.\n\n If TLS is not being used, this function is called once the socket has received an incoming connection and the channel\n has been initialized.\n\n This function is always called within the thread of the event-loop that the new channel is assigned to upon success.\n\n On failure, the channel might not be assigned to an event loop yet, and will thus be invoked on the listener's\n event-loop thread.\n\n This function does NOT mean \"success\", if error_code is AWS_OP_SUCCESS then everything was successful, otherwise an\n error condition occurred.\n\n If an error occurred, you do not need to shutdown the channel. The `aws_channel_client_shutdown_callback` will be\n invoked once the channel has finished shutting down."] pub type aws_server_bootstrap_on_accept_channel_setup_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_server_bootstrap , error_code : :: libc :: c_int , channel : * mut aws_channel , user_data : * mut :: libc :: c_void) > ; # [doc = " Once the channel shuts down, this function will be invoked within the thread of\n the event-loop that the channel is assigned to.\n\n Note: this function is only invoked if the channel was successfully setup,\n e.g. aws_server_bootstrap_on_accept_channel_setup_fn() was invoked without an error code."] pub type aws_server_bootstrap_on_accept_channel_shutdown_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_server_bootstrap , error_code : :: libc :: c_int , channel : * mut aws_channel , user_data : * mut :: libc :: c_void) > ; # [doc = " This function is only used for async listener (Apple Network Framework in this case).\n Once the server listener socket is finished setup and starting listening, this fuction\n will be invoked."] pub type aws_server_bootstrap_on_listener_setup_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_server_bootstrap , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " Once the server listener socket is finished destroying, and all the existing connections are closed, this fuction\n will be invoked."] pub type aws_server_bootstrap_on_server_listener_destroy_fn = :: std :: option :: Option < unsafe extern "C" fn (bootstrap : * mut aws_server_bootstrap , user_data : * mut :: libc :: c_void) > ; # [doc = " aws_server_bootstrap manages listening sockets, creating and setting up channels to handle each incoming connection."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_server_bootstrap { pub allocator : * mut aws_allocator , pub event_loop_group : * mut aws_event_loop_group , pub on_protocol_negotiated : aws_channel_on_protocol_negotiated_fn , pub ref_count : aws_ref_count , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_server_bootstrap"] [:: std :: mem :: size_of :: < aws_server_bootstrap > () - 48usize] ; ["Alignment of aws_server_bootstrap"] [:: std :: mem :: align_of :: < aws_server_bootstrap > () - 8usize] ; ["Offset of field: aws_server_bootstrap::allocator"] [:: std :: mem :: offset_of ! (aws_server_bootstrap , allocator) - 0usize] ; ["Offset of field: aws_server_bootstrap::event_loop_group"] [:: std :: mem :: offset_of ! (aws_server_bootstrap , event_loop_group) - 8usize] ; ["Offset of field: aws_server_bootstrap::on_protocol_negotiated"] [:: std :: mem :: offset_of ! (aws_server_bootstrap , on_protocol_negotiated) - 16usize] ; ["Offset of field: aws_server_bootstrap::ref_count"] [:: std :: mem :: offset_of ! (aws_server_bootstrap , ref_count) - 24usize] ; } ; impl Default for aws_server_bootstrap { 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 = " Socket-based channel creation options.\n\n bootstrap - configs name resolution and which event loop group the connection will be seated into\n host_name - host to connect to; if a dns address, will be resolved prior to connecting\n port - port to connect to\n socket_options - socket properties, including type (tcp vs. udp vs. unix domain) and connect timeout.  TLS\n   connections are currently restricted to tcp (AWS_SOCKET_STREAM) only.\n tls_options - (optional) tls context to apply after connection establishment.  If NULL, the connection will\n   not be protected by TLS.\n creation_callback - (optional) callback invoked when the channel is first created.  This is always right after\n   the connection was successfully established.  *Does NOT* get called if the initial connect failed.\n setup_callback - callback invoked once the channel is ready for use and TLS has been negotiated or if an error\n   is encountered\n shutdown_callback - callback invoked once the channel has shutdown.\n enable_read_back_pressure - controls whether or not back pressure will be applied in the channel\n user_data - arbitrary data to pass back to the various callbacks\n requested_event_loop - if set, the connection will be placed on the requested event loop rather than one\n  chosen internally from the bootstrap's associated event loop group.  It is an error to pass in an event loop\n  that is not associated with the bootstrap's event loop group.\n\n Immediately after the `shutdown_callback` returns, the channel is cleaned up automatically. All callbacks are invoked\n in the thread of the event-loop that the new channel is assigned to.\n"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_socket_channel_bootstrap_options { pub bootstrap : * mut aws_client_bootstrap , pub host_name : * const :: libc :: c_char , pub port : u32 , pub socket_options : * const aws_socket_options , pub tls_options : * const aws_tls_connection_options , pub creation_callback : aws_client_bootstrap_on_channel_event_fn , pub setup_callback : aws_client_bootstrap_on_channel_event_fn , pub shutdown_callback : aws_client_bootstrap_on_channel_event_fn , pub enable_read_back_pressure : bool , pub user_data : * mut :: libc :: c_void , pub requested_event_loop : * mut aws_event_loop , pub host_resolution_override_config : * const aws_host_resolution_config , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_socket_channel_bootstrap_options"] [:: std :: mem :: size_of :: < aws_socket_channel_bootstrap_options > () - 96usize] ; ["Alignment of aws_socket_channel_bootstrap_options"] [:: std :: mem :: align_of :: < aws_socket_channel_bootstrap_options > () - 8usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , bootstrap) - 0usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::host_name"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , host_name) - 8usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::port"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , port) - 16usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::socket_options"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , socket_options) - 24usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::tls_options"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , tls_options) - 32usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::creation_callback"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , creation_callback) - 40usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::setup_callback"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , setup_callback) - 48usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , shutdown_callback) - 56usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::enable_read_back_pressure"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , enable_read_back_pressure) - 64usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::user_data"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , user_data) - 72usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::requested_event_loop"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , requested_event_loop) - 80usize] ; ["Offset of field: aws_socket_channel_bootstrap_options::host_resolution_override_config"] [:: std :: mem :: offset_of ! (aws_socket_channel_bootstrap_options , host_resolution_override_config) - 88usize] ; } ; impl Default for aws_socket_channel_bootstrap_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 () } } } # [doc = " Arguments to setup a server socket listener which will also negotiate and configure TLS.\n This creates a socket listener bound to `host` and 'port' using socket options `options`, and TLS options\n `tls_options`. `incoming_callback` will be invoked once an incoming channel is ready for use and TLS is\n finished negotiating, or if an error is encountered. `shutdown_callback` will be invoked once the channel has\n shutdown. `destroy_callback` will be invoked after the server socket listener is destroyed, and all associated\n connections and channels have finished shutting down. Immediately after the `shutdown_callback` returns, the channel\n is cleaned up automatically. All callbacks are invoked in the thread of the event-loop that listener is assigned to.\n\n Upon shutdown of your application, you'll want to call `aws_server_bootstrap_destroy_socket_listener` with the return\n value from this function.\n\n The socket type in `options` must be AWS_SOCKET_STREAM if tls_options is set.\n DTLS is not currently supported for tls."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_server_socket_channel_bootstrap_options { pub bootstrap : * mut aws_server_bootstrap , pub host_name : * const :: libc :: c_char , pub port : u32 , pub socket_options : * const aws_socket_options , pub tls_options : * const aws_tls_connection_options , pub setup_callback : aws_server_bootstrap_on_listener_setup_fn , pub incoming_callback : aws_server_bootstrap_on_accept_channel_setup_fn , pub shutdown_callback : aws_server_bootstrap_on_accept_channel_shutdown_fn , pub destroy_callback : aws_server_bootstrap_on_server_listener_destroy_fn , pub enable_read_back_pressure : bool , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_server_socket_channel_bootstrap_options"] [:: std :: mem :: size_of :: < aws_server_socket_channel_bootstrap_options > () - 88usize] ; ["Alignment of aws_server_socket_channel_bootstrap_options"] [:: std :: mem :: align_of :: < aws_server_socket_channel_bootstrap_options > () - 8usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::bootstrap"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , bootstrap) - 0usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::host_name"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , host_name) - 8usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::port"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , port) - 16usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::socket_options"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , socket_options) - 24usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::tls_options"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , tls_options) - 32usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::setup_callback"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , setup_callback) - 40usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::incoming_callback"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , incoming_callback) - 48usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , shutdown_callback) - 56usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::destroy_callback"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , destroy_callback) - 64usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::enable_read_back_pressure"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , enable_read_back_pressure) - 72usize] ; ["Offset of field: aws_server_socket_channel_bootstrap_options::user_data"] [:: std :: mem :: offset_of ! (aws_server_socket_channel_bootstrap_options , user_data) - 80usize] ; } ; impl Default for aws_server_socket_channel_bootstrap_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 () } } } unsafe extern "C" { # [doc = " Create the client bootstrap."] pub fn aws_client_bootstrap_new (allocator : * mut aws_allocator , options : * const aws_client_bootstrap_options) -> * mut aws_client_bootstrap ; } unsafe extern "C" { # [doc = " Increments a client bootstrap's ref count, allowing the caller to take a reference to it.\n\n Returns the same client bootstrap passed in."] pub fn aws_client_bootstrap_acquire (bootstrap : * mut aws_client_bootstrap) -> * mut aws_client_bootstrap ; } unsafe extern "C" { # [doc = " Decrements a client bootstrap's ref count.  When the ref count drops to zero, the bootstrap will be destroyed."] pub fn aws_client_bootstrap_release (bootstrap : * mut aws_client_bootstrap) ; } unsafe extern "C" { # [doc = " When using TLS, if ALPN is used, this callback will be invoked from the channel. The returned handler will be added\n to the channel."] pub fn aws_client_bootstrap_set_alpn_callback (bootstrap : * mut aws_client_bootstrap , on_protocol_negotiated : aws_channel_on_protocol_negotiated_fn) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Sets up a client socket channel."] pub fn aws_client_bootstrap_new_socket_channel (options : * mut aws_socket_channel_bootstrap_options) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes the server bootstrap with `allocator` and `el_group`. This object manages listeners, server connections,\n and channels."] pub fn aws_server_bootstrap_new (allocator : * mut aws_allocator , el_group : * mut aws_event_loop_group) -> * mut aws_server_bootstrap ; } unsafe extern "C" { # [doc = " Increments a server bootstrap's ref count, allowing the caller to take a reference to it.\n\n Returns the same server bootstrap passed in."] pub fn aws_server_bootstrap_acquire (bootstrap : * mut aws_server_bootstrap) -> * mut aws_server_bootstrap ; } unsafe extern "C" { # [doc = " Decrements a server bootstrap's ref count.  When the ref count drops to zero, the bootstrap will be destroyed."] pub fn aws_server_bootstrap_release (bootstrap : * mut aws_server_bootstrap) ; } unsafe extern "C" { # [doc = " When using TLS, if ALPN is used, this callback will be invoked from the channel. The returned handler will be added\n to the channel."] pub fn aws_server_bootstrap_set_alpn_callback (bootstrap : * mut aws_server_bootstrap , on_protocol_negotiated : aws_channel_on_protocol_negotiated_fn) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Sets up a server socket listener. If you are planning on using TLS, use\n `aws_server_bootstrap_new_tls_socket_listener` instead. This creates a socket listener bound to `local_endpoint`\n using socket options `options`. `incoming_callback` will be invoked once an incoming channel is ready for use or if\n an error is encountered. `shutdown_callback` will be invoked once the channel has shutdown. `destroy_callback` will\n be invoked after the server socket listener is destroyed, and all associated connections and channels have finished\n shutting down. Immediately after the `shutdown_callback` returns, the channel is cleaned up automatically. All\n callbacks are invoked the thread of the event-loop that the listening socket is assigned to\n\n `setup_callback`. If set, the callback will be asynchronously invoked when the listener is ready for use. For Apple\n Network Framework, the listener is not usable until the callback is invoked. If the listener creation failed\n (return NULL), the `setup_callback` will not be invoked.\n\n Upon shutdown of your application, you'll want to call `aws_server_bootstrap_destroy_socket_listener` with the return\n value from this function.\n\n bootstrap_options is copied."] pub fn aws_server_bootstrap_new_socket_listener (bootstrap_options : * const aws_server_socket_channel_bootstrap_options) -> * mut aws_socket ; } unsafe extern "C" { # [doc = " Shuts down 'listener' and cleans up any resources associated with it. Any incoming channels on `listener` will still\n be active. `destroy_callback` will be invoked after the server socket listener is destroyed, and all associated\n connections and channels have finished shutting down."] pub fn aws_server_bootstrap_destroy_socket_listener (bootstrap : * mut aws_server_bootstrap , listener : * mut aws_socket) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop_options { _unused : [u8 ; 0] , } # [doc = " @internal"] pub type aws_event_loop_on_event_fn = :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , handle : * mut aws_io_handle , events : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [doc = " @internal"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_event_loop_vtable { pub start_destroy : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) > , pub complete_destroy : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) > , pub run : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) -> :: libc :: c_int > , pub stop : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) -> :: libc :: c_int > , pub wait_for_stop_completion : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) -> :: libc :: c_int > , pub schedule_task_now : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , task : * mut aws_task) > , pub schedule_task_now_serialized : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , task : * mut aws_task) > , pub schedule_task_future : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , task : * mut aws_task , run_at_nanos : u64) > , pub cancel_task : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , task : * mut aws_task) > , pub connect_to_io_completion_port : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , handle : * mut aws_io_handle) -> :: libc :: c_int > , pub subscribe_to_io_events : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , handle : * mut aws_io_handle , events : :: libc :: c_int , on_event : aws_event_loop_on_event_fn , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > , pub unsubscribe_from_io_events : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop , handle : * mut aws_io_handle) -> :: libc :: c_int > , pub free_io_event_resources : :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > , pub is_on_callers_thread : :: std :: option :: Option < unsafe extern "C" fn (event_loop : * mut aws_event_loop) -> bool > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_event_loop_vtable"] [:: std :: mem :: size_of :: < aws_event_loop_vtable > () - 112usize] ; ["Alignment of aws_event_loop_vtable"] [:: std :: mem :: align_of :: < aws_event_loop_vtable > () - 8usize] ; ["Offset of field: aws_event_loop_vtable::start_destroy"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , start_destroy) - 0usize] ; ["Offset of field: aws_event_loop_vtable::complete_destroy"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , complete_destroy) - 8usize] ; ["Offset of field: aws_event_loop_vtable::run"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , run) - 16usize] ; ["Offset of field: aws_event_loop_vtable::stop"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , stop) - 24usize] ; ["Offset of field: aws_event_loop_vtable::wait_for_stop_completion"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , wait_for_stop_completion) - 32usize] ; ["Offset of field: aws_event_loop_vtable::schedule_task_now"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , schedule_task_now) - 40usize] ; ["Offset of field: aws_event_loop_vtable::schedule_task_now_serialized"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , schedule_task_now_serialized) - 48usize] ; ["Offset of field: aws_event_loop_vtable::schedule_task_future"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , schedule_task_future) - 56usize] ; ["Offset of field: aws_event_loop_vtable::cancel_task"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , cancel_task) - 64usize] ; ["Offset of field: aws_event_loop_vtable::connect_to_io_completion_port"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , connect_to_io_completion_port) - 72usize] ; ["Offset of field: aws_event_loop_vtable::subscribe_to_io_events"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , subscribe_to_io_events) - 80usize] ; ["Offset of field: aws_event_loop_vtable::unsubscribe_from_io_events"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , unsubscribe_from_io_events) - 88usize] ; ["Offset of field: aws_event_loop_vtable::free_io_event_resources"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , free_io_event_resources) - 96usize] ; ["Offset of field: aws_event_loop_vtable::is_on_callers_thread"] [:: std :: mem :: offset_of ! (aws_event_loop_vtable , is_on_callers_thread) - 104usize] ; } ; # [repr (u32)] # [non_exhaustive] # [doc = " Event Loop Type.  If set to `AWS_EVENT_LOOP_PLATFORM_DEFAULT`, the event loop will automatically use the platform’s\n default.\n\n Default Event Loop Type\n Linux       | AWS_EVENT_LOOP_EPOLL\n Windows     | AWS_EVENT_LOOP_IOCP\n BSD Variants| AWS_EVENT_LOOP_KQUEUE\n macOS       | AWS_EVENT_LOOP_KQUEUE\n iOS         | AWS_EVENT_LOOP_DISPATCH_QUEUE"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_event_loop_type { AWS_EVENT_LOOP_PLATFORM_DEFAULT = 0 , AWS_EVENT_LOOP_EPOLL = 1 , AWS_EVENT_LOOP_IOCP = 2 , AWS_EVENT_LOOP_KQUEUE = 3 , AWS_EVENT_LOOP_DISPATCH_QUEUE = 4 , } # [doc = " Event loop group configuration options"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_event_loop_group_options { # [doc = " How many event loops that event loop group should contain.  For most group types, this implies\n the creation and management of an analagous amount of managed threads"] pub loop_count : u16 , # [doc = " Event loop type. If the event loop type is set to AWS_EVENT_LOOP_PLATFORM_DEFAULT, the\n creation function will automatically use the platform’s default event loop type."] pub type_ : aws_event_loop_type , # [doc = " Optional callback to invoke when the event loop group finishes destruction."] pub shutdown_options : * const aws_shutdown_callback_options , # [doc = " Optional configuration to control how the event loop group's threads bind to CPU groups"] pub cpu_group : * const u16 , # [doc = " Override for the clock function that event loops should use.  Defaults to the system's high resolution\n timer.\n\n Do not bind this value to managed code; it is only used in timing-sensitive tests."] pub clock_override : aws_io_clock_fn , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_event_loop_group_options"] [:: std :: mem :: size_of :: < aws_event_loop_group_options > () - 32usize] ; ["Alignment of aws_event_loop_group_options"] [:: std :: mem :: align_of :: < aws_event_loop_group_options > () - 8usize] ; ["Offset of field: aws_event_loop_group_options::loop_count"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , loop_count) - 0usize] ; ["Offset of field: aws_event_loop_group_options::type_"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , type_) - 4usize] ; ["Offset of field: aws_event_loop_group_options::shutdown_options"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , shutdown_options) - 8usize] ; ["Offset of field: aws_event_loop_group_options::cpu_group"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , cpu_group) - 16usize] ; ["Offset of field: aws_event_loop_group_options::clock_override"] [:: std :: mem :: offset_of ! (aws_event_loop_group_options , clock_override) - 24usize] ; } ; impl Default for aws_event_loop_group_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 () } } } unsafe extern "C" { # [doc = " The event loop will schedule the task and run it on the event loop thread as soon as possible.\n Note that cancelled tasks may execute outside the event loop thread.\n This function may be called from outside or inside the event loop thread.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_event_loop_schedule_task_now (event_loop : * mut aws_event_loop , task : * mut aws_task) ; } unsafe extern "C" { # [doc = " Variant of aws_event_loop_schedule_task_now that forces all tasks to go through the cross thread task queue,\n guaranteeing that order-of-submission is order-of-execution.  If you need this guarantee, you must use this\n function; the base function contains short-circuiting logic that breaks ordering invariants.  Beyond that, all\n properties of aws_event_loop_schedule_task_now apply to this function as well.\n\n Serialization guarantee does not apply to task cancellation (which can occur out-of-order or even out-of-thread in\n certain cases)."] pub fn aws_event_loop_schedule_task_now_serialized (event_loop : * mut aws_event_loop , task : * mut aws_task) ; } unsafe extern "C" { # [doc = " The event loop will schedule the task and run it at the specified time.\n Use aws_event_loop_current_clock_time() to query the current time in nanoseconds.\n Note that cancelled tasks may execute outside the event loop thread.\n This function may be called from outside or inside the event loop thread.\n\n The task should not be cleaned up or modified until its function is executed."] pub fn aws_event_loop_schedule_task_future (event_loop : * mut aws_event_loop , task : * mut aws_task , run_at_nanos : u64) ; } unsafe extern "C" { # [doc = " Cancels task.\n This function must be called from the event loop's thread, and is only guaranteed\n to work properly on tasks scheduled from within the event loop's thread.\n The task will be executed with the AWS_TASK_STATUS_CANCELED status inside this call."] pub fn aws_event_loop_cancel_task (event_loop : * mut aws_event_loop , task : * mut aws_task) ; } unsafe extern "C" { # [doc = " Returns true if the event loop's thread is the same thread that called this function, otherwise false."] pub fn aws_event_loop_thread_is_callers_thread (event_loop : * mut aws_event_loop) -> bool ; } unsafe extern "C" { # [doc = " Gets the current timestamp for the event loop's clock, in nanoseconds. This function is thread-safe."] pub fn aws_event_loop_current_clock_time (event_loop : * const aws_event_loop , time_nanos : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Creation function for event loop groups."] pub fn aws_event_loop_group_new (allocator : * mut aws_allocator , options : * const aws_event_loop_group_options) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " Increments the reference count on the event loop group, allowing the caller to take a reference to it.\n\n Returns the same event loop group passed in."] pub fn aws_event_loop_group_acquire (el_group : * mut aws_event_loop_group) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " Decrements an event loop group's ref count.  When the ref count drops to zero, the event loop group will be\n destroyed."] pub fn aws_event_loop_group_release (el_group : * mut aws_event_loop_group) ; } unsafe extern "C" { # [doc = " Increments the reference count on the event loop group from event loop, allowing the caller to take a reference to\n it.\n\n Returns the base event loop group of the event loop, or null if the event loop does not belong to a group."] pub fn aws_event_loop_group_acquire_from_event_loop (event_loop : * mut aws_event_loop) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " Decrements the ref count of the event loop's base event loop group.  When the ref count drops to zero, the event loop\n group will be destroyed."] pub fn aws_event_loop_group_release_from_event_loop (event_loop : * mut aws_event_loop) ; } unsafe extern "C" { # [doc = " Returns the event loop at a particular index.  If the index is out of bounds, null is returned."] pub fn aws_event_loop_group_get_loop_at (el_group : * mut aws_event_loop_group , index : usize) -> * mut aws_event_loop ; } unsafe extern "C" { # [doc = " Gets the number of event loops managed by an event loop group."] pub fn aws_event_loop_group_get_loop_count (el_group : * const aws_event_loop_group) -> usize ; } unsafe extern "C" { # [doc = " Gets the event loop type used by an event loop group."] pub fn aws_event_loop_group_get_type (el_group : * const aws_event_loop_group) -> aws_event_loop_type ; } unsafe extern "C" { # [doc = " Fetches the next loop for use. The purpose is to enable load balancing across loops. You should not depend on how\n this load balancing is done as it is subject to change in the future. Currently it uses the \"best-of-two\" algorithm\n based on the load factor of each loop."] pub fn aws_event_loop_group_get_next_loop (el_group : * mut aws_event_loop_group) -> * mut aws_event_loop ; } unsafe extern "C" { # [doc = " @deprecated - use aws_event_loop_group_new() instead"] pub fn aws_event_loop_group_new_default (alloc : * mut aws_allocator , max_threads : u16 , shutdown_options : * const aws_shutdown_callback_options) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " @deprecated - use aws_event_loop_group_new() instead"] pub fn aws_event_loop_group_new_default_pinned_to_cpu_group (alloc : * mut aws_allocator , max_threads : u16 , cpu_group : u16 , shutdown_options : * const aws_shutdown_callback_options) -> * mut aws_event_loop_group ; } unsafe extern "C" { # [doc = " @internal - Don't use outside of testing.\n\n Returns the opaque internal user data of an event loop.  Can be cast into a specific implementation by\n privileged consumers."] pub fn aws_event_loop_get_impl (event_loop : * mut aws_event_loop) -> * mut :: libc :: c_void ; } unsafe extern "C" { # [doc = " @internal - Don't use outside of testing.\n\n Initializes the base structure used by all event loop implementations with test-oriented overrides."] pub fn aws_event_loop_new_base (allocator : * mut aws_allocator , clock : aws_io_clock_fn , vtable : * mut aws_event_loop_vtable , impl_ : * mut :: libc :: c_void) -> * mut aws_event_loop ; } unsafe extern "C" { # [doc = " @internal - Don't use outside of testing.\n\n Common cleanup code for all implementations.\n This is only called from the *destroy() function of event loop implementations."] pub fn aws_event_loop_clean_up_base (event_loop : * mut aws_event_loop) ; } unsafe extern "C" { # [doc = " @internal - Don't use outside of testing.\n\n Destroys an event loop implementation.\n If the event loop is still in a running state, this function will block waiting on the event loop to shutdown.\n If the event loop is shared by multiple threads then destroy must be called by exactly one thread. All other threads\n must ensure their API calls to the event loop happen-before the call to destroy.\n\n Internally, this calls aws_event_loop_start_destroy() followed by aws_event_loop_complete_destroy()"] pub fn aws_event_loop_destroy (event_loop : * mut aws_event_loop) ; } unsafe extern "C" { # [doc = " @internal\n\n Signals an event loop to begin its destruction process.  If an event loop's implementation of this API does anything,\n it must be quick and non-blocking.  Most event loop implementations have an empty implementation for this function."] pub fn aws_event_loop_start_destroy (event_loop : * mut aws_event_loop) ; } unsafe extern "C" { # [doc = " @internal\n\n Waits for an event loop to complete its destruction process.  aws_event_loop_start_destroy() must have been called\n previously for this function to not deadlock."] pub fn aws_event_loop_complete_destroy (event_loop : * mut aws_event_loop) ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_stream_seek_basis { AWS_SSB_BEGIN = 0 , AWS_SSB_END = 2 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_stream_status { pub is_end_of_stream : bool , pub is_valid : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_stream_status"] [:: std :: mem :: size_of :: < aws_stream_status > () - 2usize] ; ["Alignment of aws_stream_status"] [:: std :: mem :: align_of :: < aws_stream_status > () - 1usize] ; ["Offset of field: aws_stream_status::is_end_of_stream"] [:: std :: mem :: offset_of ! (aws_stream_status , is_end_of_stream) - 0usize] ; ["Offset of field: aws_stream_status::is_valid"] [:: std :: mem :: offset_of ! (aws_stream_status , is_valid) - 1usize] ; } ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_input_stream_vtable { pub seek : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream , offset : i64 , basis : aws_stream_seek_basis) -> :: libc :: c_int > , # [doc = " Stream as much data as will fit into the destination buffer and update its length.\n The destination buffer's capacity MUST NOT be changed.\n\n Return AWS_OP_SUCCESS if the read is successful.\n If AWS_OP_ERR is returned, the stream is assumed to be invalid and any data written to the buffer is ignored.\n\n If no more data is currently available, or the end of the stream has been reached, simply return AWS_OP_SUCCESS\n without touching the destination buffer."] pub read : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream , dest : * mut aws_byte_buf) -> :: libc :: c_int > , pub get_status : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream , status : * mut aws_stream_status) -> :: libc :: c_int > , pub get_length : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream , out_length : * mut i64) -> :: libc :: c_int > , # [doc = " Optional.\n If not set, the default aws_ref_count_acquire/release will be used.\n Set for high level language binding that has its own refcounting implementation and needs to be kept alive from\n C.\n If set, ref_count member will not be used."] pub acquire : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream) > , pub release : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut aws_input_stream) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_input_stream_vtable"] [:: std :: mem :: size_of :: < aws_input_stream_vtable > () - 48usize] ; ["Alignment of aws_input_stream_vtable"] [:: std :: mem :: align_of :: < aws_input_stream_vtable > () - 8usize] ; ["Offset of field: aws_input_stream_vtable::seek"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , seek) - 0usize] ; ["Offset of field: aws_input_stream_vtable::read"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , read) - 8usize] ; ["Offset of field: aws_input_stream_vtable::get_status"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , get_status) - 16usize] ; ["Offset of field: aws_input_stream_vtable::get_length"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , get_length) - 24usize] ; ["Offset of field: aws_input_stream_vtable::acquire"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , acquire) - 32usize] ; ["Offset of field: aws_input_stream_vtable::release"] [:: std :: mem :: offset_of ! (aws_input_stream_vtable , release) - 40usize] ; } ; # [doc = " Base class for input streams.\n Note: when you implement one input stream, the ref_count needs to be initialized to clean up the resource when\n reaches to zero."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_input_stream { pub impl_ : * mut :: libc :: c_void , pub vtable : * const aws_input_stream_vtable , pub ref_count : aws_ref_count , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_input_stream"] [:: std :: mem :: size_of :: < aws_input_stream > () - 40usize] ; ["Alignment of aws_input_stream"] [:: std :: mem :: align_of :: < aws_input_stream > () - 8usize] ; ["Offset of field: aws_input_stream::impl_"] [:: std :: mem :: offset_of ! (aws_input_stream , impl_) - 0usize] ; ["Offset of field: aws_input_stream::vtable"] [:: std :: mem :: offset_of ! (aws_input_stream , vtable) - 8usize] ; ["Offset of field: aws_input_stream::ref_count"] [:: std :: mem :: offset_of ! (aws_input_stream , ref_count) - 16usize] ; } ; impl Default for aws_input_stream { 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 () } } } unsafe extern "C" { # [doc = " Increments the reference count on the input stream, allowing the caller to take a reference to it.\n\n Returns the same input stream passed in."] pub fn aws_input_stream_acquire (stream : * mut aws_input_stream) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Decrements a input stream's ref count.  When the ref count drops to zero, the input stream will be destroyed.\n\n Returns NULL always."] pub fn aws_input_stream_release (stream : * mut aws_input_stream) -> * mut aws_input_stream ; } unsafe extern "C" { pub fn aws_input_stream_seek (stream : * mut aws_input_stream , offset : i64 , basis : aws_stream_seek_basis) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_input_stream_read (stream : * mut aws_input_stream , dest : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_input_stream_get_status (stream : * mut aws_input_stream , status : * mut aws_stream_status) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_input_stream_get_length (stream : * mut aws_input_stream , out_length : * mut i64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_input_stream_destroy (stream : * mut aws_input_stream) ; } unsafe extern "C" { pub fn aws_input_stream_new_from_cursor (allocator : * mut aws_allocator , cursor : * const aws_byte_cursor) -> * mut aws_input_stream ; } unsafe extern "C" { pub fn aws_input_stream_new_from_file (allocator : * mut aws_allocator , file_name : * const :: libc :: c_char) -> * mut aws_input_stream ; } unsafe extern "C" { pub fn aws_input_stream_new_from_open_file (allocator : * mut aws_allocator , file : * mut FILE) -> * mut aws_input_stream ; } # [doc = " Data representing a URI. uri_str is always allocated and filled in.\n The other portions are merely storing offsets into uri_str."] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 : u32 , pub path : aws_byte_cursor , pub query_string : aws_byte_cursor , pub path_and_query : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_uri"] [:: std :: mem :: size_of :: < aws_uri > () - 200usize] ; ["Alignment of aws_uri"] [:: std :: mem :: align_of :: < aws_uri > () - 8usize] ; ["Offset of field: aws_uri::self_size"] [:: std :: mem :: offset_of ! (aws_uri , self_size) - 0usize] ; ["Offset of field: aws_uri::allocator"] [:: std :: mem :: offset_of ! (aws_uri , allocator) - 8usize] ; ["Offset of field: aws_uri::uri_str"] [:: std :: mem :: offset_of ! (aws_uri , uri_str) - 16usize] ; ["Offset of field: aws_uri::scheme"] [:: std :: mem :: offset_of ! (aws_uri , scheme) - 48usize] ; ["Offset of field: aws_uri::authority"] [:: std :: mem :: offset_of ! (aws_uri , authority) - 64usize] ; ["Offset of field: aws_uri::userinfo"] [:: std :: mem :: offset_of ! (aws_uri , userinfo) - 80usize] ; ["Offset of field: aws_uri::user"] [:: std :: mem :: offset_of ! (aws_uri , user) - 96usize] ; ["Offset of field: aws_uri::password"] [:: std :: mem :: offset_of ! (aws_uri , password) - 112usize] ; ["Offset of field: aws_uri::host_name"] [:: std :: mem :: offset_of ! (aws_uri , host_name) - 128usize] ; ["Offset of field: aws_uri::port"] [:: std :: mem :: offset_of ! (aws_uri , port) - 144usize] ; ["Offset of field: aws_uri::path"] [:: std :: mem :: offset_of ! (aws_uri , path) - 152usize] ; ["Offset of field: aws_uri::query_string"] [:: std :: mem :: offset_of ! (aws_uri , query_string) - 168usize] ; ["Offset of field: aws_uri::path_and_query"] [:: std :: mem :: offset_of ! (aws_uri , path_and_query) - 184usize] ; } ; 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\n will be stored in key"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_uri_param { pub key : aws_byte_cursor , pub value : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_uri_param"] [:: std :: mem :: size_of :: < aws_uri_param > () - 32usize] ; ["Alignment of aws_uri_param"] [:: std :: mem :: align_of :: < aws_uri_param > () - 8usize] ; ["Offset of field: aws_uri_param::key"] [:: std :: mem :: offset_of ! (aws_uri_param , key) - 0usize] ; ["Offset of field: aws_uri_param::value"] [:: std :: mem :: offset_of ! (aws_uri_param , value) - 16usize] ; } ; 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\n be initialized before passing them to aws_uri_init().\n\n query_string and query_params are exclusive to each other. If you set\n query_string, do not prepend it with '?'"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_uri_builder_options { pub scheme : aws_byte_cursor , pub path : aws_byte_cursor , pub host_name : aws_byte_cursor , pub port : u32 , pub query_params : * mut aws_array_list , pub query_string : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_uri_builder_options"] [:: std :: mem :: size_of :: < aws_uri_builder_options > () - 80usize] ; ["Alignment of aws_uri_builder_options"] [:: std :: mem :: align_of :: < aws_uri_builder_options > () - 8usize] ; ["Offset of field: aws_uri_builder_options::scheme"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , scheme) - 0usize] ; ["Offset of field: aws_uri_builder_options::path"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , path) - 16usize] ; ["Offset of field: aws_uri_builder_options::host_name"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , host_name) - 32usize] ; ["Offset of field: aws_uri_builder_options::port"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , port) - 48usize] ; ["Offset of field: aws_uri_builder_options::query_params"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , query_params) - 56usize] ; ["Offset of field: aws_uri_builder_options::query_string"] [:: std :: mem :: offset_of ! (aws_uri_builder_options , query_string) - 64usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Parses 'uri_str' and initializes uri. Returns AWS_OP_SUCCESS, on success, AWS_OP_ERR on failure.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Initializes uri to values specified in options. Returns AWS_OP_SUCCESS, on success, AWS_OP_ERR on failure.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_uri_clean_up (uri : * mut aws_uri) ; } unsafe extern "C" { # [doc = " Returns the scheme portion of the uri (e.g. http, https, ftp, ftps, etc...). If the scheme was not present\n in the uri, the returned value will be empty. It is the users job to determine the appropriate defaults\n if this field is empty, based on protocol, port, etc..."] pub fn aws_uri_scheme (uri : * const aws_uri) -> * const aws_byte_cursor ; } unsafe extern "C" { # [doc = " Returns the authority portion of the uri (host[:port]). If it was not present, this was a request uri. In that\n case, the value will be empty."] pub fn aws_uri_authority (uri : * const aws_uri) -> * const aws_byte_cursor ; } unsafe extern "C" { # [doc = " Returns the path portion of the uri, including any leading '/'. If not present, this value will be empty."] pub fn aws_uri_path (uri : * const aws_uri) -> * const aws_byte_cursor ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Returns the port portion of the authority if it was present, otherwise, returns 0.\n 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) -> u32 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " For iterating over the params in the query string.\n `param` is an in/out argument used to track progress, it MUST be zeroed out to start.\n If true is returned, `param` contains the value of the next param.\n If false is returned, there are no further params.\n\n Edge cases:\n 1) Entries without '=' sign are treated as having a key and no value.\n    Example: First param in query string \"a&b=c\" has key=\"a\" value=\"\"\n\n 2) Blank entries are skipped.\n    Example: The only param in query string \"&&a=b\" is key=\"a\" value=\"b\""] pub fn aws_query_string_next_param (query_string : aws_byte_cursor , param : * mut aws_uri_param) -> bool ; } unsafe extern "C" { # [doc = " Parses query string and stores the parameters in 'out_params'. Returns AWS_OP_SUCCESS on success and\n AWS_OP_ERR on failure. The user is responsible for initializing out_params with item size of struct aws_query_param.\n The user is also responsible for cleaning up out_params when finished."] pub fn aws_query_string_params (query_string : aws_byte_cursor , out_params : * mut aws_array_list) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " For iterating over the params in the uri query string.\n `param` is an in/out argument used to track progress, it MUST be zeroed out to start.\n If true is returned, `param` contains the value of the next param.\n If false is returned, there are no further params.\n\n Edge cases:\n 1) Entries without '=' sign are treated as having a key and no value.\n    Example: First param in query string \"a&b=c\" has key=\"a\" value=\"\"\n\n 2) Blank entries are skipped.\n    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 ; } unsafe extern "C" { # [doc = " Parses query string and stores the parameters in 'out_params'. Returns AWS_OP_SUCCESS on success and\n AWS_OP_ERR on failure. The user is responsible for initializing out_params with item size of struct aws_query_param.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Writes the uri path encoding of a cursor to a buffer.  This is the modified version of rfc3986 used by\n sigv4 signing."] pub fn aws_byte_buf_append_encoding_uri_path (buffer : * mut aws_byte_buf , cursor : * const aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Writes the uri query param encoding (passthrough alnum + '-' '_' '~' '.') of a UTF-8 cursor to a buffer\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Writes the uri decoding of a UTF-8 cursor to a buffer,\n replacing %xx escapes by their single byte equivalent.\n 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) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_errors { AWS_ERROR_S3_MISSING_CONTENT_RANGE_HEADER = 14336 , AWS_ERROR_S3_INVALID_CONTENT_RANGE_HEADER = 14337 , AWS_ERROR_S3_MISSING_CONTENT_LENGTH_HEADER = 14338 , AWS_ERROR_S3_INVALID_CONTENT_LENGTH_HEADER = 14339 , AWS_ERROR_S3_MISSING_ETAG = 14340 , AWS_ERROR_S3_INTERNAL_ERROR = 14341 , AWS_ERROR_S3_SLOW_DOWN = 14342 , AWS_ERROR_S3_INVALID_RESPONSE_STATUS = 14343 , AWS_ERROR_S3_MISSING_UPLOAD_ID = 14344 , AWS_ERROR_S3_PROXY_PARSE_FAILED = 14345 , AWS_ERROR_S3_UNSUPPORTED_PROXY_SCHEME = 14346 , AWS_ERROR_S3_CANCELED = 14347 , AWS_ERROR_S3_INVALID_RANGE_HEADER = 14348 , AWS_ERROR_S3_MULTIRANGE_HEADER_UNSUPPORTED = 14349 , AWS_ERROR_S3_RESPONSE_CHECKSUM_MISMATCH = 14350 , AWS_ERROR_S3_CHECKSUM_CALCULATION_FAILED = 14351 , AWS_ERROR_S3_PAUSED = 14352 , AWS_ERROR_S3_LIST_PARTS_PARSE_FAILED = 14353 , AWS_ERROR_S3_RESUMED_PART_CHECKSUM_MISMATCH = 14354 , AWS_ERROR_S3_RESUME_FAILED = 14355 , AWS_ERROR_S3_OBJECT_MODIFIED = 14356 , AWS_ERROR_S3_NON_RECOVERABLE_ASYNC_ERROR = 14357 , AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE = 14358 , AWS_ERROR_S3_INCORRECT_CONTENT_LENGTH = 14359 , AWS_ERROR_S3_REQUEST_TIME_TOO_SKEWED = 14360 , AWS_ERROR_S3_FILE_MODIFIED = 14361 , AWS_ERROR_S3_EXCEEDS_MEMORY_LIMIT = 14362 , AWS_ERROR_S3_INVALID_MEMORY_LIMIT_CONFIG = 14363 , AWS_ERROR_S3EXPRESS_CREATE_SESSION_FAILED = 14364 , AWS_ERROR_S3_INTERNAL_PART_SIZE_MISMATCH_RETRYING_WITH_RANGE = 14365 , AWS_ERROR_S3_REQUEST_HAS_COMPLETED = 14366 , AWS_ERROR_S3_RECV_FILE_ALREADY_EXISTS = 14367 , AWS_ERROR_S3_RECV_FILE_NOT_FOUND = 14368 , AWS_ERROR_S3_REQUEST_TIMEOUT = 14369 , AWS_ERROR_S3_BUFFER_ALLOCATION_FAILED = 14370 , AWS_ERROR_S3_END_RANGE = 15359 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_subject { AWS_LS_S3_GENERAL = 14336 , AWS_LS_S3_CLIENT = 14337 , AWS_LS_S3_CLIENT_STATS = 14338 , AWS_LS_S3_REQUEST = 14339 , AWS_LS_S3_META_REQUEST = 14340 , AWS_LS_S3_ENDPOINT = 14341 , AWS_LS_S3_LAST = 15359 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_platform_info { pub instance_type : aws_byte_cursor , pub max_throughput_gbps : f64 , pub has_recommended_configuration : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_platform_info"] [:: std :: mem :: size_of :: < aws_s3_platform_info > () - 32usize] ; ["Alignment of aws_s3_platform_info"] [:: std :: mem :: align_of :: < aws_s3_platform_info > () - 8usize] ; ["Offset of field: aws_s3_platform_info::instance_type"] [:: std :: mem :: offset_of ! (aws_s3_platform_info , instance_type) - 0usize] ; ["Offset of field: aws_s3_platform_info::max_throughput_gbps"] [:: std :: mem :: offset_of ! (aws_s3_platform_info , max_throughput_gbps) - 16usize] ; ["Offset of field: aws_s3_platform_info::has_recommended_configuration"] [:: std :: mem :: offset_of ! (aws_s3_platform_info , has_recommended_configuration) - 24usize] ; } ; impl Default for aws_s3_platform_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 () } } } unsafe extern "C" { # [doc = " Initializes internal datastructures used by aws-c-s3.\n Must be called before using any functionality in aws-c-s3."] pub fn aws_s3_library_init (allocator : * mut aws_allocator) ; } unsafe extern "C" { # [doc = " Shuts down the internal datastructures used by aws-c-s3."] pub fn aws_s3_library_clean_up () ; } unsafe extern "C" { pub fn aws_s3_get_current_platform_info () -> * const aws_s3_platform_info ; } unsafe extern "C" { pub fn aws_s3_get_current_platform_ec2_intance_type (cached_only : bool) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_s3_get_platforms_with_recommended_config () -> aws_array_list ; } # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_future_s3_buffer_ticket { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_new (alloc : * mut aws_allocator) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_set_result_by_move (future : * mut aws_future_s3_buffer_ticket , pointer_address : * mut * mut aws_s3_buffer_ticket) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_get_result_by_move (future : * mut aws_future_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_peek_result (future : * const aws_future_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_acquire (future : * mut aws_future_s3_buffer_ticket) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_release (future : * mut aws_future_s3_buffer_ticket) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_set_error (future : * mut aws_future_s3_buffer_ticket , error_code : :: libc :: c_int) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_is_done (future : * const aws_future_s3_buffer_ticket) -> bool ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_get_error (future : * const aws_future_s3_buffer_ticket) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_register_callback (future : * mut aws_future_s3_buffer_ticket , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_register_callback_if_not_done (future : * mut aws_future_s3_buffer_ticket , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_register_event_loop_callback (future : * mut aws_future_s3_buffer_ticket , event_loop : * mut aws_event_loop , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_register_channel_callback (future : * mut aws_future_s3_buffer_ticket , channel : * mut aws_channel , on_done : aws_future_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " aws_future<aws_s3_buffer_ticket*>\n Buffer ticket future used for reservations."] pub fn aws_future_s3_buffer_ticket_wait (future : * mut aws_future_s3_buffer_ticket , timeout_ns : u64) -> bool ; } # [doc = " Meta information about ticket reservation request."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_buffer_pool_reserve_meta { pub client : * mut aws_s3_client , pub meta_request : * mut aws_s3_meta_request , pub size : usize , pub can_block : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_pool_reserve_meta"] [:: std :: mem :: size_of :: < aws_s3_buffer_pool_reserve_meta > () - 32usize] ; ["Alignment of aws_s3_buffer_pool_reserve_meta"] [:: std :: mem :: align_of :: < aws_s3_buffer_pool_reserve_meta > () - 8usize] ; ["Offset of field: aws_s3_buffer_pool_reserve_meta::client"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_reserve_meta , client) - 0usize] ; ["Offset of field: aws_s3_buffer_pool_reserve_meta::meta_request"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_reserve_meta , meta_request) - 8usize] ; ["Offset of field: aws_s3_buffer_pool_reserve_meta::size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_reserve_meta , size) - 16usize] ; ["Offset of field: aws_s3_buffer_pool_reserve_meta::can_block"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_reserve_meta , can_block) - 24usize] ; } ; impl Default for aws_s3_buffer_pool_reserve_meta { 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)] pub struct aws_s3_buffer_ticket_vtable { # [doc = " Get buffer associated with the ticket.\n Note: can be called multiple times and the same buffer should be returned. In some cases ticket might not be\n claimed at all."] pub claim : :: std :: option :: Option < unsafe extern "C" fn (ticket : * mut aws_s3_buffer_ticket) -> aws_byte_buf > , pub acquire : :: std :: option :: Option < unsafe extern "C" fn (ticket : * mut aws_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket > , pub release : :: std :: option :: Option < unsafe extern "C" fn (ticket : * mut aws_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_ticket_vtable"] [:: std :: mem :: size_of :: < aws_s3_buffer_ticket_vtable > () - 24usize] ; ["Alignment of aws_s3_buffer_ticket_vtable"] [:: std :: mem :: align_of :: < aws_s3_buffer_ticket_vtable > () - 8usize] ; ["Offset of field: aws_s3_buffer_ticket_vtable::claim"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket_vtable , claim) - 0usize] ; ["Offset of field: aws_s3_buffer_ticket_vtable::acquire"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket_vtable , acquire) - 8usize] ; ["Offset of field: aws_s3_buffer_ticket_vtable::release"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket_vtable , release) - 16usize] ; } ; # [doc = " Generic memory pool interface.\n Allows consumers of aws-c-s3 to override how buffer allocation for part buffers is done.\n Refer to docs/memory_aware_request_execution.md for details on how default implementation works.\n WARNING: this is currently experimental feature and does not provide API stability guarantees so should be used with\n caution. At highlevel the flow is as follows:\n - crt scheduler queues up requests to be prepared\n - requests being prepared will try to reserve mem (i.e. obtain a ticket) and wait until they get it before proceeding\n - once mem is reserved requests will proceed with the pipeline\n - request will acquire buffer from the ticket when needed\n - ticket is released when request is done with the buffer\n Note: in some cases pipeline can stall if new buffer cannot be allocated (ex. async writes flow).\n In this case reserve request will indicate that not granting the ticket can block and buffer pool should try to\n allocate ticket right away (or wait and call waker when mem is allocated for the case of async writes).\n Note for custom pool implementations: Scheduler keeps track of all outstanding futures and will error them out when\n request is paused or cancelled. Its still fine for memory pool implementation to deliver ticket (it will just be\n released by future right away with no side effects) or just ignore the future if its already in error state."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_buffer_ticket { pub vtable : * mut aws_s3_buffer_ticket_vtable , pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_ticket"] [:: std :: mem :: size_of :: < aws_s3_buffer_ticket > () - 40usize] ; ["Alignment of aws_s3_buffer_ticket"] [:: std :: mem :: align_of :: < aws_s3_buffer_ticket > () - 8usize] ; ["Offset of field: aws_s3_buffer_ticket::vtable"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket , vtable) - 0usize] ; ["Offset of field: aws_s3_buffer_ticket::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket , ref_count) - 8usize] ; ["Offset of field: aws_s3_buffer_ticket::impl_"] [:: std :: mem :: offset_of ! (aws_s3_buffer_ticket , impl_) - 32usize] ; } ; impl Default for aws_s3_buffer_ticket { 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 () } } } unsafe extern "C" { pub fn aws_s3_buffer_ticket_claim (ticket : * mut aws_s3_buffer_ticket) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_s3_buffer_ticket_acquire (ticket : * mut aws_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket ; } unsafe extern "C" { pub fn aws_s3_buffer_ticket_release (ticket : * mut aws_s3_buffer_ticket) -> * mut aws_s3_buffer_ticket ; } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_buffer_pool_vtable { pub reserve : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool , meta : aws_s3_buffer_pool_reserve_meta) -> * mut aws_future_s3_buffer_ticket > , # [doc = " Trim the pool. This is mostly a suggestion, which pool can decide to ignore. Triggered by CRT when\n client has been idle for some time."] pub trim : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool) > , # [doc = " Optimize the buffer pool for allocations of a specific size.\n Creates a separate list of blocks dedicated to this size for better memory efficiency."] pub add_special_size : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool , buffer_size : usize) -> :: libc :: c_int > , # [doc = " Release all special-sized blocks from the buffer pool.\n This frees all memory allocated for the special size optimization."] pub release_special_size : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool , buffer_size : usize) > , # [doc = " Align a range size to the buffer pool's allocation strategy.\n Returns the optimal aligned size based on the buffer pool's configuration."] pub derive_aligned_buffer_size : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool , size : u64) -> u64 > , pub acquire : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool) -> * mut aws_s3_buffer_pool > , pub release : :: std :: option :: Option < unsafe extern "C" fn (pool : * mut aws_s3_buffer_pool) -> * mut aws_s3_buffer_pool > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_pool_vtable"] [:: std :: mem :: size_of :: < aws_s3_buffer_pool_vtable > () - 56usize] ; ["Alignment of aws_s3_buffer_pool_vtable"] [:: std :: mem :: align_of :: < aws_s3_buffer_pool_vtable > () - 8usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::reserve"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , reserve) - 0usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::trim"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , trim) - 8usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::add_special_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , add_special_size) - 16usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::release_special_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , release_special_size) - 24usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::derive_aligned_buffer_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , derive_aligned_buffer_size) - 32usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::acquire"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , acquire) - 40usize] ; ["Offset of field: aws_s3_buffer_pool_vtable::release"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_vtable , release) - 48usize] ; } ; # [doc = " Polymorphic buffer pool."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_buffer_pool { pub vtable : * mut aws_s3_buffer_pool_vtable , pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_pool"] [:: std :: mem :: size_of :: < aws_s3_buffer_pool > () - 40usize] ; ["Alignment of aws_s3_buffer_pool"] [:: std :: mem :: align_of :: < aws_s3_buffer_pool > () - 8usize] ; ["Offset of field: aws_s3_buffer_pool::vtable"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool , vtable) - 0usize] ; ["Offset of field: aws_s3_buffer_pool::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool , ref_count) - 8usize] ; ["Offset of field: aws_s3_buffer_pool::impl_"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool , impl_) - 32usize] ; } ; impl Default for aws_s3_buffer_pool { 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 () } } } unsafe extern "C" { pub fn aws_s3_buffer_pool_reserve (buffer_pool : * mut aws_s3_buffer_pool , meta : aws_s3_buffer_pool_reserve_meta) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { pub fn aws_s3_buffer_pool_trim (buffer_pool : * mut aws_s3_buffer_pool) ; } unsafe extern "C" { pub fn aws_s3_buffer_pool_acquire (buffer_pool : * mut aws_s3_buffer_pool) -> * mut aws_s3_buffer_pool ; } unsafe extern "C" { pub fn aws_s3_buffer_pool_release (buffer_pool : * mut aws_s3_buffer_pool) -> * mut aws_s3_buffer_pool ; } # [doc = " Buffer pool configuration options."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_buffer_pool_config { pub client : * mut aws_s3_client , pub part_size : usize , pub max_part_size : usize , pub memory_limit : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_buffer_pool_config"] [:: std :: mem :: size_of :: < aws_s3_buffer_pool_config > () - 32usize] ; ["Alignment of aws_s3_buffer_pool_config"] [:: std :: mem :: align_of :: < aws_s3_buffer_pool_config > () - 8usize] ; ["Offset of field: aws_s3_buffer_pool_config::client"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_config , client) - 0usize] ; ["Offset of field: aws_s3_buffer_pool_config::part_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_config , part_size) - 8usize] ; ["Offset of field: aws_s3_buffer_pool_config::max_part_size"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_config , max_part_size) - 16usize] ; ["Offset of field: aws_s3_buffer_pool_config::memory_limit"] [:: std :: mem :: offset_of ! (aws_s3_buffer_pool_config , memory_limit) - 24usize] ; } ; impl Default for aws_s3_buffer_pool_config { 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 = " Factory to construct the pool for the given config. Passes along buffer related info configured on the client, which\n factory may ignore when considering how to construct pool.\n This implementation should fail if pool cannot be constructed for some reason (ex. if config params cannot be met),\n by logging failure reason, returning null and raising aws_error."] pub type aws_s3_buffer_pool_factory_fn = :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , config : aws_s3_buffer_pool_config , user_data : * mut :: libc :: c_void) -> * mut aws_s3_buffer_pool > ; unsafe extern "C" { # [doc = " Optimize the buffer pool for allocations of a specific size.\n Creates a separate list of blocks dedicated to this size for better memory efficiency.\n Allocations of exactly this size will use these special blocks instead of the regular primary/secondary storage.\n\n @param buffer_pool The buffer pool to optimize\n @param buffer_size The size to optimize for (must be > 0)\n @return AWS_OP_SUCCESS on success, AWS_OP_ERR on failure"] pub fn aws_s3_buffer_pool_add_special_size (buffer_pool : * mut aws_s3_buffer_pool , buffer_size : usize) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Release the special-sized blocks from the buffer pool.\n Should be called when done with the special-sized allocations.\n\n @param buffer_pool The buffer pool\n @param buffer_size The special size to release blocks for"] pub fn aws_s3_buffer_pool_release_special_size (buffer_pool : * mut aws_s3_buffer_pool , buffer_size : usize) ; } unsafe extern "C" { # [doc = " Align a range size to the buffer pool's allocation strategy.\n This function determines the optimal aligned size based on the buffer pool's configuration.\n For sizes within the primary allocation range, it aligns to chunk boundaries.\n For larger sizes that go to secondary storage, it returns the size as-is.\n\n @param buffer_pool The buffer pool to use for alignment (can be NULL, in which case size is returned unchanged)\n @param size The size to align\n @return The aligned size that's optimal for the buffer pool's allocation strategy"] pub fn aws_s3_buffer_pool_derive_aligned_buffer_size (buffer_pool : * mut aws_s3_buffer_pool , size : u64) -> u64 ; } pub type aws_should_sign_header_fn = :: std :: option :: Option < unsafe extern "C" fn (name : * const aws_byte_cursor , userdata : * mut :: libc :: c_void) -> bool > ; # [repr (u32)] # [non_exhaustive] # [doc = " A primitive RTTI indicator for signing configuration structs\n\n There must be one entry per config structure type and it's a fatal error\n to put the wrong value in the \"config_type\" member of your config structure."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_signing_config_type { AWS_SIGNING_CONFIG_AWS = 1 , } # [doc = " All signing configuration structs must match this by having\n the config_type member as the first member."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_signing_config_base { pub config_type : aws_signing_config_type , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_signing_config_base"] [:: std :: mem :: size_of :: < aws_signing_config_base > () - 4usize] ; ["Alignment of aws_signing_config_base"] [:: std :: mem :: align_of :: < aws_signing_config_base > () - 4usize] ; ["Offset of field: aws_signing_config_base::config_type"] [:: std :: mem :: offset_of ! (aws_signing_config_base , config_type) - 0usize] ; } ; impl Default for aws_signing_config_base { 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 (u32)] # [non_exhaustive] # [doc = " What version of the AWS signing process should we use."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_signing_algorithm { AWS_SIGNING_ALGORITHM_V4 = 0 , AWS_SIGNING_ALGORITHM_V4_ASYMMETRIC = 1 , AWS_SIGNING_ALGORITHM_V4_S3EXPRESS = 2 , } # [repr (u32)] # [non_exhaustive] # [doc = " What sort of signature should be computed from the signable?"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_signature_type { # [doc = " A signature for a full http request should be computed, with header updates applied to the signing result."] AWS_ST_HTTP_REQUEST_HEADERS = 0 , # [doc = " A signature for a full http request should be computed, with query param updates applied to the signing result."] AWS_ST_HTTP_REQUEST_QUERY_PARAMS = 1 , # [doc = " Compute a signature for a payload chunk. The signable's input stream should be the chunk data and the\n signable should contain the most recent signature value (either the original http request or the most recent\n chunk) in the \"previous-signature\" property."] AWS_ST_HTTP_REQUEST_CHUNK = 2 , # [doc = " Compute a signature for an event stream event. The signable's input stream should be the encoded event-stream\n message (headers + payload), the signable should contain the most recent signature value (either the original\n http request or the most recent event) in the \"previous-signature\" property.\n\n This option is only supported for Sigv4 for now."] AWS_ST_HTTP_REQUEST_EVENT = 3 , # [doc = " Compute a signature for an http request via it's already-computed canonical request.  Only the authorization\n signature header is added to the signing result."] AWS_ST_CANONICAL_REQUEST_HEADERS = 4 , # [doc = " Compute a signature for an http request via it's already-computed canonical request.  Only the authorization\n signature query param is added to the signing result."] AWS_ST_CANONICAL_REQUEST_QUERY_PARAMS = 5 , # [doc = " Compute a signature for the trailing headers.\n the signable should contain the most recent signature value (either the original http request or the most recent\n chunk) in the \"previous-signature\" property."] AWS_ST_HTTP_REQUEST_TRAILING_HEADERS = 6 , } unsafe extern "C" { # [doc = " The SHA-256 of an empty string:\n 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_empty_sha256 : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'UNSIGNED-PAYLOAD'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_unsigned_payload : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-UNSIGNED-PAYLOAD-TRAILER'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_unsigned_payload_trailer : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-HMAC-SHA256-PAYLOAD'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_aws4_hmac_sha256_payload : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-HMAC-SHA256-PAYLOAD-TRAILER'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_aws4_hmac_sha256_payload_trailer : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-ECDSA-P256-SHA256-PAYLOAD'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_aws4_ecdsa_p256_sha256_payload : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-ECDSA-P256-SHA256-PAYLOAD-TRAILER'\n For use with `aws_signing_config_aws.signed_body_value`."] pub static g_aws_signed_body_value_streaming_aws4_ecdsa_p256_sha256_payload_trailer : aws_byte_cursor ; } unsafe extern "C" { # [doc = " 'STREAMING-AWS4-HMAC-SHA256-EVENTS'\n For use with `aws_signing_config_aws.signed_body_value`.\n\n Event signing is only supported for Sigv4 for now."] pub static g_aws_signed_body_value_streaming_aws4_hmac_sha256_events : aws_byte_cursor ; } # [repr (u32)] # [non_exhaustive] # [doc = " Controls if signing adds a header containing the canonical request's body value"] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_signed_body_header_type { # [doc = " Do not add a header"] AWS_SBHT_NONE = 0 , # [doc = " Add the \"x-amz-content-sha256\" header with the canonical request's body value"] AWS_SBHT_X_AMZ_CONTENT_SHA256 = 1 , } # [doc = " A configuration structure for use in AWS-related signing.  Currently covers sigv4 only, but is not required to."] # [repr (C)] pub struct aws_signing_config_aws { # [doc = " What kind of config structure is this?"] pub config_type : aws_signing_config_type , # [doc = " What signing algorithm to use."] pub algorithm : aws_signing_algorithm , # [doc = " What sort of signature should be computed?"] pub signature_type : aws_signature_type , pub region : aws_byte_cursor , # [doc = " name of service to sign a request for"] pub service : aws_byte_cursor , # [doc = " Raw date to use during the signing process."] pub date : aws_date_time , # [doc = " Optional function to control which headers are a part of the canonical request.\n Skipping auth-required headers will result in an unusable signature.  Headers injected by the signing process\n are not skippable.\n\n This function does not override the internal check function (x-amzn-trace-id, user-agent), but rather\n supplements it.  In particular, a header will get signed if and only if it returns true to both\n the internal check (skips x-amzn-trace-id, user-agent) and this function (if defined)."] pub should_sign_header : aws_should_sign_header_fn , pub should_sign_header_ud : * mut :: libc :: c_void , pub flags : aws_signing_config_aws__bindgen_ty_1 , # [doc = " Optional string to use as the canonical request's body value.\n If string is empty, a value will be calculated from the payload during signing.\n Typically, this is the SHA-256 of the (request/chunk/event) payload, written as lowercase hex.\n If this has been precalculated, it can be set here. Special values used by certain services can also be set\n (e.g. \"UNSIGNED-PAYLOAD\" \"STREAMING-AWS4-HMAC-SHA256-PAYLOAD\" \"STREAMING-AWS4-HMAC-SHA256-EVENTS\")."] pub signed_body_value : aws_byte_cursor , # [doc = " Controls what body \"hash\" header, if any, should be added to the canonical request and the signed request:\n   AWS_SBHT_NONE - no header should be added\n   AWS_SBHT_X_AMZ_CONTENT_SHA256 - the body \"hash\" should be added in the X-Amz-Content-Sha256 header"] pub signed_body_header : aws_signed_body_header_type , pub credentials : * const aws_credentials , pub credentials_provider : * mut aws_credentials_provider , # [doc = " If non-zero and the signing transform is query param, then signing will add X-Amz-Expires to the query\n string, equal to the value specified here.  If this value is zero or if header signing is being used then\n this parameter has no effect."] pub expiration_in_seconds : u64 , } # [repr (C)] # [repr (align (4))] # [derive (Debug , Default , Copy , Clone)] pub struct aws_signing_config_aws__bindgen_ty_1 { pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub __bindgen_padding_0 : [u8 ; 3usize] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_signing_config_aws__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_signing_config_aws__bindgen_ty_1 > () - 4usize] ; ["Alignment of aws_signing_config_aws__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_signing_config_aws__bindgen_ty_1 > () - 4usize] ; } ; impl aws_signing_config_aws__bindgen_ty_1 { # [inline] pub fn use_double_uri_encode (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_use_double_uri_encode (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn use_double_uri_encode_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_use_double_uri_encode_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn should_normalize_uri_path (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_should_normalize_uri_path (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub unsafe fn should_normalize_uri_path_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 1usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_should_normalize_uri_path_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 1usize , 1u8 , val as u64 ,) } } # [inline] pub fn omit_session_token (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_omit_session_token (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub unsafe fn omit_session_token_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 2usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_omit_session_token_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 2usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (use_double_uri_encode : u32 , should_normalize_uri_path : u32 , omit_session_token : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let use_double_uri_encode : u32 = unsafe { :: std :: mem :: transmute (use_double_uri_encode) } ; use_double_uri_encode as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let should_normalize_uri_path : u32 = unsafe { :: std :: mem :: transmute (should_normalize_uri_path) } ; should_normalize_uri_path as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let omit_session_token : u32 = unsafe { :: std :: mem :: transmute (omit_session_token) } ; omit_session_token as u64 }) ; __bindgen_bitfield_unit } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_signing_config_aws"] [:: std :: mem :: size_of :: < aws_signing_config_aws > () - 256usize] ; ["Alignment of aws_signing_config_aws"] [:: std :: mem :: align_of :: < aws_signing_config_aws > () - 8usize] ; ["Offset of field: aws_signing_config_aws::config_type"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , config_type) - 0usize] ; ["Offset of field: aws_signing_config_aws::algorithm"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , algorithm) - 4usize] ; ["Offset of field: aws_signing_config_aws::signature_type"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , signature_type) - 8usize] ; ["Offset of field: aws_signing_config_aws::region"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , region) - 16usize] ; ["Offset of field: aws_signing_config_aws::service"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , service) - 32usize] ; ["Offset of field: aws_signing_config_aws::date"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , date) - 48usize] ; ["Offset of field: aws_signing_config_aws::should_sign_header"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , should_sign_header) - 184usize] ; ["Offset of field: aws_signing_config_aws::should_sign_header_ud"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , should_sign_header_ud) - 192usize] ; ["Offset of field: aws_signing_config_aws::flags"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , flags) - 200usize] ; ["Offset of field: aws_signing_config_aws::signed_body_value"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , signed_body_value) - 208usize] ; ["Offset of field: aws_signing_config_aws::signed_body_header"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , signed_body_header) - 224usize] ; ["Offset of field: aws_signing_config_aws::credentials"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , credentials) - 232usize] ; ["Offset of field: aws_signing_config_aws::credentials_provider"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , credentials_provider) - 240usize] ; ["Offset of field: aws_signing_config_aws::expiration_in_seconds"] [:: std :: mem :: offset_of ! (aws_signing_config_aws , expiration_in_seconds) - 248usize] ; } ; impl Default for aws_signing_config_aws { 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 () } } } unsafe extern "C" { # [doc = " Returns a c-string that describes the supplied signing algorithm\n\n @param algorithm signing algorithm to get a friendly string name for\n\n @return friendly string name of the supplied algorithm, or \"Unknown\" if the algorithm is not recognized"] pub fn aws_signing_algorithm_to_string (algorithm : aws_signing_algorithm) -> * const :: libc :: c_char ; } unsafe extern "C" { # [doc = " Checks a signing configuration for invalid settings combinations.\n\n @param config signing configuration to validate\n\n @return - AWS_OP_SUCCESS if the configuration is valid, AWS_OP_ERR otherwise"] pub fn aws_validate_aws_signing_config_aws (config : * const aws_signing_config_aws) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3express_credentials_provider { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_credentials_properties_s3express { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [doc = " A Meta Request represents a group of generated requests that are being done on behalf of the\n original request. For example, one large GetObject request can be transformed into a series\n of ranged GetObject requests that are executed in parallel to improve throughput.\n\n The aws_s3_meta_request_type is a hint of transformation to be applied."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_type { # [doc = " The Default meta request type sends any request to S3 as-is (with no transformation). For example,\n it can be used to pass a CreateBucket request."] AWS_S3_META_REQUEST_TYPE_DEFAULT = 0 , # [doc = " The GetObject request will be split into a series of ranged GetObject requests that are\n executed in parallel to improve throughput, when possible."] AWS_S3_META_REQUEST_TYPE_GET_OBJECT = 1 , # [doc = " The PutObject request will be split into MultiPart uploads that are executed in parallel\n to improve throughput, when possible.\n Note: put object supports both known and unknown body length. The client\n relies on Content-Length header to determine length of the body.\n Request with unknown content length are always sent using multipart\n upload regardless of final number of parts and do have the following limitations:\n - multipart threshold is ignored and all request are made through mpu,\n   even if they only need one part\n - pause/resume is not supported\n - meta request will throw error if checksum header is provider (due to\n   general limitation of checksum not being usable if meta request is\n   getting split)"] AWS_S3_META_REQUEST_TYPE_PUT_OBJECT = 2 , # [doc = " The CopyObject meta request performs a multi-part copy\n using multiple S3 UploadPartCopy requests in parallel, or bypasses\n a CopyObject request to S3 if the object size is not large enough for\n a multipart upload.\n Note: copy support is still in development and has following limitations:\n 1. host header must use virtual host addressing style (path style is not\n   supported) and both source and dest buckets must have dns compliant name\n 2. only {bucket}/{key} format is supported for source and passing arn as\n   source will not work\n 3. source bucket is assumed to be in the same region as dest\n 4. source bucket and dest bucket must both be either directory buckets or regular buckets.\n\n Provide the `meta_request_options.copy_source_uri` to bypass limitation 1 & 2."] AWS_S3_META_REQUEST_TYPE_COPY_OBJECT = 3 , # [doc = " The CopyObject meta request performs a multi-part copy\n using multiple S3 UploadPartCopy requests in parallel, or bypasses\n a CopyObject request to S3 if the object size is not large enough for\n a multipart upload.\n Note: copy support is still in development and has following limitations:\n 1. host header must use virtual host addressing style (path style is not\n   supported) and both source and dest buckets must have dns compliant name\n 2. only {bucket}/{key} format is supported for source and passing arn as\n   source will not work\n 3. source bucket is assumed to be in the same region as dest\n 4. source bucket and dest bucket must both be either directory buckets or regular buckets.\n\n Provide the `meta_request_options.copy_source_uri` to bypass limitation 1 & 2."] AWS_S3_META_REQUEST_TYPE_MAX = 4 , } impl aws_s3_request_type { pub const AWS_S3_REQUEST_TYPE_DEFAULT : aws_s3_request_type = aws_s3_request_type :: AWS_S3_REQUEST_TYPE_UNKNOWN ; } # [repr (u32)] # [non_exhaustive] # [doc = " The type of a single S3 HTTP request. Used by metrics.\n A meta-request can make multiple S3 HTTP requests under the hood.\n\n For example, AWS_S3_META_REQUEST_TYPE_PUT_OBJECT for a large file will\n do multipart upload, resulting in 3+ HTTP requests:\n AWS_S3_REQUEST_TYPE_CREATE_MULTIPART_UPLOAD, one or more AWS_S3_REQUEST_TYPE_UPLOAD_PART,\n and finally AWS_S3_REQUEST_TYPE_COMPLETE_MULTIPART_UPLOAD.\n\n aws_s3_request_type_operation_name() returns the S3 operation name\n for types that map (e.g. AWS_S3_REQUEST_TYPE_HEAD_OBJECT -> \"HeadObject\"),\n or empty string for types that don't map (e.g. AWS_S3_REQUEST_TYPE_UNKNOWN -> \"\")."] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_request_type { AWS_S3_REQUEST_TYPE_UNKNOWN = 0 , AWS_S3_REQUEST_TYPE_HEAD_OBJECT = 1 , AWS_S3_REQUEST_TYPE_GET_OBJECT = 2 , AWS_S3_REQUEST_TYPE_LIST_PARTS = 3 , AWS_S3_REQUEST_TYPE_CREATE_MULTIPART_UPLOAD = 4 , AWS_S3_REQUEST_TYPE_UPLOAD_PART = 5 , AWS_S3_REQUEST_TYPE_ABORT_MULTIPART_UPLOAD = 6 , AWS_S3_REQUEST_TYPE_COMPLETE_MULTIPART_UPLOAD = 7 , AWS_S3_REQUEST_TYPE_UPLOAD_PART_COPY = 8 , AWS_S3_REQUEST_TYPE_COPY_OBJECT = 9 , AWS_S3_REQUEST_TYPE_PUT_OBJECT = 10 , AWS_S3_REQUEST_TYPE_CREATE_SESSION = 11 , AWS_S3_REQUEST_TYPE_MAX = 12 , } # [doc = " Invoked to provide response headers received during execution of the meta request, both for\n success and error HTTP status codes.\n\n Return AWS_OP_SUCCESS to continue processing the request.\n\n Return aws_raise_error(E) to cancel the request.\n The error you raise will be reflected in `aws_s3_meta_request_result.error_code`.\n If you're not sure which error to raise, use AWS_ERROR_S3_CANCELED."] pub type aws_s3_meta_request_headers_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , headers : * const aws_http_headers , response_status : :: libc :: c_int , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked to provide the response body as it is received.\n\n Note: If you set `enable_read_backpressure` true on the S3 client,\n you must maintain the flow-control window.\n The flow-control window shrinks as you receive body data via this callback.\n Whenever the flow-control window reaches 0 you will stop downloading data.\n Use aws_s3_meta_request_increment_read_window() to increment the window and keep data flowing.\n Maintain a larger window to keep up a high download throughput,\n parts cannot download in parallel unless the window is large enough to hold multiple parts.\n Maintain a smaller window to limit the amount of data buffered in memory.\n\n If `manual_window_management` is false, you do not need to maintain the flow-control window.\n No back-pressure is applied and data arrives as fast as possible.\n\n Return AWS_OP_SUCCESS to continue processing the request.\n\n Return aws_raise_error(E) to cancel the request.\n The error you raise will be reflected in `aws_s3_meta_request_result.error_code`.\n If you're not sure which error to raise, use AWS_ERROR_S3_CANCELED."] pub type aws_s3_meta_request_receive_body_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , body : * const aws_byte_cursor , range_start : u64 , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Invoked when the entire meta request execution is complete."] pub type aws_s3_meta_request_finish_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , meta_request_result : * const aws_s3_meta_request_result , user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request_receive_body_extra_info { pub range_start : u64 , pub ticket : * mut aws_s3_buffer_ticket , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_receive_body_extra_info"] [:: std :: mem :: size_of :: < aws_s3_meta_request_receive_body_extra_info > () - 16usize] ; ["Alignment of aws_s3_meta_request_receive_body_extra_info"] [:: std :: mem :: align_of :: < aws_s3_meta_request_receive_body_extra_info > () - 8usize] ; ["Offset of field: aws_s3_meta_request_receive_body_extra_info::range_start"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_receive_body_extra_info , range_start) - 0usize] ; ["Offset of field: aws_s3_meta_request_receive_body_extra_info::ticket"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_receive_body_extra_info , ticket) - 8usize] ; } ; impl Default for aws_s3_meta_request_receive_body_extra_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 () } } } pub type aws_s3_meta_request_receive_body_callback_ex_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , body : * const aws_byte_cursor , info : aws_s3_meta_request_receive_body_extra_info , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " Information sent in the meta_request progress callback."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_meta_request_progress { pub bytes_transferred : u64 , pub content_length : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_progress"] [:: std :: mem :: size_of :: < aws_s3_meta_request_progress > () - 16usize] ; ["Alignment of aws_s3_meta_request_progress"] [:: std :: mem :: align_of :: < aws_s3_meta_request_progress > () - 8usize] ; ["Offset of field: aws_s3_meta_request_progress::bytes_transferred"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_progress , bytes_transferred) - 0usize] ; ["Offset of field: aws_s3_meta_request_progress::content_length"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_progress , content_length) - 8usize] ; } ; # [doc = " Invoked to report progress of a meta-request.\n For PutObject, progress refers to bytes uploaded.\n For CopyObject, progress refers to bytes copied.\n For GetObject, progress refers to bytes downloaded.\n For anything else, progress refers to response body bytes received."] pub type aws_s3_meta_request_progress_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , progress : * const aws_s3_meta_request_progress , user_data : * mut :: libc :: c_void) > ; # [doc = " Invoked to report the telemetry of the meta request once a single request finishes.\n Note: *metrics is only valid for the duration of the callback. If you need to keep it around, use\n `aws_s3_request_metrics_acquire`"] pub type aws_s3_meta_request_telemetry_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , metrics : * mut aws_s3_request_metrics , user_data : * mut :: libc :: c_void) > ; pub type aws_s3_meta_request_shutdown_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; pub type aws_s3_client_shutdown_complete_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [doc = " Optional callback, for you to provide the full object checksum after the object was read.\n Client will NOT check the checksum provided before sending it to the server.\n\n @param meta_request  pointer to the aws_s3_meta_request of the upload.\n @param user_data     pointer to the user_data set.\n\n @return A new string with the full object checksum, as it is sent in a PutObject request (base64-encoded):\n         https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#API_PutObject_RequestSyntax\n         If an error occurs, call aws_raise_error(E) with a proper error code and return NULL."] pub type aws_s3_meta_request_full_object_checksum_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , user_data : * mut :: libc :: c_void) -> * mut aws_string > ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_tls_mode { AWS_MR_TLS_ENABLED = 0 , AWS_MR_TLS_DISABLED = 1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_compute_content_md5 { AWS_MR_CONTENT_MD5_DISABLED = 0 , AWS_MR_CONTENT_MD5_ENABLED = 1 , } impl aws_s3_checksum_algorithm { pub const AWS_SCA_CRC32C : aws_s3_checksum_algorithm = aws_s3_checksum_algorithm :: AWS_SCA_INIT ; } impl aws_s3_checksum_algorithm { pub const AWS_SCA_END : aws_s3_checksum_algorithm = aws_s3_checksum_algorithm :: AWS_SCA_CRC64NVME ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_checksum_algorithm { AWS_SCA_NONE = 0 , AWS_SCA_INIT = 1 , AWS_SCA_CRC32 = 2 , AWS_SCA_SHA1 = 3 , AWS_SCA_SHA256 = 4 , AWS_SCA_CRC64NVME = 5 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_checksum_location { AWS_SCL_NONE = 0 , AWS_SCL_HEADER = 1 , AWS_SCL_TRAILER = 2 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_recv_file_options { # [doc = " Create a new file if it doesn't exist, otherwise replace the existing file."] AWS_S3_RECV_FILE_CREATE_OR_REPLACE = 0 , # [doc = " Always create a new file. If the file already exists, AWS_ERROR_S3_RECV_FILE_ALREADY_EXISTS will be raised."] AWS_S3_RECV_FILE_CREATE_NEW = 1 , # [doc = " Create a new file if it doesn't exist, otherwise append to the existing file."] AWS_S3_RECV_FILE_CREATE_OR_APPEND = 2 , # [doc = " Write to an existing file at the specified position, defined by the `recv_file_position`.\n If the file does not exist, AWS_ERROR_S3_RECV_FILE_NOT_FOUND will be raised.\n If `recv_file_position` is not configured, start overwriting data at the beginning of the\n file (byte 0)."] AWS_S3_RECV_FILE_WRITE_TO_POSITION = 3 , } # [doc = " WARNING: experimental/unstable:\n Controls how client performance file I/O operations. Only applies to the file based workload."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_file_io_options { # [doc = " Skip buffering the part in memory before sending the request.\n\n Default to false on small objects, and true when the object size exceed a certain threshold\n`g_streaming_object_size_threshold`."] pub should_stream : bool , # [doc = " The estimated disk throughput. Only be applied when `streaming_upload` is true.\n in gigabits per second (Gbps).\n\n Notes: There are possibilities that cannot reach the all available disk throughput:\n 1. Disk is busy with other applications\n 2. OS Cache may cap the throughput, use `direct_io` to get around this.\n\n Default to throughput_target_gbps."] pub disk_throughput_gbps : f64 , # [doc = " Enable direct IO to bypass the OS cache. Helpful when the disk I/O outperforms the kernel cache.\n Notes:\n - Only supported on linux for now.\n - Only supports upload for now.\n - Check NOTES for O_DIRECT for additional info https://man7.org/linux/man-pages/man2/openat.2.html\n In summary, O_DIRECT is a potentially powerful tool that should be used with caution."] pub direct_io : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_file_io_options"] [:: std :: mem :: size_of :: < aws_s3_file_io_options > () - 24usize] ; ["Alignment of aws_s3_file_io_options"] [:: std :: mem :: align_of :: < aws_s3_file_io_options > () - 8usize] ; ["Offset of field: aws_s3_file_io_options::should_stream"] [:: std :: mem :: offset_of ! (aws_s3_file_io_options , should_stream) - 0usize] ; ["Offset of field: aws_s3_file_io_options::disk_throughput_gbps"] [:: std :: mem :: offset_of ! (aws_s3_file_io_options , disk_throughput_gbps) - 8usize] ; ["Offset of field: aws_s3_file_io_options::direct_io"] [:: std :: mem :: offset_of ! (aws_s3_file_io_options , direct_io) - 16usize] ; } ; # [doc = " Info about a single part, for you to review before the upload completes."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_part_review { pub size : u64 , pub checksum : aws_byte_cursor , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_review"] [:: std :: mem :: size_of :: < aws_s3_upload_part_review > () - 24usize] ; ["Alignment of aws_s3_upload_part_review"] [:: std :: mem :: align_of :: < aws_s3_upload_part_review > () - 8usize] ; ["Offset of field: aws_s3_upload_part_review::size"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_review , size) - 0usize] ; ["Offset of field: aws_s3_upload_part_review::checksum"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_review , checksum) - 8usize] ; } ; impl Default for aws_s3_upload_part_review { 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 = " Info for you to review before an upload completes.\n\n WARNING: This feature is experimental/unstable.\n At this time, review is only available for multipart upload\n (when Content-Length is above the `multipart_upload_threshold`,\n or Content-Length not specified)."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_review { pub checksum_algorithm : aws_s3_checksum_algorithm , pub part_count : usize , pub part_array : * mut aws_s3_upload_part_review , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_review"] [:: std :: mem :: size_of :: < aws_s3_upload_review > () - 24usize] ; ["Alignment of aws_s3_upload_review"] [:: std :: mem :: align_of :: < aws_s3_upload_review > () - 8usize] ; ["Offset of field: aws_s3_upload_review::checksum_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_upload_review , checksum_algorithm) - 0usize] ; ["Offset of field: aws_s3_upload_review::part_count"] [:: std :: mem :: offset_of ! (aws_s3_upload_review , part_count) - 8usize] ; ["Offset of field: aws_s3_upload_review::part_array"] [:: std :: mem :: offset_of ! (aws_s3_upload_review , part_array) - 16usize] ; } ; impl Default for aws_s3_upload_review { 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 = " Optional callback, for you to review an upload before it completes.\n For example, you can review each part's checksum and fail the upload if\n you do not agree with them.\n\n @param meta_request pointer to the aws_s3_meta_request of the upload.\n @param info Detailed info about the upload.\n\n Return AWS_OP_SUCCESS to continue processing the request.\n\n Return aws_raise_error(E) to cancel the request.\n The error you raise will be reflected in `aws_s3_meta_request_result.error_code`.\n If you're not sure which error to raise, use AWS_ERROR_S3_CANCELED.\n\n WARNING: This feature is experimental/unstable.\n At this time, the callback is only invoked for multipart upload\n (when Content-Length is above the `multipart_upload_threshold`,\n or Content-Length not specified)."] pub type aws_s3_meta_request_upload_review_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , review : * const aws_s3_upload_review , user_data : * mut :: libc :: c_void) -> :: libc :: c_int > ; # [doc = " The factory function for S3 client to create a S3 Express credentials provider.\n The S3 client will be the only owner of the S3 Express credentials provider.\n\n During S3 client destruction, S3 client will start the destruction of the provider, and wait the\n on_provider_shutdown_callback to be invoked before the S3 client finish destruction.\n\n Note to implement the factory properly:\n - Make sure `on_provider_shutdown_callback` will be invoked after the provider finish shutdown, otherwise,\n leak will happen.\n - The provider must not acquire a reference to the client; otherwise, a circular reference will cause a deadlock.\n - The `client` provided CANNOT be used within the factory function call or the destructor.\n\n @param allocator    memory allocator to create the provider.\n @param client    The S3 client uses and owns the provider.\n @param on_provider_shutdown_callback    The callback to be invoked when the provider finishes shutdown.\n @param shutdown_user_data    The user data to invoke shutdown callback with\n @param user_data    The user data with the factory\n\n @return The aws_s3express_credentials_provider."] pub type aws_s3express_provider_factory_fn = :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , client : * mut aws_s3_client , on_provider_shutdown_callback : aws_simple_completion_callback , shutdown_user_data : * mut :: libc :: c_void , factory_user_data : * mut :: libc :: c_void) -> * mut aws_s3express_credentials_provider > ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_tcp_keep_alive_options { pub keep_alive_interval_sec : u16 , pub keep_alive_timeout_sec : u16 , pub keep_alive_max_failed_probes : u16 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_tcp_keep_alive_options"] [:: std :: mem :: size_of :: < aws_s3_tcp_keep_alive_options > () - 6usize] ; ["Alignment of aws_s3_tcp_keep_alive_options"] [:: std :: mem :: align_of :: < aws_s3_tcp_keep_alive_options > () - 2usize] ; ["Offset of field: aws_s3_tcp_keep_alive_options::keep_alive_interval_sec"] [:: std :: mem :: offset_of ! (aws_s3_tcp_keep_alive_options , keep_alive_interval_sec) - 0usize] ; ["Offset of field: aws_s3_tcp_keep_alive_options::keep_alive_timeout_sec"] [:: std :: mem :: offset_of ! (aws_s3_tcp_keep_alive_options , keep_alive_timeout_sec) - 2usize] ; ["Offset of field: aws_s3_tcp_keep_alive_options::keep_alive_max_failed_probes"] [:: std :: mem :: offset_of ! (aws_s3_tcp_keep_alive_options , keep_alive_max_failed_probes) - 4usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_client_config { pub max_active_connections_override : u32 , pub region : aws_byte_cursor , pub client_bootstrap : * mut aws_client_bootstrap , pub tls_mode : aws_s3_meta_request_tls_mode , pub tls_connection_options : * const aws_tls_connection_options , # [doc = " Optional.\n If set, this controls how the client interact with file I/O.\n Read `aws_s3_file_io_options` for details.\n  Notes: Only applies to meta requests with `send_filepath` set.\n  TODO: adapt it to `recv_filepath`.\n\n eg:\n - When the file is too large to fit in the buffer, set `should_stream` to avoid buffering the whole parts in\n  memory.\n - When the disk I/O is faster than OS cache, set `direct_io` to bypass the OS cache."] pub fio_opts : * mut aws_s3_file_io_options , # [doc = " Required.\n Configure the signing for the requests made from the client.\n - Credentials or credentials provider is required. Other configs are all optional, and will be default to what\n      needs to sign the request for S3, only overrides when Non-zero/Not-empty is set.\n - To skip signing, you can config it with anonymous credentials.\n - S3 Client will derive the right config for signing process based on this.\n\n Notes:\n - For AWS_SIGNING_ALGORITHM_V4_S3EXPRESS, S3 client will use the credentials in the config to derive the\n S3 Express credentials that are used in the signing process.\n - For other auth algorithm, client may make modifications to signing config before passing it on to signer.\n\n TODO: deprecate this structure from auth, introduce a new S3 specific one."] pub signing_config : * const aws_signing_config_aws , # [doc = " Optional.\n Size of parts the object will be downloaded or uploaded in, in bytes.\n This only affects AWS_S3_META_REQUEST_TYPE_GET_OBJECT and AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n\n If not set, a dynamic default part size will be used based on the throughput target, memory_limit_in_bytes.\n\n The client will adjust the part size for AWS_S3_META_REQUEST_TYPE_PUT_OBJECT if needed for service limits (max\n number of parts per upload is 10,000, minimum upload part size is 5 MiB).\n\n You can also set this per meta-request, via `aws_s3_meta_request_options.part_size`."] pub part_size : u64 , pub max_part_size : u64 , # [doc = " Optional.\n The size threshold in bytes for when to use multipart uploads.\n Uploads larger than this will use the multipart upload strategy.\n Uploads smaller or equal to this will use a single HTTP request.\n This only affects AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n If set, this should be at least `part_size`.\n If not set, maximal of `part_size` and 5 MiB will be used.\n\n You can also set this per meta-request, via `aws_s3_meta_request_options.multipart_upload_threshold`."] pub multipart_upload_threshold : u64 , pub throughput_target_gbps : f64 , pub memory_limit_in_bytes : u64 , pub retry_strategy : * mut aws_retry_strategy , # [doc = " TODO: move MD5 config to checksum config.\n For multi-part upload, content-md5 will be calculated if the AWS_MR_CONTENT_MD5_ENABLED is specified\n     or initial request has content-md5 header.\n For single-part upload, keep the content-md5 in the initial request unchanged."] pub compute_content_md5 : aws_s3_meta_request_compute_content_md5 , pub shutdown_callback : aws_s3_client_shutdown_complete_callback_fn , pub shutdown_callback_user_data : * mut :: libc :: c_void , # [doc = " Optional.\n Proxy configuration for http connection.\n If the connection_type is AWS_HPCT_HTTP_LEGACY, it will be converted to AWS_HPCT_HTTP_TUNNEL if tls_mode is\n ENABLED. Otherwise, it will be converted to AWS_HPCT_HTTP_FORWARD."] pub proxy_options : * const aws_http_proxy_options , # [doc = " Optional.\n Configuration for fetching proxy configuration from environment.\n By Default proxy_ev_settings.aws_http_proxy_env_var_type is set to AWS_HPEV_ENABLE which means read proxy\n configuration from environment.\n Only works when proxy_options is not set. If both are set, configuration from proxy_options is used."] pub proxy_ev_settings : * const proxy_env_var_settings , # [doc = " Optional.\n If set to 0, default value is used."] pub connect_timeout_ms : u32 , # [doc = " Optional.\n Set keepalive to periodically transmit messages for detecting a disconnected peer."] pub tcp_keep_alive_options : * const aws_s3_tcp_keep_alive_options , # [doc = " Optional.\n Configuration options for connection monitoring.\n If the transfer speed falls below the specified minimum_throughput_bytes_per_second, the operation is aborted.\n If set to NULL, default values are used."] pub monitoring_options : * const aws_http_connection_monitoring_options , # [doc = " Enable backpressure and prevent response data from downloading faster than you can handle it.\n\n If false (default), no backpressure is applied and data will download as fast as possible.\n\n If true, each meta request has a flow-control window that shrinks as\n response body data is downloaded (headers do not affect the window).\n `initial_read_window` determines the starting size of each meta request's window.\n\n - You will stop receiving response body data whenever the flow-control window reaches 0\n - If the window size remaining is smaller than the part download, client will buffer the part until\n   the window opens up to delivery the full part.\n - You must call aws_s3_meta_request_increment_read_window() to keep data flowing.\n\n WARNING: This feature is experimental.\n Currently, backpressure is only applied to GetObject requests which are split into multiple parts,\n - If you set body_callback, no more data will be delivered once the window reaches 0.\n - If you set body_callback_ex, you may still receive some data after the window reaches 0. TODO: fix it."] pub enable_read_backpressure : bool , # [doc = " The starting size of each meta request's flow-control window, in bytes.\n Ignored unless `enable_read_backpressure` is true."] pub initial_read_window : usize , # [doc = " To enable S3 Express support or not."] pub enable_s3express : bool , # [doc = " Optional.\n Only used when `enable_s3express` is set.\n\n If set, client will invoke the factory to get the provider to use, when needed.\n\n If not set, client will create a default S3 Express provider under the hood.\n\n NOTE: THE FOLLOWING BEHAVIOR IS EXPERIMENTAL AND UNSTABLE\n Default S3 Express provider will pass the headers allowed in `g_s3_create_session_allowed_headers` to the\n CreateSession call."] pub s3express_provider_override_factory : aws_s3express_provider_factory_fn , pub factory_user_data : * mut :: libc :: c_void , # [doc = " THIS IS AN EXPERIMENTAL AND UNSTABLE API\n (Optional)\n An array of network interface names. The client will distribute the\n connections across network interface names provided in this array. If any interface name is invalid, goes down,\n or has any issues like network access, you will see connection failures.\n\n This option is only supported on Linux, MacOS, and platforms that have either SO_BINDTODEVICE or IP_BOUND_IF. It\n is not supported on Windows. `AWS_ERROR_PLATFORM_NOT_SUPPORTED` will be raised on unsupported platforms. On\n Linux, SO_BINDTODEVICE is used and requires kernel version >= 5.7 or root privileges."] pub network_interface_names_array : * const aws_byte_cursor , pub num_network_interface_names : usize , # [doc = " Experimental (touch at your own risk).\n (Optional)\n Factory function to create buffer pool.\n if not set creates default implementation of the buffer pool."] pub buffer_pool_factory_fn : aws_s3_buffer_pool_factory_fn , pub buffer_pool_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client_config"] [:: std :: mem :: size_of :: < aws_s3_client_config > () - 248usize] ; ["Alignment of aws_s3_client_config"] [:: std :: mem :: align_of :: < aws_s3_client_config > () - 8usize] ; ["Offset of field: aws_s3_client_config::max_active_connections_override"] [:: std :: mem :: offset_of ! (aws_s3_client_config , max_active_connections_override) - 0usize] ; ["Offset of field: aws_s3_client_config::region"] [:: std :: mem :: offset_of ! (aws_s3_client_config , region) - 8usize] ; ["Offset of field: aws_s3_client_config::client_bootstrap"] [:: std :: mem :: offset_of ! (aws_s3_client_config , client_bootstrap) - 24usize] ; ["Offset of field: aws_s3_client_config::tls_mode"] [:: std :: mem :: offset_of ! (aws_s3_client_config , tls_mode) - 32usize] ; ["Offset of field: aws_s3_client_config::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_s3_client_config , tls_connection_options) - 40usize] ; ["Offset of field: aws_s3_client_config::fio_opts"] [:: std :: mem :: offset_of ! (aws_s3_client_config , fio_opts) - 48usize] ; ["Offset of field: aws_s3_client_config::signing_config"] [:: std :: mem :: offset_of ! (aws_s3_client_config , signing_config) - 56usize] ; ["Offset of field: aws_s3_client_config::part_size"] [:: std :: mem :: offset_of ! (aws_s3_client_config , part_size) - 64usize] ; ["Offset of field: aws_s3_client_config::max_part_size"] [:: std :: mem :: offset_of ! (aws_s3_client_config , max_part_size) - 72usize] ; ["Offset of field: aws_s3_client_config::multipart_upload_threshold"] [:: std :: mem :: offset_of ! (aws_s3_client_config , multipart_upload_threshold) - 80usize] ; ["Offset of field: aws_s3_client_config::throughput_target_gbps"] [:: std :: mem :: offset_of ! (aws_s3_client_config , throughput_target_gbps) - 88usize] ; ["Offset of field: aws_s3_client_config::memory_limit_in_bytes"] [:: std :: mem :: offset_of ! (aws_s3_client_config , memory_limit_in_bytes) - 96usize] ; ["Offset of field: aws_s3_client_config::retry_strategy"] [:: std :: mem :: offset_of ! (aws_s3_client_config , retry_strategy) - 104usize] ; ["Offset of field: aws_s3_client_config::compute_content_md5"] [:: std :: mem :: offset_of ! (aws_s3_client_config , compute_content_md5) - 112usize] ; ["Offset of field: aws_s3_client_config::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_client_config , shutdown_callback) - 120usize] ; ["Offset of field: aws_s3_client_config::shutdown_callback_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client_config , shutdown_callback_user_data) - 128usize] ; ["Offset of field: aws_s3_client_config::proxy_options"] [:: std :: mem :: offset_of ! (aws_s3_client_config , proxy_options) - 136usize] ; ["Offset of field: aws_s3_client_config::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_s3_client_config , proxy_ev_settings) - 144usize] ; ["Offset of field: aws_s3_client_config::connect_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_client_config , connect_timeout_ms) - 152usize] ; ["Offset of field: aws_s3_client_config::tcp_keep_alive_options"] [:: std :: mem :: offset_of ! (aws_s3_client_config , tcp_keep_alive_options) - 160usize] ; ["Offset of field: aws_s3_client_config::monitoring_options"] [:: std :: mem :: offset_of ! (aws_s3_client_config , monitoring_options) - 168usize] ; ["Offset of field: aws_s3_client_config::enable_read_backpressure"] [:: std :: mem :: offset_of ! (aws_s3_client_config , enable_read_backpressure) - 176usize] ; ["Offset of field: aws_s3_client_config::initial_read_window"] [:: std :: mem :: offset_of ! (aws_s3_client_config , initial_read_window) - 184usize] ; ["Offset of field: aws_s3_client_config::enable_s3express"] [:: std :: mem :: offset_of ! (aws_s3_client_config , enable_s3express) - 192usize] ; ["Offset of field: aws_s3_client_config::s3express_provider_override_factory"] [:: std :: mem :: offset_of ! (aws_s3_client_config , s3express_provider_override_factory) - 200usize] ; ["Offset of field: aws_s3_client_config::factory_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client_config , factory_user_data) - 208usize] ; ["Offset of field: aws_s3_client_config::network_interface_names_array"] [:: std :: mem :: offset_of ! (aws_s3_client_config , network_interface_names_array) - 216usize] ; ["Offset of field: aws_s3_client_config::num_network_interface_names"] [:: std :: mem :: offset_of ! (aws_s3_client_config , num_network_interface_names) - 224usize] ; ["Offset of field: aws_s3_client_config::buffer_pool_factory_fn"] [:: std :: mem :: offset_of ! (aws_s3_client_config , buffer_pool_factory_fn) - 232usize] ; ["Offset of field: aws_s3_client_config::buffer_pool_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client_config , buffer_pool_user_data) - 240usize] ; } ; impl Default for aws_s3_client_config { 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)] pub struct aws_s3_checksum_config { # [doc = " PUT Object specific *******************************/\n/**\n The location of client added checksum header.\n\n If AWS_SCL_NONE. No request payload checksum will be added.\n\n If AWS_SCL_HEADER, the client will calculate the checksum and add it to the headers.\n\n If AWS_SCL_TRAILER, the payload will be aws_chunked encoded, The client will calculate the checksum and add it to\n the trailer. Note the payload of the original request cannot be aws-chunked encoded already, this will cause an\n error."] pub location : aws_s3_checksum_location , # [doc = " The checksum algorithm used.\n Must be set if location is not AWS_SCL_NONE."] pub checksum_algorithm : aws_s3_checksum_algorithm , # [doc = " Optional.\n Provide the full object checksum. This callback is invoked once, after the entire body has been read.\n sent.\n\n NOTE:\n  - Do not set this callback if the HTTP message already has a checksum header (e.g. x-amz-checksum-crc32). Doing\n      so will raise AWS_ERROR_INVALID_ARGUMENT.\n  - checksum_algorithm must be set to the algorithm you will use.\n\n WARNING: This feature is experimental/unstable.\n At this time, full object checksum callback is only available for multipart upload\n (when Content-Length is above the `multipart_upload_threshold`,\n or Content-Length not specified). Otherwise, it will be ignored."] pub full_object_checksum_callback : aws_s3_meta_request_full_object_checksum_fn , pub user_data : * mut :: libc :: c_void , # [doc = " GET Object specific *******************************/\n/**\n Enable checksum mode header will be attached to GET requests, this will tell s3 to send back checksums headers if\n they exist. Calculate the corresponding checksum on the response bodies. The meta request will finish with a did\n validate field and set the error code to AWS_ERROR_S3_RESPONSE_CHECKSUM_MISMATCH if the calculated\n checksum, and checksum found in the response header do not match."] pub validate_response_checksum : bool , # [doc = " Optional array of `enum aws_s3_checksum_algorithm`.\n\n Ignored when validate_response_checksum is not set.\n If not set all the algorithms will be selected as default behavior.\n Owned by the caller.\n\n The list of algorithms for user to pick up when validate the checksum. Client will pick up the algorithm from the\n list with the priority based on performance, and the algorithm sent by server. The priority based on performance\n is [CRC64NVME, CRC32C, CRC32, SHA1, SHA256].\n\n If the response checksum was validated by client, the result will indicate which algorithm was picked."] pub validate_checksum_algorithms : * const aws_array_list , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_checksum_config"] [:: std :: mem :: size_of :: < aws_s3_checksum_config > () - 40usize] ; ["Alignment of aws_s3_checksum_config"] [:: std :: mem :: align_of :: < aws_s3_checksum_config > () - 8usize] ; ["Offset of field: aws_s3_checksum_config::location"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , location) - 0usize] ; ["Offset of field: aws_s3_checksum_config::checksum_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , checksum_algorithm) - 4usize] ; ["Offset of field: aws_s3_checksum_config::full_object_checksum_callback"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , full_object_checksum_callback) - 8usize] ; ["Offset of field: aws_s3_checksum_config::user_data"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , user_data) - 16usize] ; ["Offset of field: aws_s3_checksum_config::validate_response_checksum"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , validate_response_checksum) - 24usize] ; ["Offset of field: aws_s3_checksum_config::validate_checksum_algorithms"] [:: std :: mem :: offset_of ! (aws_s3_checksum_config , validate_checksum_algorithms) - 32usize] ; } ; impl Default for aws_s3_checksum_config { 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 a new meta request, ie, file transfer that will be handled by the high performance client.\n\n There are several ways to pass the request's body data:\n 1) If the data is already in memory, set the body-stream on `message`.\n 2) If the data is on disk, set `send_filepath` for best performance.\n 3) If the data is available, but copying each chunk is asynchronous, set `send_async_stream`.\n 4) If you're not sure when each chunk of data will be available, use `send_using_async_writes`."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request_options { pub type_ : aws_s3_meta_request_type , # [doc = " The S3 operation name (e.g. \"CreateBucket\").\n This MUST be set if type is AWS_S3_META_REQUEST_TYPE_DEFAULT;\n it is automatically populated for other meta-request types.\n The canonical operation names are listed here:\n https://docs.aws.amazon.com/AmazonS3/latest/API/API_Operations_Amazon_Simple_Storage_Service.html\n\n This name is used to fill out details in metrics and error reports.\n It also drives some operation-specific behavior.\n If you pass the wrong name, you risk getting the wrong behavior.\n\n For example, every operation except \"GetObject\" has its response checked\n for error, even if the HTTP status-code was 200 OK\n (see https://repost.aws/knowledge-center/s3-resolve-200-internalerror).\n If you used AWS_S3_META_REQUEST_TYPE_DEFAULT to do GetObject, but mis-named\n it \"Download\", and the object looked like XML with an error code,\n then the meta-request would fail. You may log the full response body,\n and leak sensitive data."] pub operation_name : aws_byte_cursor , # [doc = " Configure the signing for each request created for this meta request. If NULL, options in the client will be\n  used.\n - The credentials will be obtained based on the precedence of:\n      1. `credentials` from `signing_config` in `aws_s3_meta_request_options`\n      2. `credentials_provider` from `signing_config` in `aws_s3_meta_request_options`\n      3. `credentials` from `signing_config` cached in the client\n      4. `credentials_provider` cached in the client\n - To skip signing, you can config it with anonymous credentials.\n - S3 Client will derive the right config for signing process based on this.\n\n Notes:\n - For AWS_SIGNING_ALGORITHM_V4_S3EXPRESS, S3 client will use the credentials in the config to derive the\n S3 Express credentials that are used in the signing process.\n - For other auth algorithm, client may make modifications to signing config before passing it on to signer."] pub signing_config : * const aws_signing_config_aws , pub message : * mut aws_http_message , # [doc = " Optional.\n If set, the received data will be written into this file.\n the `body_callback` will NOT be invoked.\n This gives a better performance when receiving data to write to a file.\n See `aws_s3_recv_file_options` for the configuration on the receive file."] pub recv_filepath : aws_byte_cursor , # [doc = " Optional.\n Default to AWS_S3_RECV_FILE_CREATE_OR_REPLACE.\n This only works with recv_filepath set.\n See `aws_s3_recv_file_options`."] pub recv_file_option : aws_s3_recv_file_options , # [doc = " Optional.\n The specified position to start writing at for the recv file when `recv_file_option` is set to\n AWS_S3_RECV_FILE_WRITE_TO_POSITION, ignored otherwise."] pub recv_file_position : u64 , # [doc = " Set it to be true to delete the receive file on failure, otherwise, the file will be left as-is.\n This only works with recv_filepath set."] pub recv_file_delete_on_failure : bool , # [doc = " Optional.\n If set, this file is sent as the request body.\n This gives the best performance when sending data from a file.\n Do not set if the body is being passed by other means (see note above)."] pub send_filepath : aws_byte_cursor , # [doc = " Optional.\n Overrides the client config if set.\n If set, this controls how the meta request interact with file I/O.\n Read `aws_s3_file_io_options` for details.\n  Notes: Only applies when `send_filepath` is set.\n  TODO: adapt it to `recv_filepath`.\n\n Note: if both client and meta request don't set this, for objects larger than 2TiB, this will be set to a default\n options with `should_stream` to be True and others follow the default to avoid memory issues.\n\n eg:\n - When the file is too large to fit in the buffer, set `should_stream` to avoid buffering the whole parts in\n  memory.\n - When the disk I/O is faster than OS cache, set `direct_io` to bypass the OS cache."] pub fio_opts : * mut aws_s3_file_io_options , # [doc = " Optional - EXPERIMENTAL/UNSTABLE\n If set, the request body comes from this async stream.\n Use this when outgoing data will be produced in asynchronous chunks.\n The S3 client will read from the stream whenever it's ready to upload another chunk.\n\n WARNING: The S3 client can deadlock if many async streams are \"stalled\",\n never completing their async read. If you're not sure when (if ever)\n data will be ready, use `send_using_async_writes` instead.\n\n Do not set if the body is being passed by other means (see note above)."] pub send_async_stream : * mut aws_async_input_stream , # [doc = " Optional - EXPERIMENTAL/UNSTABLE\n Set this to send request body data using the async aws_s3_meta_request_poll_write()\n or aws_s3_meta_request_write() functions.\n Use this when outgoing data will be produced in asynchronous chunks,\n and you're not sure when (if ever) each chunk will be ready.\n\n This only works with AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n\n Do not set if the body is being passed by other means (see note above)."] pub send_using_async_writes : bool , # [doc = " Optional.\n if set, the flexible checksum will be performed by client based on the config.\n\n Notes: checksum can also be added through the http message provided.\n      The checksum in http header will override corresponding the checksum config."] pub checksum_config : * const aws_s3_checksum_config , # [doc = " Optional.\n Size of parts the object will be downloaded or uploaded in, in bytes.\n This only affects AWS_S3_META_REQUEST_TYPE_GET_OBJECT and AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n\n If not set, the value from `aws_s3_client_config.part_size` is used, which defaults to a dynamic value based on\n the throughput target, memory_limit_in_bytes and the requested object size.\n\n The client will adjust the part size for AWS_S3_META_REQUEST_TYPE_PUT_OBJECT if needed for service limits (max\n number of parts per upload is 10,000, minimum upload part size is 5 MiB)."] pub part_size : u64 , # [doc = " Optional - EXPERIMENTAL/UNSTABLE\n Set this to prefer for the dynamic default part_size over the part size set for both client and meta request for\n the best performance under the memory constrain, especially for getting large objects."] pub force_dynamic_part_size : bool , # [doc = " Optional.\n The size threshold in bytes for when to use multipart uploads.\n Uploads larger than this will use the multipart upload strategy.\n Uploads smaller or equal to this will use a single HTTP request.\n This only affects AWS_S3_META_REQUEST_TYPE_PUT_OBJECT.\n If set, this should be at least `part_size`.\n If not set, `part_size` adjusted by client will be used as the threshold.\n If both `part_size` and `multipart_upload_threshold` are not set,\n the values from `aws_s3_client_config` are used."] pub multipart_upload_threshold : u64 , pub user_data : * mut :: libc :: c_void , # [doc = " Optional.\n Invoked to provide response headers received during execution of the meta request.\n Note: this callback will not be fired for cases when resuming an\n operation that was already completed (ex. pausing put object after it\n uploaded all data and then resuming it)\n See `aws_s3_meta_request_headers_callback_fn`."] pub headers_callback : aws_s3_meta_request_headers_callback_fn , # [doc = " Invoked to provide the response body as it is received.\n See `aws_s3_meta_request_receive_body_callback_fn`."] pub body_callback : aws_s3_meta_request_receive_body_callback_fn , # [doc = " Invoked to provide the response body as it is received.\n Provides extra information as compared to regular callback.\n Note: setting both body_callback and body_callback_ex is not\n considered valid and meta request creation will fail.\n See `aws_s3_meta_request_receive_body_callback_ex_fn`."] pub body_callback_ex : aws_s3_meta_request_receive_body_callback_ex_fn , # [doc = " Invoked when the entire meta request execution is complete.\n See `aws_s3_meta_request_finish_fn`."] pub finish_callback : aws_s3_meta_request_finish_fn , pub shutdown_callback : aws_s3_meta_request_shutdown_fn , # [doc = " Invoked to report progress of the meta request execution.\n See `aws_s3_meta_request_progress_fn`."] pub progress_callback : aws_s3_meta_request_progress_fn , # [doc = " Optional.\n To get telemetry metrics when a single request finishes.\n If set the request will keep track of the metrics from `aws_s3_request_metrics`, and fire the callback when the\n request finishes receiving response.\n See `aws_s3_meta_request_telemetry_fn`"] pub telemetry_callback : aws_s3_meta_request_telemetry_fn , # [doc = " Optional.\n Callback for reviewing an upload before it completes.\n WARNING: experimental/unstable\n See `aws_s3_meta_request_upload_review_fn`"] pub upload_review_callback : aws_s3_meta_request_upload_review_fn , # [doc = " Optional.\n Endpoint override for request. Can be used to override scheme and port of\n the endpoint.\n There is some overlap between Host header and Endpoint and corner cases\n are handled as follows:\n - Only Host header is set - Host is used to construct endpoint. https is\n   default with corresponding port\n - Only endpoint is set - Host header is created from endpoint. Port and\n   Scheme from endpoint is used.\n - Both Host and Endpoint is set - Host header must match Authority of\n   Endpoint uri. Port and Scheme from endpoint is used."] pub endpoint : * const aws_uri , # [doc = " Optional.\n For meta requests that support pause/resume (e.g. PutObject), serialized resume token returned by\n aws_s3_meta_request_pause() can be provided here.\n Note: If PutObject request specifies a checksum algorithm, client will calculate checksums while skipping parts\n from the buffer and compare them them to previously uploaded part checksums."] pub resume_token : * mut aws_s3_meta_request_resume_token , pub object_size_hint : * const u64 , pub copy_source_uri : aws_byte_cursor , pub max_active_connections_override : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_options"] [:: std :: mem :: size_of :: < aws_s3_meta_request_options > () - 272usize] ; ["Alignment of aws_s3_meta_request_options"] [:: std :: mem :: align_of :: < aws_s3_meta_request_options > () - 8usize] ; ["Offset of field: aws_s3_meta_request_options::type_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , type_) - 0usize] ; ["Offset of field: aws_s3_meta_request_options::operation_name"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , operation_name) - 8usize] ; ["Offset of field: aws_s3_meta_request_options::signing_config"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , signing_config) - 24usize] ; ["Offset of field: aws_s3_meta_request_options::message"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , message) - 32usize] ; ["Offset of field: aws_s3_meta_request_options::recv_filepath"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , recv_filepath) - 40usize] ; ["Offset of field: aws_s3_meta_request_options::recv_file_option"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , recv_file_option) - 56usize] ; ["Offset of field: aws_s3_meta_request_options::recv_file_position"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , recv_file_position) - 64usize] ; ["Offset of field: aws_s3_meta_request_options::recv_file_delete_on_failure"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , recv_file_delete_on_failure) - 72usize] ; ["Offset of field: aws_s3_meta_request_options::send_filepath"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , send_filepath) - 80usize] ; ["Offset of field: aws_s3_meta_request_options::fio_opts"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , fio_opts) - 96usize] ; ["Offset of field: aws_s3_meta_request_options::send_async_stream"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , send_async_stream) - 104usize] ; ["Offset of field: aws_s3_meta_request_options::send_using_async_writes"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , send_using_async_writes) - 112usize] ; ["Offset of field: aws_s3_meta_request_options::checksum_config"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , checksum_config) - 120usize] ; ["Offset of field: aws_s3_meta_request_options::part_size"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , part_size) - 128usize] ; ["Offset of field: aws_s3_meta_request_options::force_dynamic_part_size"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , force_dynamic_part_size) - 136usize] ; ["Offset of field: aws_s3_meta_request_options::multipart_upload_threshold"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , multipart_upload_threshold) - 144usize] ; ["Offset of field: aws_s3_meta_request_options::user_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , user_data) - 152usize] ; ["Offset of field: aws_s3_meta_request_options::headers_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , headers_callback) - 160usize] ; ["Offset of field: aws_s3_meta_request_options::body_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , body_callback) - 168usize] ; ["Offset of field: aws_s3_meta_request_options::body_callback_ex"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , body_callback_ex) - 176usize] ; ["Offset of field: aws_s3_meta_request_options::finish_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , finish_callback) - 184usize] ; ["Offset of field: aws_s3_meta_request_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , shutdown_callback) - 192usize] ; ["Offset of field: aws_s3_meta_request_options::progress_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , progress_callback) - 200usize] ; ["Offset of field: aws_s3_meta_request_options::telemetry_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , telemetry_callback) - 208usize] ; ["Offset of field: aws_s3_meta_request_options::upload_review_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , upload_review_callback) - 216usize] ; ["Offset of field: aws_s3_meta_request_options::endpoint"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , endpoint) - 224usize] ; ["Offset of field: aws_s3_meta_request_options::resume_token"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , resume_token) - 232usize] ; ["Offset of field: aws_s3_meta_request_options::object_size_hint"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , object_size_hint) - 240usize] ; ["Offset of field: aws_s3_meta_request_options::copy_source_uri"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , copy_source_uri) - 248usize] ; ["Offset of field: aws_s3_meta_request_options::max_active_connections_override"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_options , max_active_connections_override) - 264usize] ; } ; impl Default for aws_s3_meta_request_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)] pub struct aws_s3_meta_request_result { pub error_response_headers : * mut aws_http_headers , pub error_response_body : * mut aws_byte_buf , pub error_response_operation_name : * mut aws_string , pub response_status : :: libc :: c_int , pub did_validate : bool , pub validation_algorithm : aws_s3_checksum_algorithm , pub error_code : :: libc :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_result"] [:: std :: mem :: size_of :: < aws_s3_meta_request_result > () - 40usize] ; ["Alignment of aws_s3_meta_request_result"] [:: std :: mem :: align_of :: < aws_s3_meta_request_result > () - 8usize] ; ["Offset of field: aws_s3_meta_request_result::error_response_headers"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , error_response_headers) - 0usize] ; ["Offset of field: aws_s3_meta_request_result::error_response_body"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , error_response_body) - 8usize] ; ["Offset of field: aws_s3_meta_request_result::error_response_operation_name"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , error_response_operation_name) - 16usize] ; ["Offset of field: aws_s3_meta_request_result::response_status"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , response_status) - 24usize] ; ["Offset of field: aws_s3_meta_request_result::did_validate"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , did_validate) - 28usize] ; ["Offset of field: aws_s3_meta_request_result::validation_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , validation_algorithm) - 32usize] ; ["Offset of field: aws_s3_meta_request_result::error_code"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_result , error_code) - 36usize] ; } ; impl Default for aws_s3_meta_request_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 () } } } unsafe extern "C" { pub fn aws_s3_client_new (allocator : * mut aws_allocator , client_config : * const aws_s3_client_config) -> * mut aws_s3_client ; } unsafe extern "C" { # [doc = " Add a reference, keeping this object alive.\n The reference must be released when you are done with it, or it's memory will never be cleaned up.\n You must not pass in NULL.\n Always returns the same pointer that was passed in."] pub fn aws_s3_client_acquire (client : * mut aws_s3_client) -> * mut aws_s3_client ; } unsafe extern "C" { # [doc = " Release a reference.\n When the reference count drops to 0, this object will be cleaned up.\n It's OK to pass in NULL (nothing happens).\n Always returns NULL."] pub fn aws_s3_client_release (client : * mut aws_s3_client) -> * mut aws_s3_client ; } unsafe extern "C" { pub fn aws_s3_client_make_meta_request (client : * mut aws_s3_client , options : * const aws_s3_meta_request_options) -> * mut aws_s3_meta_request ; } # [doc = " The result of an `aws_s3_meta_request_poll_write()` call.\n Think of this like Rust's `Poll<Result<size_t, int>>`, or C++'s `optional<expected<size_t, int>>`."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_meta_request_poll_write_result { pub is_pending : bool , pub error_code : :: libc :: c_int , pub bytes_processed : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_poll_write_result"] [:: std :: mem :: size_of :: < aws_s3_meta_request_poll_write_result > () - 16usize] ; ["Alignment of aws_s3_meta_request_poll_write_result"] [:: std :: mem :: align_of :: < aws_s3_meta_request_poll_write_result > () - 8usize] ; ["Offset of field: aws_s3_meta_request_poll_write_result::is_pending"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_poll_write_result , is_pending) - 0usize] ; ["Offset of field: aws_s3_meta_request_poll_write_result::error_code"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_poll_write_result , error_code) - 4usize] ; ["Offset of field: aws_s3_meta_request_poll_write_result::bytes_processed"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_poll_write_result , bytes_processed) - 8usize] ; } ; unsafe extern "C" { # [doc = " Attempt to write data.\n\n You must set `aws_s3_meta_request_options.send_using_async_writes` to use this function.\n\n This is a non-blocking poll-style async function, similar to Rust's:\n https://docs.rs/futures/latest/futures/io/trait.AsyncWrite.html#tymethod.poll_write\n If you prefer completion-style async functions, and your data can outlive\n the callstack, use aws_s3_meta_request_write() instead.\n\n Check the returned `result` struct to see what happened:\n 1)   If `result.is_pending == true` then no work was done.\n      The waker callback will be invoked when you can call poll_write() again.\n      Do not call poll_write() again before the waker is invoked.\n\n 2)   Else if `result.error_code != 0` then poll_write() did not succeed\n      and you should not call it again. The meta request is guaranteed to finish soon\n      (you don't need to worry about canceling the meta request yourself after a failed write).\n      A common error code is AWS_ERROR_S3_REQUEST_HAS_COMPLETED, indicating\n      the meta request completed for reasons unrelated to the poll_write() call\n      (e.g. CreateMultipartUpload received a 403 Forbidden response).\n      AWS_ERROR_INVALID_STATE usually indicates that you're calling poll_write()\n      incorrectly (e.g. not waiting for waker callback from previous poll_write() call).\n\n 3)   Else `result.bytes_processed` tells you how much data was processed.\n      `bytes_processed` may be less than the `data.len` you passed in.\n      Continue calling poll_write() with the remaining data until everything is processed.\n      `result.bytes_processed` won't be 0 unless you passed in `data.len` of 0.\n\n @param meta_request  Meta request\n\n @param data          The data to send. The data can be any size.\n                      `result.bytes_processed` indicates how many bytes were\n                      processed by this call.\n\n @param eof           Pass true to signal EOF (end of file).\n                      If poll_write() doesn't process all your data\n                      (`result.is_pending` or `result.byte_processed < data.len`)\n                      then EOF was ignored, and you need to pass it again\n                      to subsequent poll_write() calls.\n\n @param waker         Waker callback.\n                      If `result.is_pending == true`, then the waker will be called\n                      exactly once when it's a good time to call poll_write() again.\n                      If `result.is_pending == false`, the waker will never be called.\n\n @param user_data     Pointer to be passed to the waker callback.\n\n WARNING: This feature is experimental."] pub fn aws_s3_meta_request_poll_write (meta_request : * mut aws_s3_meta_request , data : aws_byte_cursor , eof : bool , waker : aws_simple_completion_callback , user_data : * mut :: libc :: c_void) -> aws_s3_meta_request_poll_write_result ; } unsafe extern "C" { # [doc = " Write the next chunk of data.\n\n You must set `aws_s3_meta_request_options.send_using_async_writes` to use this function.\n\n This function is asynchronous, and returns a future (see <aws/io/future.h>).\n You may not call write() again until the future completes.\n\n If the future completes with an error code, then write() did not succeed\n and you should not call it again. If the future contains any error code,\n the meta request is guaranteed to finish soon (you don't need to worry about\n canceling the meta request yourself after a failed write).\n A common error code is AWS_ERROR_S3_REQUEST_HAS_COMPLETED, indicating\n the meta request completed for reasons unrelated to the write() call\n (e.g. CreateMultipartUpload received a 403 Forbidden response).\n AWS_ERROR_INVALID_STATE usually indicates that you're calling write()\n incorrectly (e.g. not waiting for previous write to complete).\n\n You MUST keep the data in memory until the future completes.\n If you cannot do this, use aws_s3_meta_request_poll_write() instead.\n\n You can wait any length of time between calls to write().\n If there's not enough data to upload a part, the data will be copied\n to a buffer and the future will immediately complete.\n\n @param meta_request  Meta request\n\n @param data          The data to send. The data can be any size.\n\n @param eof           Pass true to signal EOF (end of file).\n                      Do not call write() again after passing true.\n\n This function never returns NULL.\n\n WARNING: This feature is experimental."] pub fn aws_s3_meta_request_write (meta_request : * mut aws_s3_meta_request , data : aws_byte_cursor , eof : bool) -> * mut aws_future_void ; } unsafe extern "C" { # [doc = " Increment the flow-control window, so that response data continues downloading.\n\n If the client was created with `enable_read_backpressure` set true,\n each meta request has a flow-control window that shrinks as response\n body data is downloaded (headers do not affect the size of the window).\n The client's `initial_read_window` determines the starting size of each meta request's window.\n If a meta request's flow-control window reaches 0, no further data will be downloaded.\n If the `initial_read_window` is 0, the request will not start until the window is incremented.\n Maintain a larger window to keep up a high download throughput,\n parts cannot download in parallel unless the window is large enough to hold multiple parts.\n Maintain a smaller window to limit the amount of data buffered in memory.\n\n If `enable_read_backpressure` is false this call will have no effect,\n no backpressure is being applied and data is being downloaded as fast as possible.\n\n WARNING: This feature is experimental.\n Currently, backpressure is applied to GetObject requests,\n - If you set body_callback, no more data will be delivered once the window reaches 0.\n - If you set body_callback_ex, you may still receive some data after the window reaches 0. TODO: fix it."] pub fn aws_s3_meta_request_increment_read_window (meta_request : * mut aws_s3_meta_request , bytes : u64) ; } unsafe extern "C" { pub fn aws_s3_meta_request_cancel (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { # [doc = " Note: pause is currently only supported on upload requests.\n In order to pause an ongoing upload, call aws_s3_meta_request_pause() that\n will return resume token. Token can be used to query the state of operation\n at the pausing time.\n To resume an upload that was paused, supply resume token in the meta\n request options structure member aws_s3_meta_request_options.resume_token.\n The upload can be resumed either from the same client or a different one.\n Corner cases for resume upload are as follows:\n - upload is not MPU - fail with AWS_ERROR_UNSUPPORTED_OPERATION\n - pausing before MPU is created - NULL resume token returned. NULL resume\n   token is equivalent to restarting upload\n - pausing in the middle of part transfer - return resume token. scheduling of\n   new part uploads stops.\n - pausing after completeMPU started - return resume token. if s3 cannot find\n   find associated MPU id when resuming with that token and num of parts\n   uploaded equals to total num parts, then operation is a no op. Otherwise\n   operation fails.\n Note: for no op case the call will succeed and finish/shutdown request callbacks will\n   fire, but on headers callback will not fire.\n Note: similar to cancel pause does not cancel requests already in flight and\n and parts might complete after pause is requested.\n @param meta_request pointer to the aws_s3_meta_request of the upload to be paused\n @param resume_token resume token\n @return either AWS_OP_ERR or AWS_OP_SUCCESS"] pub fn aws_s3_meta_request_pause (meta_request : * mut aws_s3_meta_request , out_resume_token : * mut * mut aws_s3_meta_request_resume_token) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_resume_token_options { pub upload_id : aws_byte_cursor , pub part_size : u64 , pub total_num_parts : usize , # [doc = " Optional.\n\n Note: during resume num_parts_uploaded is used for sanity checking against\n uploads on s3 side.\n In cases where upload id does not exist (already resumed using this token\n or pause called after upload completes, etc...) and num_parts_uploaded\n equals to total num parts, resume will become a noop."] pub num_parts_completed : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_resume_token_options"] [:: std :: mem :: size_of :: < aws_s3_upload_resume_token_options > () - 40usize] ; ["Alignment of aws_s3_upload_resume_token_options"] [:: std :: mem :: align_of :: < aws_s3_upload_resume_token_options > () - 8usize] ; ["Offset of field: aws_s3_upload_resume_token_options::upload_id"] [:: std :: mem :: offset_of ! (aws_s3_upload_resume_token_options , upload_id) - 0usize] ; ["Offset of field: aws_s3_upload_resume_token_options::part_size"] [:: std :: mem :: offset_of ! (aws_s3_upload_resume_token_options , part_size) - 16usize] ; ["Offset of field: aws_s3_upload_resume_token_options::total_num_parts"] [:: std :: mem :: offset_of ! (aws_s3_upload_resume_token_options , total_num_parts) - 24usize] ; ["Offset of field: aws_s3_upload_resume_token_options::num_parts_completed"] [:: std :: mem :: offset_of ! (aws_s3_upload_resume_token_options , num_parts_completed) - 32usize] ; } ; impl Default for aws_s3_upload_resume_token_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 () } } } unsafe extern "C" { # [doc = " Create upload resume token from persisted data.\n Note: Data required for resume token varies per operation."] pub fn aws_s3_meta_request_resume_token_new_upload (allocator : * mut aws_allocator , options : * const aws_s3_upload_resume_token_options) -> * mut aws_s3_meta_request_resume_token ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_acquire (resume_token : * mut aws_s3_meta_request_resume_token) -> * mut aws_s3_meta_request_resume_token ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_release (resume_token : * mut aws_s3_meta_request_resume_token) -> * mut aws_s3_meta_request_resume_token ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_type (resume_token : * mut aws_s3_meta_request_resume_token) -> aws_s3_meta_request_type ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_part_size (resume_token : * mut aws_s3_meta_request_resume_token) -> u64 ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_total_num_parts (resume_token : * mut aws_s3_meta_request_resume_token) -> usize ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_num_parts_completed (resume_token : * mut aws_s3_meta_request_resume_token) -> usize ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_upload_id (resume_token : * mut aws_s3_meta_request_resume_token) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Add a reference, keeping this object alive.\n The reference must be released when you are done with it, or it's memory will never be cleaned up.\n You must not pass in NULL.\n Always returns the same pointer that was passed in."] pub fn aws_s3_meta_request_acquire (meta_request : * mut aws_s3_meta_request) -> * mut aws_s3_meta_request ; } unsafe extern "C" { # [doc = " Release a reference.\n When the reference count drops to 0, this object will be cleaned up.\n It's OK to pass in NULL (nothing happens).\n Always returns NULL."] pub fn aws_s3_meta_request_release (meta_request : * mut aws_s3_meta_request) -> * mut aws_s3_meta_request ; } unsafe extern "C" { # [doc = " Initialize the configuration for a default S3 signing."] pub fn aws_s3_init_default_signing_config (signing_config : * mut aws_signing_config_aws , region : aws_byte_cursor , credentials_provider : * mut aws_credentials_provider) ; } unsafe extern "C" { # [doc = " Return operation name for aws_s3_request_type,\n or empty string if the type doesn't map to an actual operation.\n For example:\n AWS_S3_REQUEST_TYPE_HEAD_OBJECT -> \"HeadObject\"\n AWS_S3_REQUEST_TYPE_UNKNOWN -> \"\"\n AWS_S3_REQUEST_TYPE_MAX -> \"\""] pub fn aws_s3_request_type_operation_name (type_ : aws_s3_request_type) -> * const :: libc :: c_char ; } unsafe extern "C" { # [doc = " Add a reference, keeping this object alive.\n The reference must be released when you are done with it, or it's memory will never be cleaned up.\n Always returns the same pointer that was passed in."] pub fn aws_s3_request_metrics_acquire (metrics : * mut aws_s3_request_metrics) -> * mut aws_s3_request_metrics ; } unsafe extern "C" { # [doc = " Release a reference.\n When the reference count drops to 0, this object will be cleaned up.\n It's OK to pass in NULL (nothing happens).\n Always returns NULL."] pub fn aws_s3_request_metrics_release (metrics : * mut aws_s3_request_metrics) -> * mut aws_s3_request_metrics ; } unsafe extern "C" { # [doc = "  Getters for s3 request metrics ************************************************/\n/**\n Get the request ID from aws_s3_request_metrics.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_request_id will be set to a string. Be warned this string's lifetime is tied to the metrics\n object."] pub fn aws_s3_request_metrics_get_request_id (metrics : * const aws_s3_request_metrics , out_request_id : * mut * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the extended request ID from aws_s3_request_metrics.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_extended_request_id will be set to a string. Be warned this string's lifetime is tied to the\n metrics object."] pub fn aws_s3_request_metrics_get_extended_request_id (metrics : * const aws_s3_request_metrics , out_extended_request_id : * mut * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_start_time : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_end_time : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_total_duration_ns (metrics : * const aws_s3_request_metrics , out_total_duration : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_send_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_send_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_send_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_send_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_sending_duration_ns (metrics : * const aws_s3_request_metrics , out_sending_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_receive_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_receive_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_receive_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_receive_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_sign_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_signing_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_sign_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_signing_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_signing_duration_ns (metrics : * const aws_s3_request_metrics , out_signing_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_mem_acquire_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_mem_acquire_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_mem_acquire_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_mem_acquire_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_mem_acquire_duration_ns (metrics : * const aws_s3_request_metrics , out_mem_acquire_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_delivery_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_delivery_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_delivery_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_delivery_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_delivery_duration_ns (metrics : * const aws_s3_request_metrics , out_delivery_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_receiving_duration_ns (metrics : * const aws_s3_request_metrics , out_receiving_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_response_status_code (metrics : * const aws_s3_request_metrics , out_response_status : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_response_headers (metrics : * const aws_s3_request_metrics , out_response_headers : * mut * mut aws_http_headers) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the path and query of the request.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_request_path_query will be set to a string. Be warned this string's lifetime is tied to the metrics\n object."] pub fn aws_s3_request_metrics_get_request_path_query (metrics : * const aws_s3_request_metrics , out_request_path_query : * mut * const aws_string) ; } unsafe extern "C" { # [doc = " Get the host_address of the request.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_host_address will be set to a string. Be warned this string's lifetime is tied to the metrics\n object."] pub fn aws_s3_request_metrics_get_host_address (metrics : * const aws_s3_request_metrics , out_host_address : * mut * const aws_string) ; } unsafe extern "C" { # [doc = " Get the IP address of the request connected to.\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_ip_address will be set to a string. Be warned this string's lifetime is tied to the metrics object."] pub fn aws_s3_request_metrics_get_ip_address (metrics : * const aws_s3_request_metrics , out_ip_address : * mut * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_connection_id (metrics : * const aws_s3_request_metrics , out_connection_ptr : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_request_ptr (metrics : * const aws_s3_request_metrics , out_request_ptr : * mut usize) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_thread_id (metrics : * const aws_s3_request_metrics , out_thread_id : * mut aws_thread_id_t) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_request_stream_id (metrics : * const aws_s3_request_metrics , out_stream_id : * mut u32) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Get the S3 operation name of the request (e.g. \"HeadObject\").\n If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.\n If available, out_operation_name will be set to a string.\n Be warned this string's lifetime is tied to the metrics object."] pub fn aws_s3_request_metrics_get_operation_name (metrics : * const aws_s3_request_metrics , out_operation_name : * mut * const aws_string) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_request_type (metrics : * const aws_s3_request_metrics , out_request_type : * mut aws_s3_request_type) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_error_code (metrics : * const aws_s3_request_metrics) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_retry_attempt (metrics : * const aws_s3_request_metrics) -> u32 ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_memory_allocated_from_pool (metrics : * const aws_s3_request_metrics) -> bool ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_part_range_start (metrics : * const aws_s3_request_metrics , out_part_range_start : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_part_range_end (metrics : * const aws_s3_request_metrics , out_part_range_end : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_part_number (metrics : * const aws_s3_request_metrics , out_part_number : * mut u32) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_s3_request_first_attempt_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_s3_request_first_attempt_start_time : * mut u64) ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_s3_request_last_attempt_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_s3_request_last_attempt_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_s3_request_total_duration_ns (metrics : * const aws_s3_request_metrics , out_request_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_conn_acquire_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_conn_acquire_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_conn_acquire_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_conn_acquire_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_conn_acquire_duration_ns (metrics : * const aws_s3_request_metrics , out_conn_acquire_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_retry_delay_start_timestamp_ns (metrics : * const aws_s3_request_metrics , out_retry_delay_start_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_retry_delay_end_timestamp_ns (metrics : * const aws_s3_request_metrics , out_retry_delay_end_time : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_retry_delay_duration_ns (metrics : * const aws_s3_request_metrics , out_retry_delay_duration : * mut u64) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_request_metrics_get_service_call_duration_ns (metrics : * const aws_s3_request_metrics , out_service_call_duration : * mut u64) -> :: libc :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_request_context { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_rule_engine { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " Creates a new S3 endpoint resolver.\n Warning: Before using this header, you have to enable it by\n setting cmake config AWS_ENABLE_S3_ENDPOINT_RESOLVER=ON"] pub fn aws_s3_endpoint_resolver_new (allocator : * mut aws_allocator) -> * mut aws_endpoints_rule_engine ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_ruleset { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_partitions_config { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_parameter { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_endpoints_resolved_endpoint { _unused : [u8 ; 0] , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_endpoints_parameter_type { AWS_ENDPOINTS_PARAMETER_STRING = 0 , AWS_ENDPOINTS_PARAMETER_BOOLEAN = 1 , AWS_ENDPOINTS_PARAMETER_STRING_ARRAY = 2 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_endpoints_resolved_endpoint_type { AWS_ENDPOINTS_RESOLVED_ENDPOINT = 0 , AWS_ENDPOINTS_RESOLVED_ERROR = 1 , } unsafe extern "C" { pub fn aws_endpoints_get_supported_ruleset_version () -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Warning: The following helpers are intended for use by SDKs that validate correctness of the ruleset at compile time.\n The engine sanity checks the provided ruleset, but does not do extensive checking.\n Some malformed rulesets might fail in unexpected ways."] pub fn aws_endpoints_parameter_get_type (parameter : * const aws_endpoints_parameter) -> aws_endpoints_parameter_type ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_built_in (parameter : * const aws_endpoints_parameter) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_default_string (parameter : * const aws_endpoints_parameter , out_cursor : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_default_boolean (parameter : * const aws_endpoints_parameter , out_bool : * mut * const bool) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_is_required (parameter : * const aws_endpoints_parameter) -> bool ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_documentation (parameter : * const aws_endpoints_parameter) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_parameters_get_is_deprecated (parameter : * const aws_endpoints_parameter) -> bool ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_deprecated_message (parameter : * const aws_endpoints_parameter) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_parameter_get_deprecated_since (parameter : * const aws_endpoints_parameter) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_new_from_string (allocator : * mut aws_allocator , ruleset_json : aws_byte_cursor) -> * mut aws_endpoints_ruleset ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_acquire (ruleset : * mut aws_endpoints_ruleset) -> * mut aws_endpoints_ruleset ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_release (ruleset : * mut aws_endpoints_ruleset) -> * mut aws_endpoints_ruleset ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_get_parameters (ruleset : * mut aws_endpoints_ruleset) -> * const aws_hash_table ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_get_version (ruleset : * const aws_endpoints_ruleset) -> aws_byte_cursor ; } unsafe extern "C" { pub fn aws_endpoints_ruleset_get_service_id (ruleset : * const aws_endpoints_ruleset) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Create new rule engine for a given ruleset.\n In cases of failure NULL is returned and last error is set."] pub fn aws_endpoints_rule_engine_new (allocator : * mut aws_allocator , ruleset : * mut aws_endpoints_ruleset , partitions_config : * mut aws_partitions_config) -> * mut aws_endpoints_rule_engine ; } unsafe extern "C" { pub fn aws_endpoints_rule_engine_acquire (rule_engine : * mut aws_endpoints_rule_engine) -> * mut aws_endpoints_rule_engine ; } unsafe extern "C" { pub fn aws_endpoints_rule_engine_release (rule_engine : * mut aws_endpoints_rule_engine) -> * mut aws_endpoints_rule_engine ; } unsafe extern "C" { pub fn aws_endpoints_request_context_new (allocator : * mut aws_allocator) -> * mut aws_endpoints_request_context ; } unsafe extern "C" { pub fn aws_endpoints_request_context_acquire (request_context : * mut aws_endpoints_request_context) -> * mut aws_endpoints_request_context ; } unsafe extern "C" { pub fn aws_endpoints_request_context_release (request_context : * mut aws_endpoints_request_context) -> * mut aws_endpoints_request_context ; } unsafe extern "C" { pub fn aws_endpoints_request_context_add_string (allocator : * mut aws_allocator , context : * mut aws_endpoints_request_context , name : aws_byte_cursor , value : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_request_context_add_boolean (allocator : * mut aws_allocator , context : * mut aws_endpoints_request_context , name : aws_byte_cursor , value : bool) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_request_context_add_string_array (allocator : * mut aws_allocator , context : * mut aws_endpoints_request_context , name : aws_byte_cursor , value_array : * const aws_byte_cursor , len : usize) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_rule_engine_resolve (engine : * mut aws_endpoints_rule_engine , context : * const aws_endpoints_request_context , out_resolved_endpoint : * mut * mut aws_endpoints_resolved_endpoint) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_acquire (resolved_endpoint : * mut aws_endpoints_resolved_endpoint) -> * mut aws_endpoints_resolved_endpoint ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_release (resolved_endpoint : * mut aws_endpoints_resolved_endpoint) -> * mut aws_endpoints_resolved_endpoint ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_type (resolved_endpoint : * const aws_endpoints_resolved_endpoint) -> aws_endpoints_resolved_endpoint_type ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_url (resolved_endpoint : * const aws_endpoints_resolved_endpoint , out_url : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_properties (resolved_endpoint : * const aws_endpoints_resolved_endpoint , out_properties : * mut aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_headers (resolved_endpoint : * const aws_endpoints_resolved_endpoint , out_headers : * mut * const aws_hash_table) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_endpoints_resolved_endpoint_get_error (resolved_endpoint : * const aws_endpoints_resolved_endpoint , out_error : * mut aws_byte_cursor) -> :: libc :: c_int ; } pub const AWS_COMMON_HASH_TABLE_ITER_CONTINUE : _bindgen_ty_23 = _bindgen_ty_23 :: AWS_COMMON_HASH_TABLE_ITER_CONTINUE ; pub const AWS_COMMON_HASH_TABLE_ITER_DELETE : _bindgen_ty_23 = _bindgen_ty_23 :: AWS_COMMON_HASH_TABLE_ITER_DELETE ; pub const AWS_COMMON_HASH_TABLE_ITER_ERROR : _bindgen_ty_23 = _bindgen_ty_23 :: AWS_COMMON_HASH_TABLE_ITER_ERROR ; # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum _bindgen_ty_23 { AWS_COMMON_HASH_TABLE_ITER_CONTINUE = 1 , AWS_COMMON_HASH_TABLE_ITER_DELETE = 2 , AWS_COMMON_HASH_TABLE_ITER_ERROR = 4 , } # [doc = " Hash table data structure. This module provides an automatically resizing\n hash table implementation for general purpose use. The hash table stores a\n mapping between void * keys and values; it is expected that in most cases,\n these will point to a structure elsewhere in the heap, instead of inlining a\n key or value into the hash table element itself.\n\n Currently, this hash table implements a variant of robin hood hashing, but\n we do not guarantee that this won't change in the future.\n\n Associated with each hash function are four callbacks:\n\n   hash_fn - A hash function from the keys to a uint64_t. It is critical that\n      the hash function for a key does not change while the key is in the hash\n      table; violating this results in undefined behavior. Collisions are\n      tolerated, though naturally with reduced performance.\n\n   equals_fn - An equality comparison function. This function must be\n      reflexive and consistent with hash_fn.\n\n   destroy_key_fn, destroy_value_fn - Optional callbacks invoked when the\n      table is cleared or cleaned up and at the caller's option when an element\n      is removed from the table. Either or both may be set to NULL, which\n      has the same effect as a no-op destroy function.\n\n This datastructure can be safely moved between threads, subject to the\n requirements of the underlying allocator. It is also safe to invoke\n non-mutating operations on the hash table from multiple threads. A suitable\n memory barrier must be used when transitioning from single-threaded mutating\n usage to multithreaded usage."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct hash_table_state { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_hash_table { pub p_impl : * mut hash_table_state , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash_table"] [:: std :: mem :: size_of :: < aws_hash_table > () - 8usize] ; ["Alignment of aws_hash_table"] [:: std :: mem :: align_of :: < aws_hash_table > () - 8usize] ; ["Offset of field: aws_hash_table::p_impl"] [:: std :: mem :: offset_of ! (aws_hash_table , p_impl) - 0usize] ; } ; 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\n table may provide pointers to elements stored within the hash table;\n generally, calling code may alter value, but must not alter key (or any\n information used to compute key's hash code).\n\n Pointers to elements within the hash are invalidated whenever an operation\n which may change the number of elements in the hash is invoked (i.e. put,\n delete, clear, and clean_up), regardless of whether the number of elements\n actually changes."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_hash_element { pub key : * const :: libc :: c_void , pub value : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash_element"] [:: std :: mem :: size_of :: < aws_hash_element > () - 16usize] ; ["Alignment of aws_hash_element"] [:: std :: mem :: align_of :: < aws_hash_element > () - 8usize] ; ["Offset of field: aws_hash_element::key"] [:: std :: mem :: offset_of ! (aws_hash_element , key) - 0usize] ; ["Offset of field: aws_hash_element::value"] [:: std :: mem :: offset_of ! (aws_hash_element , value) - 8usize] ; } ; 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 () } } } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_hash_iter_status { AWS_HASH_ITER_STATUS_DONE = 0 , AWS_HASH_ITER_STATUS_DELETE_CALLED = 1 , AWS_HASH_ITER_STATUS_READY_FOR_USE = 2 , } # [repr (C)] # [derive (Debug , Copy , Clone)] 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 : :: libc :: c_int , pub unused_1 : * mut :: libc :: c_void , pub unused_2 : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_hash_iter"] [:: std :: mem :: size_of :: < aws_hash_iter > () - 64usize] ; ["Alignment of aws_hash_iter"] [:: std :: mem :: align_of :: < aws_hash_iter > () - 8usize] ; ["Offset of field: aws_hash_iter::map"] [:: std :: mem :: offset_of ! (aws_hash_iter , map) - 0usize] ; ["Offset of field: aws_hash_iter::element"] [:: std :: mem :: offset_of ! (aws_hash_iter , element) - 8usize] ; ["Offset of field: aws_hash_iter::slot"] [:: std :: mem :: offset_of ! (aws_hash_iter , slot) - 24usize] ; ["Offset of field: aws_hash_iter::limit"] [:: std :: mem :: offset_of ! (aws_hash_iter , limit) - 32usize] ; ["Offset of field: aws_hash_iter::status"] [:: std :: mem :: offset_of ! (aws_hash_iter , status) - 40usize] ; ["Offset of field: aws_hash_iter::unused_0"] [:: std :: mem :: offset_of ! (aws_hash_iter , unused_0) - 44usize] ; ["Offset of field: aws_hash_iter::unused_1"] [:: std :: mem :: offset_of ! (aws_hash_iter , unused_1) - 48usize] ; ["Offset of field: aws_hash_iter::unused_2"] [:: std :: mem :: offset_of ! (aws_hash_iter , unused_2) - 56usize] ; } ; 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 :: libc :: c_void) -> u64 > ; # [doc = " Prototype for a hash table equality check function pointer.\n\n This type is usually used for a function that compares two hash table\n keys, but note that the same type is used for a function that compares\n two hash table values in aws_hash_table_eq.\n\n Equality functions used in a hash table must be be reflexive (a == a),\n symmetric (a == b => b == a), transitive (a == b, b == c => a == c)\n and consistent (result does not change with time)."] pub type aws_hash_callback_eq_fn = :: std :: option :: Option < unsafe extern "C" fn (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool > ; # [doc = " Prototype for a hash table key or value destructor function pointer.\n\n This function is used to destroy elements in the hash table when the\n table is cleared or cleaned up.\n\n Note that functions which remove individual elements from the hash\n table provide options of whether or not to invoke the destructors\n 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 :: libc :: c_void) > ; unsafe extern "C" { # [doc = " Initializes a hash map with initial capacity for 'size' elements\n without resizing. Uses hash_fn to compute the hash of each element.\n equals_fn to compute equality of two keys.  Whenever an element is\n removed without being returned, destroy_key_fn is run on the pointer\n to the key and destroy_value_fn is run on the pointer to the value.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Deletes every element from map and frees all associated memory.\n destroy_fn will be called for each element.  aws_hash_table_init\n must be called before reusing the hash table.\n\n This method is idempotent."] pub fn aws_hash_table_clean_up (map : * mut aws_hash_table) ; } unsafe extern "C" { # [doc = " Safely swaps two hash tables. Note that we swap the entirety of the hash\n table, including which allocator is associated.\n\n Neither hash table is required to be initialized; if one or both is\n uninitialized, then the uninitialized state is also swapped."] pub fn aws_hash_table_swap (a : * mut aws_hash_table , b : * mut aws_hash_table) ; } unsafe extern "C" { # [doc = " Moves the hash table in 'from' to 'to'. After this move, 'from' will\n be identical to the state of the original 'to' hash table, and 'to'\n will be in the same state as if it had been passed to aws_hash_table_clean_up\n (that is, it will have no memory allocated, and it will be safe to\n either discard it or call aws_hash_table_clean_up again).\n\n Note that 'to' will not be cleaned up. You should make sure that 'to'\n is either uninitialized or cleaned up before moving a hashtable into\n it."] pub fn aws_hash_table_move (to : * mut aws_hash_table , from : * mut aws_hash_table) ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Returns an iterator to be used for iterating through a hash table.\n Iterator will already point to the first element of the table it finds,\n which can be accessed as iter.element.\n\n This function cannot fail, but if there are no elements in the table,\n 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 ; } unsafe extern "C" { # [doc = " Returns true if iterator is done iterating through table, false otherwise.\n 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 ; } unsafe extern "C" { # [doc = " Updates iterator so that it points to next element of hash table.\n\n This and the two previous functions are designed to be used together with\n the following idiom:\n\n for (struct aws_hash_iter iter = aws_hash_iter_begin(&map);\n      !aws_hash_iter_done(&iter); aws_hash_iter_next(&iter)) {\n     const key_type key = *(const key_type *)iter.element.key;\n     value_type value = *(value_type *)iter.element.value;\n     // etc.\n }\n\n Note that calling this on an iter which is \"done\" is idempotent:\n i.e. it will return another iter which is \"done\"."] pub fn aws_hash_iter_next (iter : * mut aws_hash_iter) ; } unsafe extern "C" { # [doc = " Deletes the element currently pointed-to by the hash iterator.\n After calling this method, the element member of the iterator\n should not be accessed until the next call to aws_hash_iter_next.\n\n @param destroy_contents If true, the destructors for the key and value\n  will be called."] pub fn aws_hash_iter_delete (iter : * mut aws_hash_iter , destroy_contents : bool) ; } unsafe extern "C" { # [doc = " Attempts to locate an element at key.  If the element is found, a\n pointer to the value is placed in *p_elem; if it is not found,\n *pElem is set to NULL. Either way, AWS_OP_SUCCESS is returned.\n\n This method does not change the state of the hash table. Therefore, it\n is safe to call _find from multiple threads on the same hash table,\n provided no mutating operations happen in parallel.\n\n Calling code may update the value in the hash table by modifying **pElem\n after a successful find. However, this pointer is not guaranteed to\n remain usable after a subsequent call to _put, _delete, _clear, or\n _clean_up."] pub fn aws_hash_table_find (map : * const aws_hash_table , key : * const :: libc :: c_void , p_elem : * mut * mut aws_hash_element) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Attempts to locate an element at key. If no such element was found,\n creates a new element, with value initialized to NULL. In either case, a\n pointer to the element is placed in *p_elem.\n\n If was_created is non-NULL, *was_created is set to 0 if an existing\n element was found, or 1 is a new element was created.\n\n Returns AWS_OP_SUCCESS if an item was found or created.\n Raises AWS_ERROR_OOM if hash table expansion was required and memory\n allocation failed."] pub fn aws_hash_table_create (map : * mut aws_hash_table , key : * const :: libc :: c_void , p_elem : * mut * mut aws_hash_element , was_created : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Inserts a new element at key, with the given value. If another element\n exists at that key, the old element will be overwritten; both old key and\n value objects will be destroyed.\n\n If was_created is non-NULL, *was_created is set to 0 if an existing\n element was found, or 1 is a new element was created.\n\n Returns AWS_OP_SUCCESS if an item was found or created.\n Raises AWS_ERROR_OOM if hash table expansion was required and memory\n allocation failed."] pub fn aws_hash_table_put (map : * mut aws_hash_table , key : * const :: libc :: c_void , value : * mut :: libc :: c_void , was_created : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes element at key. Always returns AWS_OP_SUCCESS.\n\n If pValue is non-NULL, the existing value (if any) is moved into\n (*value) before removing from the table, and destroy_fn is _not_\n invoked. If pValue is NULL, then (if the element existed) destroy_fn\n will be invoked on the element being removed.\n\n If was_present is non-NULL, it is set to 0 if the element was\n 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 :: libc :: c_void , p_value : * mut aws_hash_element , was_present : * mut :: libc :: c_int) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes element already known (typically by find()).\n\n p_value should point to a valid element returned by create() or find().\n\n NOTE: DO NOT call this method from inside of a aws_hash_table_foreach callback, return\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Iterates through every element in the map and invokes the callback on\n that item. Iteration is performed in an arbitrary, implementation-defined\n order, and is not guaranteed to be consistent across invocations.\n\n The callback may change the value associated with the key by overwriting\n the value pointed-to by value. In this case, the on_element_removed\n callback will not be invoked, unless the callback invokes\n AWS_COMMON_HASH_TABLE_ITER_DELETE (in which case the on_element_removed\n is given the updated value).\n\n The callback must return a bitmask of zero or more of the following values\n ORed together:\n\n # AWS_COMMON_HASH_TABLE_ITER_CONTINUE - Continues iteration to the next\n     element (if not set, iteration stops)\n # AWS_COMMON_HASH_TABLE_ITER_DELETE   - Deletes the current value and\n     continues iteration.  destroy_fn will NOT be invoked.\n # AWS_COMMON_HASH_TABLE_ITER_ERROR   - Stop iteration with error.\n     No action will be taken for the current value and the value before this.\n     No rolling back. The deleted value before will NOT be back.\n     aws_hash_table_foreach returns AWS_OP_ERR after stropping the iteration.\n\n Invoking any method which may change the contents of the hashtable\n during iteration results in undefined behavior. However, you may safely\n invoke non-mutating operations during an iteration.\n\n This operation is mutating only if AWS_COMMON_HASH_TABLE_ITER_DELETE\n is returned at some point during iteration. Otherwise, it is non-mutating\n 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 :: libc :: c_void , p_element : * mut aws_hash_element) -> :: libc :: c_int > , context : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Compares two hash tables for equality. Both hash tables must have equivalent\n key comparators; values will be compared using the comparator passed into this\n function. The key hash function does not need to be equivalent between the\n 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 ; } unsafe extern "C" { # [doc = " Removes every element from the hash map. destroy_fn will be called for\n each element."] pub fn aws_hash_table_clear (map : * mut aws_hash_table) ; } unsafe extern "C" { # [doc = " Convenience hash function for NULL-terminated C-strings"] pub fn aws_hash_c_string (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Convenience hash function for struct aws_strings.\n Hash is same as used on the string bytes by aws_hash_c_string."] pub fn aws_hash_string (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Convenience hash function for struct aws_byte_cursor.\n Hash is same as used on the string bytes by aws_hash_c_string."] pub fn aws_hash_byte_cursor_ptr (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Convenience hash function which hashes the pointer value directly,\n without dereferencing.  This can be used in cases where pointer identity\n is desired, or where a uintptr_t is encoded into a const void *."] pub fn aws_hash_ptr (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { pub fn aws_hash_combine (item1 : u64 , item2 : u64) -> u64 ; } unsafe extern "C" { # [doc = " Convenience eq callback for NULL-terminated C-strings"] pub fn aws_hash_callback_c_str_eq (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " Convenience eq callback for AWS strings"] pub fn aws_hash_callback_string_eq (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool ; } unsafe extern "C" { # [doc = " Convenience destroy callback for AWS strings"] pub fn aws_hash_callback_string_destroy (a : * mut :: libc :: c_void) ; } unsafe extern "C" { # [doc = " Equality function which compares pointer equality."] pub fn aws_ptr_eq (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = " Helper function to hash keys that are uint64_t values.\n\n The function is not a strong hash function in any sense; it merely reflects\n the uint64 value back.  Do not use this function as a hash if you need\n the properties of a strong hash function."] pub fn aws_hash_uint64_t_by_identity (item : * const :: libc :: c_void) -> u64 ; } unsafe extern "C" { # [doc = " Helper function to compare hash keys that are uint64_t values."] pub fn aws_hash_compare_uint64_t_eq (a : * const :: libc :: c_void , b : * const :: libc :: c_void) -> bool ; } # [repr (C)] pub struct aws_mutex { pub mutex_handle : pthread_mutex_t , pub initialized : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_mutex"] [:: std :: mem :: size_of :: < aws_mutex > () - 48usize] ; ["Alignment of aws_mutex"] [:: std :: mem :: align_of :: < aws_mutex > () - 8usize] ; ["Offset of field: aws_mutex::mutex_handle"] [:: std :: mem :: offset_of ! (aws_mutex , mutex_handle) - 0usize] ; ["Offset of field: aws_mutex::initialized"] [:: std :: mem :: offset_of ! (aws_mutex , initialized) - 40usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = " Initializes a new platform instance of mutex."] pub fn aws_mutex_init (mutex : * mut aws_mutex) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Cleans up internal resources."] pub fn aws_mutex_clean_up (mutex : * mut aws_mutex) ; } unsafe extern "C" { # [doc = " Blocks until it acquires the lock. While on some platforms such as Windows,\n this may behave as a reentrant mutex, you should not treat it like one. On\n platforms it is possible for it to be non-reentrant, it will be."] pub fn aws_mutex_lock (mutex : * mut aws_mutex) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Attempts to acquire the lock but returns immediately if it can not.\n While on some platforms such as Windows, this may behave as a reentrant mutex,\n you should not treat it like one. On platforms it is possible for it to be non-reentrant, it will be.\n 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) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Releases the lock."] pub fn aws_mutex_unlock (mutex : * mut aws_mutex) -> :: libc :: c_int ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_connection_finish_code { AWS_S3_CONNECTION_FINISH_CODE_SUCCESS = 0 , AWS_S3_CONNECTION_FINISH_CODE_FAILED = 1 , AWS_S3_CONNECTION_FINISH_CODE_RETRY = 2 , } pub type aws_s3_endpoint_shutdown_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_endpoint_options { pub host_name : * mut aws_string , pub shutdown_callback : aws_s3_endpoint_shutdown_fn , pub client_bootstrap : * mut aws_client_bootstrap , pub tls_connection_options : * const aws_tls_connection_options , pub dns_host_address_ttl_seconds : usize , pub client : * mut aws_s3_client , pub max_connections : u32 , pub port : u32 , # [doc = " Optional.\n Proxy configuration for http connection."] pub proxy_config : * mut aws_http_proxy_config , # [doc = " Optional.\n Configuration for fetching proxy configuration from environment.\n By Default proxy_ev_settings.aws_http_proxy_env_var_type is set to AWS_HPEV_ENABLE which means read proxy\n configuration from environment.\n Only works when proxy_config is not set. If both are set, configuration from proxy_config is used."] pub proxy_ev_settings : * mut proxy_env_var_settings , # [doc = " Optional.\n If set to 0, default value is used."] pub connect_timeout_ms : u32 , # [doc = " Optional.\n Set keepalive to periodically transmit messages for detecting a disconnected peer."] pub tcp_keep_alive_options : * mut aws_s3_tcp_keep_alive_options , # [doc = " Optional.\n Configuration options for connection monitoring.\n If the transfer speed falls below the specified minimum_throughput_bytes_per_second, the operation is aborted."] pub monitoring_options : * mut aws_http_connection_monitoring_options , pub network_interface_names_array : * const aws_byte_cursor , pub num_network_interface_names : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_endpoint_options"] [:: std :: mem :: size_of :: < aws_s3_endpoint_options > () - 112usize] ; ["Alignment of aws_s3_endpoint_options"] [:: std :: mem :: align_of :: < aws_s3_endpoint_options > () - 8usize] ; ["Offset of field: aws_s3_endpoint_options::host_name"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , host_name) - 0usize] ; ["Offset of field: aws_s3_endpoint_options::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , shutdown_callback) - 8usize] ; ["Offset of field: aws_s3_endpoint_options::client_bootstrap"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , client_bootstrap) - 16usize] ; ["Offset of field: aws_s3_endpoint_options::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , tls_connection_options) - 24usize] ; ["Offset of field: aws_s3_endpoint_options::dns_host_address_ttl_seconds"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , dns_host_address_ttl_seconds) - 32usize] ; ["Offset of field: aws_s3_endpoint_options::client"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , client) - 40usize] ; ["Offset of field: aws_s3_endpoint_options::max_connections"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , max_connections) - 48usize] ; ["Offset of field: aws_s3_endpoint_options::port"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , port) - 52usize] ; ["Offset of field: aws_s3_endpoint_options::proxy_config"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , proxy_config) - 56usize] ; ["Offset of field: aws_s3_endpoint_options::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , proxy_ev_settings) - 64usize] ; ["Offset of field: aws_s3_endpoint_options::connect_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , connect_timeout_ms) - 72usize] ; ["Offset of field: aws_s3_endpoint_options::tcp_keep_alive_options"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , tcp_keep_alive_options) - 80usize] ; ["Offset of field: aws_s3_endpoint_options::monitoring_options"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , monitoring_options) - 88usize] ; ["Offset of field: aws_s3_endpoint_options::network_interface_names_array"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , network_interface_names_array) - 96usize] ; ["Offset of field: aws_s3_endpoint_options::num_network_interface_names"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_options , num_network_interface_names) - 104usize] ; } ; impl Default for aws_s3_endpoint_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 , Default , Copy , Clone)] pub struct aws_s3_endpoint_system_vtable { pub acquire : :: std :: option :: Option < unsafe extern "C" fn (endpoint : * mut aws_s3_endpoint , already_holding_lock : bool) > , pub release : :: std :: option :: Option < unsafe extern "C" fn (endpoint : * mut aws_s3_endpoint) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_endpoint_system_vtable"] [:: std :: mem :: size_of :: < aws_s3_endpoint_system_vtable > () - 16usize] ; ["Alignment of aws_s3_endpoint_system_vtable"] [:: std :: mem :: align_of :: < aws_s3_endpoint_system_vtable > () - 8usize] ; ["Offset of field: aws_s3_endpoint_system_vtable::acquire"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_system_vtable , acquire) - 0usize] ; ["Offset of field: aws_s3_endpoint_system_vtable::release"] [:: std :: mem :: offset_of ! (aws_s3_endpoint_system_vtable , release) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_endpoint { pub client_synced_data : aws_s3_endpoint__bindgen_ty_1 , pub allocator : * mut aws_allocator , pub host_name : * mut aws_string , pub http_connection_manager : * mut aws_http_connection_manager , pub client : * mut aws_s3_client , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_endpoint__bindgen_ty_1 { pub ref_count : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_endpoint__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_endpoint__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_s3_endpoint__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_endpoint__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_endpoint__bindgen_ty_1::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_endpoint__bindgen_ty_1 , ref_count) - 0usize] ; } ; # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_endpoint"] [:: std :: mem :: size_of :: < aws_s3_endpoint > () - 40usize] ; ["Alignment of aws_s3_endpoint"] [:: std :: mem :: align_of :: < aws_s3_endpoint > () - 8usize] ; ["Offset of field: aws_s3_endpoint::client_synced_data"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , client_synced_data) - 0usize] ; ["Offset of field: aws_s3_endpoint::allocator"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , allocator) - 8usize] ; ["Offset of field: aws_s3_endpoint::host_name"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , host_name) - 16usize] ; ["Offset of field: aws_s3_endpoint::http_connection_manager"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , http_connection_manager) - 24usize] ; ["Offset of field: aws_s3_endpoint::client"] [:: std :: mem :: offset_of ! (aws_s3_endpoint , client) - 32usize] ; } ; impl Default for aws_s3_endpoint { 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)] pub struct aws_s3_connection { pub endpoint : * mut aws_s3_endpoint , pub http_connection : * mut aws_http_connection , pub request : * mut aws_s3_request , pub retry_token : * mut aws_retry_token , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_connection"] [:: std :: mem :: size_of :: < aws_s3_connection > () - 32usize] ; ["Alignment of aws_s3_connection"] [:: std :: mem :: align_of :: < aws_s3_connection > () - 8usize] ; ["Offset of field: aws_s3_connection::endpoint"] [:: std :: mem :: offset_of ! (aws_s3_connection , endpoint) - 0usize] ; ["Offset of field: aws_s3_connection::http_connection"] [:: std :: mem :: offset_of ! (aws_s3_connection , http_connection) - 8usize] ; ["Offset of field: aws_s3_connection::request"] [:: std :: mem :: offset_of ! (aws_s3_connection , request) - 16usize] ; ["Offset of field: aws_s3_connection::retry_token"] [:: std :: mem :: offset_of ! (aws_s3_connection , retry_token) - 24usize] ; } ; impl Default for aws_s3_connection { 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)] pub struct aws_s3_client_vtable { pub meta_request_factory : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client , options : * const aws_s3_meta_request_options) -> * mut aws_s3_meta_request > , pub create_connection_for_request : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client , request : * mut aws_s3_request) > , pub acquire_http_connection : :: std :: option :: Option < unsafe extern "C" fn (conn_manager : * mut aws_http_connection_manager , on_connection_acquired_callback : aws_http_connection_manager_on_connection_setup_fn , user_data : * mut :: libc :: c_void) > , pub get_host_address_count : :: std :: option :: Option < unsafe extern "C" fn (host_resolver : * mut aws_host_resolver , host_name : * const aws_string , flags : u32) -> usize > , pub schedule_process_work_synced : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client) > , pub process_work : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client) > , pub endpoint_shutdown_callback : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client) > , pub finish_destroy : :: std :: option :: Option < unsafe extern "C" fn (client : * mut aws_s3_client) > , pub parallel_input_stream_new_from_file : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , file_name : aws_byte_cursor , reading_elg : * mut aws_event_loop_group , direct_io_read : bool) -> * mut aws_parallel_input_stream > , pub http_connection_make_request : :: std :: option :: Option < unsafe extern "C" fn (client_connection : * mut aws_http_connection , options : * const aws_http_make_request_options) -> * mut aws_http_stream > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client_vtable"] [:: std :: mem :: size_of :: < aws_s3_client_vtable > () - 80usize] ; ["Alignment of aws_s3_client_vtable"] [:: std :: mem :: align_of :: < aws_s3_client_vtable > () - 8usize] ; ["Offset of field: aws_s3_client_vtable::meta_request_factory"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , meta_request_factory) - 0usize] ; ["Offset of field: aws_s3_client_vtable::create_connection_for_request"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , create_connection_for_request) - 8usize] ; ["Offset of field: aws_s3_client_vtable::acquire_http_connection"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , acquire_http_connection) - 16usize] ; ["Offset of field: aws_s3_client_vtable::get_host_address_count"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , get_host_address_count) - 24usize] ; ["Offset of field: aws_s3_client_vtable::schedule_process_work_synced"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , schedule_process_work_synced) - 32usize] ; ["Offset of field: aws_s3_client_vtable::process_work"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , process_work) - 40usize] ; ["Offset of field: aws_s3_client_vtable::endpoint_shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , endpoint_shutdown_callback) - 48usize] ; ["Offset of field: aws_s3_client_vtable::finish_destroy"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , finish_destroy) - 56usize] ; ["Offset of field: aws_s3_client_vtable::parallel_input_stream_new_from_file"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , parallel_input_stream_new_from_file) - 64usize] ; ["Offset of field: aws_s3_client_vtable::http_connection_make_request"] [:: std :: mem :: offset_of ! (aws_s3_client_vtable , http_connection_make_request) - 72usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_part_timeout_stats { pub stop_timeout : bool , pub num_successful_upload_requests : u64 , pub initial_request_time : aws_s3_upload_part_timeout_stats__bindgen_ty_1 , pub timeout_rate_tracking : aws_s3_upload_part_timeout_stats__bindgen_ty_2 , pub response_to_first_byte_time : aws_s3_upload_part_timeout_stats__bindgen_ty_3 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_part_timeout_stats__bindgen_ty_1 { pub sum_ns : u64 , pub num_samples : u64 , pub collecting_p90 : bool , pub p90_samples : aws_priority_queue , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_timeout_stats__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_1 > () - 112usize] ; ["Alignment of aws_s3_upload_part_timeout_stats__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_1::sum_ns"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_1 , sum_ns) - 0usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_1::num_samples"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_1 , num_samples) - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_1::collecting_p90"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_1 , collecting_p90) - 16usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_1::p90_samples"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_1 , p90_samples) - 24usize] ; } ; impl Default for aws_s3_upload_part_timeout_stats__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 () } } } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_upload_part_timeout_stats__bindgen_ty_2 { pub num_completed : u64 , pub num_failed : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_timeout_stats__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_2 > () - 16usize] ; ["Alignment of aws_s3_upload_part_timeout_stats__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_2::num_completed"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_2 , num_completed) - 0usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_2::num_failed"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_2 , num_failed) - 8usize] ; } ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_upload_part_timeout_stats__bindgen_ty_3 { pub sum_ns : u64 , pub num_samples : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_timeout_stats__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_3 > () - 16usize] ; ["Alignment of aws_s3_upload_part_timeout_stats__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_upload_part_timeout_stats__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_3::sum_ns"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_3 , sum_ns) - 0usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats__bindgen_ty_3::num_samples"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats__bindgen_ty_3 , num_samples) - 8usize] ; } ; # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_upload_part_timeout_stats"] [:: std :: mem :: size_of :: < aws_s3_upload_part_timeout_stats > () - 160usize] ; ["Alignment of aws_s3_upload_part_timeout_stats"] [:: std :: mem :: align_of :: < aws_s3_upload_part_timeout_stats > () - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::stop_timeout"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , stop_timeout) - 0usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::num_successful_upload_requests"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , num_successful_upload_requests) - 8usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::initial_request_time"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , initial_request_time) - 16usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::timeout_rate_tracking"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , timeout_rate_tracking) - 128usize] ; ["Offset of field: aws_s3_upload_part_timeout_stats::response_to_first_byte_time"] [:: std :: mem :: offset_of ! (aws_s3_upload_part_timeout_stats , response_to_first_byte_time) - 144usize] ; } ; impl Default for aws_s3_upload_part_timeout_stats { 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)] pub struct aws_s3_client { pub allocator : * mut aws_allocator , pub buffer_pool : * mut aws_s3_buffer_pool , pub vtable : * mut aws_s3_client_vtable , pub ref_count : aws_ref_count , pub client_bootstrap : * mut aws_client_bootstrap , pub process_work_event_loop : * mut aws_event_loop , pub body_streaming_elg : * mut aws_event_loop_group , pub region : * mut aws_string , pub part_size : usize , pub part_size_set : bool , pub max_part_size : u64 , pub optimal_range_size : u64 , pub fio_options_set : bool , pub fio_opts : aws_s3_file_io_options , pub multipart_upload_threshold : u64 , pub tls_connection_options : * mut aws_tls_connection_options , pub cached_signing_config : * mut aws_cached_signing_config_aws , pub s3express_provider_factory : aws_s3express_provider_factory_fn , pub factory_user_data : * mut :: libc :: c_void , pub s3express_provider : * mut aws_s3express_credentials_provider , pub throughput_target_gbps : f64 , pub ideal_connection_count : u32 , # [doc = " For multi-part upload, content-md5 will be calculated if the AWS_MR_CONTENT_MD5_ENABLED is specified\n     or initial request has content-md5 header.\n For single-part upload, if the content-md5 header is specified, it will remain unchanged. If the header is not\n     specified, and this is set to AWS_MR_CONTENT_MD5_ENABLED, it will be calculated."] pub compute_content_md5 : aws_s3_meta_request_compute_content_md5 , pub max_active_connections_override : u32 , pub max_allowed_connections : aws_atomic_var , pub retry_strategy : * mut aws_retry_strategy , # [doc = " Optional.\n Proxy configuration for http connection."] pub proxy_config : * mut aws_http_proxy_config , # [doc = " Optional.\n Configuration for fetching proxy configuration from environment.\n By Default proxy_ev_settings.aws_http_proxy_env_var_type is set to AWS_HPEV_ENABLE which means read proxy\n configuration from environment.\n Only works when proxy_config is not set. If both are set, configuration from proxy_config is used."] pub proxy_ev_settings : * mut proxy_env_var_settings , # [doc = " Optional.\n If set to 0, default value is used."] pub connect_timeout_ms : u32 , # [doc = " Optional.\n Set keepalive to periodically transmit messages for detecting a disconnected peer."] pub tcp_keep_alive_options : * mut aws_s3_tcp_keep_alive_options , # [doc = " Configuration options for connection monitoring.\n If the transfer speed falls below the specified minimum_throughput_bytes_per_second, the operation is aborted.\n If user passes in NULL, default values are used."] pub monitoring_options : aws_http_connection_monitoring_options , pub proxy_ev_tls_options : * mut aws_tls_connection_options , pub shutdown_callback : aws_s3_client_shutdown_complete_callback_fn , pub shutdown_callback_user_data : * mut :: libc :: c_void , pub enable_read_backpressure : bool , pub initial_read_window : usize , # [doc = " Timeout in ms for upload request for request after sending to the response first byte received."] pub upload_timeout_ms : aws_atomic_var , pub network_interface_names : aws_array_list , pub network_interface_names_cursor_array : * mut aws_byte_cursor , pub num_network_interface_names : usize , pub stats : aws_s3_client__bindgen_ty_1 , pub synced_data : aws_s3_client__bindgen_ty_2 , pub threaded_data : aws_s3_client__bindgen_ty_3 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_client__bindgen_ty_1 { pub num_requests_in_flight : aws_atomic_var , pub num_requests_network_io : [aws_atomic_var ; 4usize] , pub num_requests_stream_queued_waiting : aws_atomic_var , pub num_requests_streaming_response : aws_atomic_var , pub num_requests_streaming_request_body : aws_atomic_var , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_client__bindgen_ty_1 > () - 64usize] ; ["Alignment of aws_s3_client__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_client__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_in_flight"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_in_flight) - 0usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_network_io"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_network_io) - 8usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_stream_queued_waiting"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_stream_queued_waiting) - 40usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_streaming_response"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_streaming_response) - 48usize] ; ["Offset of field: aws_s3_client__bindgen_ty_1::num_requests_streaming_request_body"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_1 , num_requests_streaming_request_body) - 56usize] ; } ; impl Default for aws_s3_client__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 () } } } # [repr (C)] pub struct aws_s3_client__bindgen_ty_2 { pub lock : aws_mutex , pub endpoints : aws_hash_table , pub num_failed_prepare_requests : u32 , pub pending_meta_request_work : aws_linked_list , pub prepared_requests : aws_linked_list , pub process_work_task : aws_task , pub trim_buffer_pool_task : aws_task , pub endpoints_cleanup_task : aws_task , pub num_endpoints_allocated : u32 , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub upload_part_stats : aws_s3_upload_part_timeout_stats , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_client__bindgen_ty_2 > () - 488usize] ; ["Alignment of aws_s3_client__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_client__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::lock"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , lock) - 0usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::endpoints"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , endpoints) - 48usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::num_failed_prepare_requests"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , num_failed_prepare_requests) - 56usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::pending_meta_request_work"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , pending_meta_request_work) - 64usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::prepared_requests"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , prepared_requests) - 96usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::process_work_task"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , process_work_task) - 128usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::trim_buffer_pool_task"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , trim_buffer_pool_task) - 192usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::endpoints_cleanup_task"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , endpoints_cleanup_task) - 256usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::num_endpoints_allocated"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , num_endpoints_allocated) - 320usize] ; ["Offset of field: aws_s3_client__bindgen_ty_2::upload_part_stats"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_2 , upload_part_stats) - 328usize] ; } ; impl Default for aws_s3_client__bindgen_ty_2 { 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 () } } } impl aws_s3_client__bindgen_ty_2 { # [inline] pub fn active (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_active (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn active_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_active_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn start_destroy_executing (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_start_destroy_executing (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub unsafe fn start_destroy_executing_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 1usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_start_destroy_executing_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 1usize , 1u8 , val as u64 ,) } } # [inline] pub fn process_work_task_scheduled (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_process_work_task_scheduled (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub unsafe fn process_work_task_scheduled_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 2usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_process_work_task_scheduled_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 2usize , 1u8 , val as u64 ,) } } # [inline] pub fn process_work_task_in_progress (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_process_work_task_in_progress (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (3usize , 1u8 , val as u64) } } # [inline] pub unsafe fn process_work_task_in_progress_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 3usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_process_work_task_in_progress_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 3usize , 1u8 , val as u64 ,) } } # [inline] pub fn body_streaming_elg_allocated (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (4usize , 1u8) as u32) } } # [inline] pub fn set_body_streaming_elg_allocated (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (4usize , 1u8 , val as u64) } } # [inline] pub unsafe fn body_streaming_elg_allocated_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 4usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_body_streaming_elg_allocated_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 4usize , 1u8 , val as u64 ,) } } # [inline] pub fn s3express_provider_active (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (5usize , 1u8) as u32) } } # [inline] pub fn set_s3express_provider_active (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (5usize , 1u8 , val as u64) } } # [inline] pub unsafe fn s3express_provider_active_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 5usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_s3express_provider_active_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 5usize , 1u8 , val as u64 ,) } } # [inline] pub fn finish_destroy (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 1u8) as u32) } } # [inline] pub fn set_finish_destroy (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (6usize , 1u8 , val as u64) } } # [inline] pub unsafe fn finish_destroy_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 6usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_finish_destroy_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 6usize , 1u8 , val as u64 ,) } } # [inline] pub fn endpoints_cleanup_task_scheduled (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (7usize , 1u8) as u32) } } # [inline] pub fn set_endpoints_cleanup_task_scheduled (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (7usize , 1u8 , val as u64) } } # [inline] pub unsafe fn endpoints_cleanup_task_scheduled_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 7usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_endpoints_cleanup_task_scheduled_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 7usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (active : u32 , start_destroy_executing : u32 , process_work_task_scheduled : u32 , process_work_task_in_progress : u32 , body_streaming_elg_allocated : u32 , s3express_provider_active : u32 , finish_destroy : u32 , endpoints_cleanup_task_scheduled : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let active : u32 = unsafe { :: std :: mem :: transmute (active) } ; active as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let start_destroy_executing : u32 = unsafe { :: std :: mem :: transmute (start_destroy_executing) } ; start_destroy_executing as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let process_work_task_scheduled : u32 = unsafe { :: std :: mem :: transmute (process_work_task_scheduled) } ; process_work_task_scheduled as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let process_work_task_in_progress : u32 = unsafe { :: std :: mem :: transmute (process_work_task_in_progress) } ; process_work_task_in_progress as u64 }) ; __bindgen_bitfield_unit . set (4usize , 1u8 , { let body_streaming_elg_allocated : u32 = unsafe { :: std :: mem :: transmute (body_streaming_elg_allocated) } ; body_streaming_elg_allocated as u64 }) ; __bindgen_bitfield_unit . set (5usize , 1u8 , { let s3express_provider_active : u32 = unsafe { :: std :: mem :: transmute (s3express_provider_active) } ; s3express_provider_active as u64 }) ; __bindgen_bitfield_unit . set (6usize , 1u8 , { let finish_destroy : u32 = unsafe { :: std :: mem :: transmute (finish_destroy) } ; finish_destroy as u64 }) ; __bindgen_bitfield_unit . set (7usize , 1u8 , { let endpoints_cleanup_task_scheduled : u32 = unsafe { :: std :: mem :: transmute (endpoints_cleanup_task_scheduled) } ; endpoints_cleanup_task_scheduled as u64 }) ; __bindgen_bitfield_unit } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_client__bindgen_ty_3 { pub request_queue : aws_linked_list , pub meta_requests : aws_linked_list , pub request_queue_size : u32 , pub num_requests_being_prepared : u32 , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub __bindgen_padding_0 : [u8 ; 7usize] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_client__bindgen_ty_3 > () - 80usize] ; ["Alignment of aws_s3_client__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_client__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_client__bindgen_ty_3::request_queue"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_3 , request_queue) - 0usize] ; ["Offset of field: aws_s3_client__bindgen_ty_3::meta_requests"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_3 , meta_requests) - 32usize] ; ["Offset of field: aws_s3_client__bindgen_ty_3::request_queue_size"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_3 , request_queue_size) - 64usize] ; ["Offset of field: aws_s3_client__bindgen_ty_3::num_requests_being_prepared"] [:: std :: mem :: offset_of ! (aws_s3_client__bindgen_ty_3 , num_requests_being_prepared) - 68usize] ; } ; impl Default for aws_s3_client__bindgen_ty_3 { 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 () } } } impl aws_s3_client__bindgen_ty_3 { # [inline] pub fn trim_buffer_pool_task_scheduled (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_trim_buffer_pool_task_scheduled (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn trim_buffer_pool_task_scheduled_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_trim_buffer_pool_task_scheduled_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (trim_buffer_pool_task_scheduled : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let trim_buffer_pool_task_scheduled : u32 = unsafe { :: std :: mem :: transmute (trim_buffer_pool_task_scheduled) } ; trim_buffer_pool_task_scheduled as u64 }) ; __bindgen_bitfield_unit } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_client"] [:: std :: mem :: size_of :: < aws_s3_client > () - 1032usize] ; ["Alignment of aws_s3_client"] [:: std :: mem :: align_of :: < aws_s3_client > () - 8usize] ; ["Offset of field: aws_s3_client::allocator"] [:: std :: mem :: offset_of ! (aws_s3_client , allocator) - 0usize] ; ["Offset of field: aws_s3_client::buffer_pool"] [:: std :: mem :: offset_of ! (aws_s3_client , buffer_pool) - 8usize] ; ["Offset of field: aws_s3_client::vtable"] [:: std :: mem :: offset_of ! (aws_s3_client , vtable) - 16usize] ; ["Offset of field: aws_s3_client::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_client , ref_count) - 24usize] ; ["Offset of field: aws_s3_client::client_bootstrap"] [:: std :: mem :: offset_of ! (aws_s3_client , client_bootstrap) - 48usize] ; ["Offset of field: aws_s3_client::process_work_event_loop"] [:: std :: mem :: offset_of ! (aws_s3_client , process_work_event_loop) - 56usize] ; ["Offset of field: aws_s3_client::body_streaming_elg"] [:: std :: mem :: offset_of ! (aws_s3_client , body_streaming_elg) - 64usize] ; ["Offset of field: aws_s3_client::region"] [:: std :: mem :: offset_of ! (aws_s3_client , region) - 72usize] ; ["Offset of field: aws_s3_client::part_size"] [:: std :: mem :: offset_of ! (aws_s3_client , part_size) - 80usize] ; ["Offset of field: aws_s3_client::part_size_set"] [:: std :: mem :: offset_of ! (aws_s3_client , part_size_set) - 88usize] ; ["Offset of field: aws_s3_client::max_part_size"] [:: std :: mem :: offset_of ! (aws_s3_client , max_part_size) - 96usize] ; ["Offset of field: aws_s3_client::optimal_range_size"] [:: std :: mem :: offset_of ! (aws_s3_client , optimal_range_size) - 104usize] ; ["Offset of field: aws_s3_client::fio_options_set"] [:: std :: mem :: offset_of ! (aws_s3_client , fio_options_set) - 112usize] ; ["Offset of field: aws_s3_client::fio_opts"] [:: std :: mem :: offset_of ! (aws_s3_client , fio_opts) - 120usize] ; ["Offset of field: aws_s3_client::multipart_upload_threshold"] [:: std :: mem :: offset_of ! (aws_s3_client , multipart_upload_threshold) - 144usize] ; ["Offset of field: aws_s3_client::tls_connection_options"] [:: std :: mem :: offset_of ! (aws_s3_client , tls_connection_options) - 152usize] ; ["Offset of field: aws_s3_client::cached_signing_config"] [:: std :: mem :: offset_of ! (aws_s3_client , cached_signing_config) - 160usize] ; ["Offset of field: aws_s3_client::s3express_provider_factory"] [:: std :: mem :: offset_of ! (aws_s3_client , s3express_provider_factory) - 168usize] ; ["Offset of field: aws_s3_client::factory_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client , factory_user_data) - 176usize] ; ["Offset of field: aws_s3_client::s3express_provider"] [:: std :: mem :: offset_of ! (aws_s3_client , s3express_provider) - 184usize] ; ["Offset of field: aws_s3_client::throughput_target_gbps"] [:: std :: mem :: offset_of ! (aws_s3_client , throughput_target_gbps) - 192usize] ; ["Offset of field: aws_s3_client::ideal_connection_count"] [:: std :: mem :: offset_of ! (aws_s3_client , ideal_connection_count) - 200usize] ; ["Offset of field: aws_s3_client::compute_content_md5"] [:: std :: mem :: offset_of ! (aws_s3_client , compute_content_md5) - 204usize] ; ["Offset of field: aws_s3_client::max_active_connections_override"] [:: std :: mem :: offset_of ! (aws_s3_client , max_active_connections_override) - 208usize] ; ["Offset of field: aws_s3_client::max_allowed_connections"] [:: std :: mem :: offset_of ! (aws_s3_client , max_allowed_connections) - 216usize] ; ["Offset of field: aws_s3_client::retry_strategy"] [:: std :: mem :: offset_of ! (aws_s3_client , retry_strategy) - 224usize] ; ["Offset of field: aws_s3_client::proxy_config"] [:: std :: mem :: offset_of ! (aws_s3_client , proxy_config) - 232usize] ; ["Offset of field: aws_s3_client::proxy_ev_settings"] [:: std :: mem :: offset_of ! (aws_s3_client , proxy_ev_settings) - 240usize] ; ["Offset of field: aws_s3_client::connect_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_client , connect_timeout_ms) - 248usize] ; ["Offset of field: aws_s3_client::tcp_keep_alive_options"] [:: std :: mem :: offset_of ! (aws_s3_client , tcp_keep_alive_options) - 256usize] ; ["Offset of field: aws_s3_client::monitoring_options"] [:: std :: mem :: offset_of ! (aws_s3_client , monitoring_options) - 264usize] ; ["Offset of field: aws_s3_client::proxy_ev_tls_options"] [:: std :: mem :: offset_of ! (aws_s3_client , proxy_ev_tls_options) - 296usize] ; ["Offset of field: aws_s3_client::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_client , shutdown_callback) - 304usize] ; ["Offset of field: aws_s3_client::shutdown_callback_user_data"] [:: std :: mem :: offset_of ! (aws_s3_client , shutdown_callback_user_data) - 312usize] ; ["Offset of field: aws_s3_client::enable_read_backpressure"] [:: std :: mem :: offset_of ! (aws_s3_client , enable_read_backpressure) - 320usize] ; ["Offset of field: aws_s3_client::initial_read_window"] [:: std :: mem :: offset_of ! (aws_s3_client , initial_read_window) - 328usize] ; ["Offset of field: aws_s3_client::upload_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_client , upload_timeout_ms) - 336usize] ; ["Offset of field: aws_s3_client::network_interface_names"] [:: std :: mem :: offset_of ! (aws_s3_client , network_interface_names) - 344usize] ; ["Offset of field: aws_s3_client::network_interface_names_cursor_array"] [:: std :: mem :: offset_of ! (aws_s3_client , network_interface_names_cursor_array) - 384usize] ; ["Offset of field: aws_s3_client::num_network_interface_names"] [:: std :: mem :: offset_of ! (aws_s3_client , num_network_interface_names) - 392usize] ; ["Offset of field: aws_s3_client::stats"] [:: std :: mem :: offset_of ! (aws_s3_client , stats) - 400usize] ; ["Offset of field: aws_s3_client::synced_data"] [:: std :: mem :: offset_of ! (aws_s3_client , synced_data) - 464usize] ; ["Offset of field: aws_s3_client::threaded_data"] [:: std :: mem :: offset_of ! (aws_s3_client , threaded_data) - 952usize] ; } ; impl Default for aws_s3_client { 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)] pub struct aws_s3_meta_request_resume_token { pub allocator : * mut aws_allocator , pub ref_count : aws_ref_count , pub type_ : aws_s3_meta_request_type , pub multipart_upload_id : * mut aws_string , pub part_size : usize , pub total_num_parts : usize , pub num_parts_completed : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_resume_token"] [:: std :: mem :: size_of :: < aws_s3_meta_request_resume_token > () - 72usize] ; ["Alignment of aws_s3_meta_request_resume_token"] [:: std :: mem :: align_of :: < aws_s3_meta_request_resume_token > () - 8usize] ; ["Offset of field: aws_s3_meta_request_resume_token::allocator"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , allocator) - 0usize] ; ["Offset of field: aws_s3_meta_request_resume_token::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , ref_count) - 8usize] ; ["Offset of field: aws_s3_meta_request_resume_token::type_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , type_) - 32usize] ; ["Offset of field: aws_s3_meta_request_resume_token::multipart_upload_id"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , multipart_upload_id) - 40usize] ; ["Offset of field: aws_s3_meta_request_resume_token::part_size"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , part_size) - 48usize] ; ["Offset of field: aws_s3_meta_request_resume_token::total_num_parts"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , total_num_parts) - 56usize] ; ["Offset of field: aws_s3_meta_request_resume_token::num_parts_completed"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_resume_token , num_parts_completed) - 64usize] ; } ; impl Default for aws_s3_meta_request_resume_token { 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 () } } } unsafe extern "C" { pub fn aws_s3_client_notify_connection_finished (client : * mut aws_s3_client , connection : * mut aws_s3_connection , error_code : :: libc :: c_int , finish_code : aws_s3_connection_finish_code) ; } unsafe extern "C" { pub fn aws_s3_meta_request_resume_token_new (allocator : * mut aws_allocator) -> * mut aws_s3_meta_request_resume_token ; } unsafe extern "C" { pub fn aws_s3_set_dns_ttl (ttl : usize) ; } unsafe extern "C" { pub fn aws_s3_client_get_max_requests_prepare (client : * mut aws_s3_client) -> u32 ; } unsafe extern "C" { pub fn aws_s3_client_get_max_active_connections (client : * mut aws_s3_client , meta_request : * mut aws_s3_meta_request) -> u32 ; } unsafe extern "C" { pub fn aws_s3_client_get_max_requests_in_flight (client : * mut aws_s3_client) -> u32 ; } unsafe extern "C" { pub fn aws_s3_client_queue_requests_threaded (client : * mut aws_s3_client , request_list : * mut aws_linked_list , queue_front : bool) -> u32 ; } unsafe extern "C" { pub fn aws_s3_client_dequeue_request_threaded (client : * mut aws_s3_client) -> * mut aws_s3_request ; } unsafe extern "C" { pub fn aws_s3_client_schedule_process_work (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_client_update_meta_requests_threaded (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_client_update_connections_threaded (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_endpoint_new (allocator : * mut aws_allocator , options : * const aws_s3_endpoint_options) -> * mut aws_s3_endpoint ; } unsafe extern "C" { pub fn aws_s3_client_lock_synced_data (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_client_unlock_synced_data (client : * mut aws_s3_client) ; } unsafe extern "C" { pub fn aws_s3_endpoint_set_system_vtable (vtable : * const aws_s3_endpoint_system_vtable) ; } unsafe extern "C" { pub fn aws_s3_endpoint_acquire (endpoint : * mut aws_s3_endpoint , already_holding_lock : bool) -> * mut aws_s3_endpoint ; } unsafe extern "C" { pub fn aws_s3_endpoint_release (endpoint : * mut aws_s3_endpoint) ; } unsafe extern "C" { pub fn aws_s3_endpoint_destroy (endpoint : * mut aws_s3_endpoint) ; } unsafe extern "C" { pub static g_min_num_connections : u32 ; } unsafe extern "C" { pub static g_expect_timeout_offset_ms : usize ; } unsafe extern "C" { pub fn aws_s3_client_update_upload_part_timeout (client : * mut aws_s3_client , finished_upload_part_request : * mut aws_s3_request , finished_error_code : :: libc :: c_int) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_default_buffer_ticket { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_default_buffer_pool_usage_stats { pub mem_limit : usize , pub primary_cutoff : usize , pub primary_allocated : usize , pub primary_num_blocks : usize , pub primary_used : usize , pub primary_reserved : usize , pub secondary_used : usize , pub secondary_reserved : usize , pub special_blocks_allocated : usize , pub special_blocks_num : usize , pub special_blocks_reserved : usize , pub special_blocks_used : usize , pub forced_used : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_default_buffer_pool_usage_stats"] [:: std :: mem :: size_of :: < aws_s3_default_buffer_pool_usage_stats > () - 104usize] ; ["Alignment of aws_s3_default_buffer_pool_usage_stats"] [:: std :: mem :: align_of :: < aws_s3_default_buffer_pool_usage_stats > () - 8usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::mem_limit"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , mem_limit) - 0usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_cutoff"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_cutoff) - 8usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_allocated"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_allocated) - 16usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_num_blocks"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_num_blocks) - 24usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_used) - 32usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::primary_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , primary_reserved) - 40usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::secondary_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , secondary_used) - 48usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::secondary_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , secondary_reserved) - 56usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::special_blocks_allocated"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , special_blocks_allocated) - 64usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::special_blocks_num"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , special_blocks_num) - 72usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::special_blocks_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , special_blocks_reserved) - 80usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::special_blocks_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , special_blocks_used) - 88usize] ; ["Offset of field: aws_s3_default_buffer_pool_usage_stats::forced_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool_usage_stats , forced_used) - 96usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct s3_special_block_list { pub allocator : * mut aws_allocator , pub buffer_size : usize , pub blocks : aws_array_list , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of s3_special_block_list"] [:: std :: mem :: size_of :: < s3_special_block_list > () - 56usize] ; ["Alignment of s3_special_block_list"] [:: std :: mem :: align_of :: < s3_special_block_list > () - 8usize] ; ["Offset of field: s3_special_block_list::allocator"] [:: std :: mem :: offset_of ! (s3_special_block_list , allocator) - 0usize] ; ["Offset of field: s3_special_block_list::buffer_size"] [:: std :: mem :: offset_of ! (s3_special_block_list , buffer_size) - 8usize] ; ["Offset of field: s3_special_block_list::blocks"] [:: std :: mem :: offset_of ! (s3_special_block_list , blocks) - 16usize] ; } ; impl Default for s3_special_block_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 () } } } # [repr (C)] pub struct aws_s3_default_buffer_pool { pub base_allocator : * mut aws_allocator , pub mutex : aws_mutex , pub block_size : usize , pub chunk_size : usize , pub primary_size_cutoff : usize , pub mem_limit : usize , pub primary_allocated : usize , pub primary_reserved : usize , pub primary_used : usize , pub special_blocks_allocated : usize , pub special_blocks_reserved : usize , pub special_blocks_used : usize , pub secondary_reserved : usize , pub secondary_used : usize , pub forced_used : usize , pub blocks : aws_array_list , pub pending_reserves : aws_linked_list , pub special_blocks : aws_hash_table , pub force_keeping_special_blocks : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_default_buffer_pool"] [:: std :: mem :: size_of :: < aws_s3_default_buffer_pool > () - 248usize] ; ["Alignment of aws_s3_default_buffer_pool"] [:: std :: mem :: align_of :: < aws_s3_default_buffer_pool > () - 8usize] ; ["Offset of field: aws_s3_default_buffer_pool::base_allocator"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , base_allocator) - 0usize] ; ["Offset of field: aws_s3_default_buffer_pool::mutex"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , mutex) - 8usize] ; ["Offset of field: aws_s3_default_buffer_pool::block_size"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , block_size) - 56usize] ; ["Offset of field: aws_s3_default_buffer_pool::chunk_size"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , chunk_size) - 64usize] ; ["Offset of field: aws_s3_default_buffer_pool::primary_size_cutoff"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , primary_size_cutoff) - 72usize] ; ["Offset of field: aws_s3_default_buffer_pool::mem_limit"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , mem_limit) - 80usize] ; ["Offset of field: aws_s3_default_buffer_pool::primary_allocated"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , primary_allocated) - 88usize] ; ["Offset of field: aws_s3_default_buffer_pool::primary_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , primary_reserved) - 96usize] ; ["Offset of field: aws_s3_default_buffer_pool::primary_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , primary_used) - 104usize] ; ["Offset of field: aws_s3_default_buffer_pool::special_blocks_allocated"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , special_blocks_allocated) - 112usize] ; ["Offset of field: aws_s3_default_buffer_pool::special_blocks_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , special_blocks_reserved) - 120usize] ; ["Offset of field: aws_s3_default_buffer_pool::special_blocks_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , special_blocks_used) - 128usize] ; ["Offset of field: aws_s3_default_buffer_pool::secondary_reserved"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , secondary_reserved) - 136usize] ; ["Offset of field: aws_s3_default_buffer_pool::secondary_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , secondary_used) - 144usize] ; ["Offset of field: aws_s3_default_buffer_pool::forced_used"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , forced_used) - 152usize] ; ["Offset of field: aws_s3_default_buffer_pool::blocks"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , blocks) - 160usize] ; ["Offset of field: aws_s3_default_buffer_pool::pending_reserves"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , pending_reserves) - 200usize] ; ["Offset of field: aws_s3_default_buffer_pool::special_blocks"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , special_blocks) - 232usize] ; ["Offset of field: aws_s3_default_buffer_pool::force_keeping_special_blocks"] [:: std :: mem :: offset_of ! (aws_s3_default_buffer_pool , force_keeping_special_blocks) - 240usize] ; } ; impl Default for aws_s3_default_buffer_pool { 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)] pub struct s3_pending_reserve { pub node : aws_linked_list_node , pub ticket_future : * mut aws_future_s3_buffer_ticket , pub ticket : * mut aws_s3_default_buffer_ticket , pub meta : aws_s3_buffer_pool_reserve_meta , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of s3_pending_reserve"] [:: std :: mem :: size_of :: < s3_pending_reserve > () - 64usize] ; ["Alignment of s3_pending_reserve"] [:: std :: mem :: align_of :: < s3_pending_reserve > () - 8usize] ; ["Offset of field: s3_pending_reserve::node"] [:: std :: mem :: offset_of ! (s3_pending_reserve , node) - 0usize] ; ["Offset of field: s3_pending_reserve::ticket_future"] [:: std :: mem :: offset_of ! (s3_pending_reserve , ticket_future) - 16usize] ; ["Offset of field: s3_pending_reserve::ticket"] [:: std :: mem :: offset_of ! (s3_pending_reserve , ticket) - 24usize] ; ["Offset of field: s3_pending_reserve::meta"] [:: std :: mem :: offset_of ! (s3_pending_reserve , meta) - 32usize] ; } ; impl Default for s3_pending_reserve { 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)] pub struct s3_buffer_pool_block { pub block_size : usize , pub block_ptr : * mut u8 , pub alloc_bit_mask : u16 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of s3_buffer_pool_block"] [:: std :: mem :: size_of :: < s3_buffer_pool_block > () - 24usize] ; ["Alignment of s3_buffer_pool_block"] [:: std :: mem :: align_of :: < s3_buffer_pool_block > () - 8usize] ; ["Offset of field: s3_buffer_pool_block::block_size"] [:: std :: mem :: offset_of ! (s3_buffer_pool_block , block_size) - 0usize] ; ["Offset of field: s3_buffer_pool_block::block_ptr"] [:: std :: mem :: offset_of ! (s3_buffer_pool_block , block_ptr) - 8usize] ; ["Offset of field: s3_buffer_pool_block::alloc_bit_mask"] [:: std :: mem :: offset_of ! (s3_buffer_pool_block , alloc_bit_mask) - 16usize] ; } ; impl Default for s3_buffer_pool_block { 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 () } } } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_new (allocator : * mut aws_allocator , config : aws_s3_buffer_pool_config) -> * mut aws_s3_buffer_pool ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_destroy (buffer_pool : * mut aws_s3_buffer_pool) ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_reserve (buffer_pool : * mut aws_s3_buffer_pool , meta : aws_s3_buffer_pool_reserve_meta) -> * mut aws_future_s3_buffer_ticket ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_acquire_buffer (buffer_pool : * mut aws_s3_buffer_pool , ticket : * mut aws_s3_default_buffer_ticket) -> aws_byte_buf ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_get_usage (buffer_pool : * mut aws_s3_buffer_pool) -> aws_s3_default_buffer_pool_usage_stats ; } unsafe extern "C" { pub fn aws_s3_default_buffer_pool_trim (buffer_pool : * mut aws_s3_buffer_pool) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_signable { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_signing_result { _unused : [u8 ; 0] , } # [doc = " Gets called by the signing function when the signing is complete.\n\n Note that result will be destroyed after this function returns, so either copy it,\n or do all necessary adjustments inside the callback.\n\n When performing event or chunk signing, you will need to copy out the signature value in order\n to correctly configure the signable that wraps the event or chunk you want signed next.  The signature is\n found in the \"signature\" property on the signing result.  This value must be added as the\n \"previous-signature\" property on the next signable."] pub type aws_signing_complete_fn = :: std :: option :: Option < unsafe extern "C" fn (result : * mut aws_signing_result , error_code : :: libc :: c_int , userdata : * mut :: libc :: c_void) > ; unsafe extern "C" { # [doc = " (Asynchronous) entry point to sign something (a request, a chunk, an event) with an AWS signing process.\n Depending on the configuration, the signing process may or may not complete synchronously.\n\n @param allocator memory allocator to use throughout the signing process\n @param signable the thing to be signed.  See signable.h for common constructors for signables that\n wrap different types.\n @param base_config pointer to a signing configuration, currently this must be of type aws_signing_config_aws\n @param on_complete completion callback to be invoked when signing has finished\n @param user_data opaque user data that will be passed to the completion callback\n\n @return AWS_OP_SUCCESS if the signing attempt was *initiated* successfully, AWS_OP_ERR otherwise"] pub fn aws_sign_request_aws (allocator : * mut aws_allocator , signable : * const aws_signable , base_config : * const aws_signing_config_base , on_complete : aws_signing_complete_fn , userdata : * mut :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Test-only API used for cross-library signing verification tests\n\n Verifies:\n  (1) The canonical request generated during sigv4a signing of the request matches what is passed in\n  (2) The signature passed in is a valid ECDSA signature of the hashed string-to-sign derived from the\n  canonical request\n\n  @param allocator memory allocator to use throughout the signing verification process\n  @param signable the thing to be signed.  See signable.h for common constructors for signables that\n wrap different types.\n  @param base_config pointer to a signing configuration, currently this must be of type aws_signing_config_aws\n  @param expected_canonical_request_cursor expected result when building the canonical request\n  @param signature_cursor the actual signature computed from a previous signing of the signable\n  @param ecc_key_pub_x the x coordinate of the public part of the ecc key to verify the signature\n  @param ecc_key_pub_y the y coordinate of the public part of the ecc key to verify the signature\n\n  @return AWS_OP_SUCCESS if the signing attempt was *initiated* successfully, AWS_OP_ERR otherwise"] pub fn aws_verify_sigv4a_signing (allocator : * mut aws_allocator , signable : * const aws_signable , base_config : * const aws_signing_config_base , expected_canonical_request_cursor : aws_byte_cursor , signature_cursor : aws_byte_cursor , ecc_key_pub_x : aws_byte_cursor , ecc_key_pub_y : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Another helper function to check a computed sigv4a signature."] pub fn aws_validate_v4a_authorization_value (allocator : * mut aws_allocator , ecc_key : * mut aws_ecc_key_pair , string_to_sign_cursor : aws_byte_cursor , signature_value_cursor : aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Removes any padding added to the end of a sigv4a signature.  Signature must be hex-encoded.\n @param signature signature to remove padding from\n @return cursor that ranges over only the valid hex encoding of the sigv4a signature"] pub fn aws_trim_padded_sigv4a_signature (signature : aws_byte_cursor) -> aws_byte_cursor ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_upload_request_checksum_context { _unused : [u8 ; 0] , } unsafe extern "C" { pub static s_checksum_algo_priority_list : [aws_s3_checksum_algorithm ; 5usize] ; } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_checksum_vtable { pub destroy : :: std :: option :: Option < unsafe extern "C" fn (checksum : * mut aws_s3_checksum) > , pub update : :: std :: option :: Option < unsafe extern "C" fn (checksum : * mut aws_s3_checksum , buf : * const aws_byte_cursor) -> :: libc :: c_int > , pub finalize : :: std :: option :: Option < unsafe extern "C" fn (checksum : * mut aws_s3_checksum , out : * mut aws_byte_buf) -> :: libc :: c_int > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_checksum_vtable"] [:: std :: mem :: size_of :: < aws_checksum_vtable > () - 24usize] ; ["Alignment of aws_checksum_vtable"] [:: std :: mem :: align_of :: < aws_checksum_vtable > () - 8usize] ; ["Offset of field: aws_checksum_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_checksum_vtable , destroy) - 0usize] ; ["Offset of field: aws_checksum_vtable::update"] [:: std :: mem :: offset_of ! (aws_checksum_vtable , update) - 8usize] ; ["Offset of field: aws_checksum_vtable::finalize"] [:: std :: mem :: offset_of ! (aws_checksum_vtable , finalize) - 16usize] ; } ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_s3_checksum { pub allocator : * mut aws_allocator , pub vtable : * mut aws_checksum_vtable , pub digest_size : usize , pub algorithm : aws_s3_checksum_algorithm , pub good : bool , pub impl_ : aws_s3_checksum__bindgen_ty_1 , } # [repr (C)] # [derive (Copy , Clone)] pub union aws_s3_checksum__bindgen_ty_1 { pub hash : * mut aws_hash , pub crc_val_32bit : u32 , pub crc_val_64bit : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_checksum__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_checksum__bindgen_ty_1 > () - 8usize] ; ["Alignment of aws_s3_checksum__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_checksum__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_checksum__bindgen_ty_1::hash"] [:: std :: mem :: offset_of ! (aws_s3_checksum__bindgen_ty_1 , hash) - 0usize] ; ["Offset of field: aws_s3_checksum__bindgen_ty_1::crc_val_32bit"] [:: std :: mem :: offset_of ! (aws_s3_checksum__bindgen_ty_1 , crc_val_32bit) - 0usize] ; ["Offset of field: aws_s3_checksum__bindgen_ty_1::crc_val_64bit"] [:: std :: mem :: offset_of ! (aws_s3_checksum__bindgen_ty_1 , crc_val_64bit) - 0usize] ; } ; impl Default for aws_s3_checksum__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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_checksum"] [:: std :: mem :: size_of :: < aws_s3_checksum > () - 40usize] ; ["Alignment of aws_s3_checksum"] [:: std :: mem :: align_of :: < aws_s3_checksum > () - 8usize] ; ["Offset of field: aws_s3_checksum::allocator"] [:: std :: mem :: offset_of ! (aws_s3_checksum , allocator) - 0usize] ; ["Offset of field: aws_s3_checksum::vtable"] [:: std :: mem :: offset_of ! (aws_s3_checksum , vtable) - 8usize] ; ["Offset of field: aws_s3_checksum::digest_size"] [:: std :: mem :: offset_of ! (aws_s3_checksum , digest_size) - 16usize] ; ["Offset of field: aws_s3_checksum::algorithm"] [:: std :: mem :: offset_of ! (aws_s3_checksum , algorithm) - 24usize] ; ["Offset of field: aws_s3_checksum::good"] [:: std :: mem :: offset_of ! (aws_s3_checksum , good) - 28usize] ; ["Offset of field: aws_s3_checksum::impl_"] [:: std :: mem :: offset_of ! (aws_s3_checksum , impl_) - 32usize] ; } ; impl Default for aws_s3_checksum { 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)] pub struct aws_s3_meta_request_checksum_config_storage { pub allocator : * mut aws_allocator , pub full_object_checksum : aws_byte_buf , pub has_full_object_checksum : bool , pub full_object_checksum_callback : aws_s3_meta_request_full_object_checksum_fn , pub user_data : * mut :: libc :: c_void , pub location : aws_s3_checksum_location , pub checksum_algorithm : aws_s3_checksum_algorithm , pub validate_response_checksum : bool , pub response_checksum_algorithms : aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 { pub crc64nvme : bool , pub crc32c : bool , pub crc32 : bool , pub sha1 : bool , pub sha256 : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_checksum_config_storage__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 > () - 5usize] ; ["Alignment of aws_s3_meta_request_checksum_config_storage__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 > () - 1usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::crc64nvme"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , crc64nvme) - 0usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::crc32c"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , crc32c) - 1usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::crc32"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , crc32) - 2usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::sha1"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , sha1) - 3usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage__bindgen_ty_1::sha256"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage__bindgen_ty_1 , sha256) - 4usize] ; } ; # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_checksum_config_storage"] [:: std :: mem :: size_of :: < aws_s3_meta_request_checksum_config_storage > () - 80usize] ; ["Alignment of aws_s3_meta_request_checksum_config_storage"] [:: std :: mem :: align_of :: < aws_s3_meta_request_checksum_config_storage > () - 8usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::allocator"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , allocator) - 0usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::full_object_checksum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , full_object_checksum) - 8usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::has_full_object_checksum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , has_full_object_checksum) - 40usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::full_object_checksum_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , full_object_checksum_callback) - 48usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::user_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , user_data) - 56usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::location"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , location) - 64usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::checksum_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , checksum_algorithm) - 68usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::validate_response_checksum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , validate_response_checksum) - 72usize] ; ["Offset of field: aws_s3_meta_request_checksum_config_storage::response_checksum_algorithms"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_checksum_config_storage , response_checksum_algorithms) - 73usize] ; } ; impl Default for aws_s3_meta_request_checksum_config_storage { 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 () } } } unsafe extern "C" { # [doc = " Helper stream that takes in a stream and the checksum context to help finalize the checksum from the underlying\n stream.\n The context will be only finalized when the checksum stream has read to the end of stream.\n\n Note: seek this stream will immediately fail, as it would prevent an accurate calculation of the\n checksum.\n\n @param allocator\n @param existing_stream The real content to read from. Destroying the checksum stream destroys the existing stream.\n                        outputs the checksum of existing stream to checksum_output upon destruction. Will be kept\n                        alive by the checksum stream\n @param context         Checksum context to keep and get checksum requirements from."] pub fn aws_checksum_stream_new_with_context (allocator : * mut aws_allocator , existing_stream : * mut aws_input_stream , context : * mut aws_s3_upload_request_checksum_context) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Helper stream that takes in a stream to keep track of the checksum of the underlying stream during read.\n Invoke `aws_checksum_stream_finalize_checksum` to get the checksum of the data has been read so far.\n\n Note: seek this stream will immediately fail, as it would prevent an accurate calculation of the\n checksum.\n\n @param allocator\n @param existing_stream The real content to read from. Destroying the checksum stream destroys the existing stream.\n                        outputs the checksum of existing stream to checksum_output upon destruction. Will be kept\n                        alive by the checksum stream\n @param algorithm       Checksum algorithm to use."] pub fn aws_checksum_stream_new (allocator : * mut aws_allocator , existing_stream : * mut aws_input_stream , algorithm : aws_s3_checksum_algorithm) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Finalize the checksum has read so far to the output checksum buf with base64 encoding.\n Not thread safe."] pub fn aws_checksum_stream_finalize_checksum (checksum_stream : * mut aws_input_stream , checksum_buf : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " TODO: properly support chunked encoding.\n Creates a chunked encoding stream that wraps an existing stream and adds checksum trailers.\n\n This function creates a stream that:\n 1. Encodes the input stream wraps the existing_stream with aws-chunked encoded.\n 2. Calculates a checksum of the stream content (if not already calculated)\n 3. Appends the checksum as a trailer at the end of the aws-chunked stream\n\n Note: This stream does not support seeking operations, as seeking would prevent\n accurate checksum calculation and corrupt the chunked encoding format.\n\n @param allocator         Memory allocator to use for stream creation and internal buffers\n @param existing_stream   The input stream to be chunked and checksummed. This stream\n                          will be acquired by the chunk stream and released when the\n                          chunk stream is destroyed. Must not be NULL.\n @param checksum_context  Context containing checksum configuration and state. Must not be NULL.\n                          The context contains:\n                          - algorithm: The checksum algorithm to use (CRC32, CRC32C, etc.)\n                          - base64_checksum: Buffer for the calculated checksum result\n                          - checksum_calculated: Whether checksum is pre-calculated or needs calculation\n                          - encoded_checksum_size: Expected size of the base64-encoded checksum\n\n                          If checksum_calculated is false, the stream will wrap existing_stream\n                          with a checksum stream to calculate the checksum during reading.\n                          If checksum_calculated is true, the existing checksum value will be used.\n\n @return A new input stream that provides chunked encoding with checksum trailers,\n         or NULL if creation fails. The returned stream must be released with\n         aws_input_stream_release() when no longer needed.\n\n @note The total length of the returned stream includes:\n       - Chunk size header (hex representation + \\r\\n)\n       - Original stream content\n       - Final chunk marker (0\\r\\n or \\r\\n0\\r\\n)\n       - Checksum trailer (header name + : + base64 checksum + \\r\\n\\r\\n)"] pub fn aws_chunk_stream_new (allocator : * mut aws_allocator , existing_stream : * mut aws_input_stream , context : * mut aws_s3_upload_request_checksum_context) -> * mut aws_input_stream ; } unsafe extern "C" { # [doc = " Get the size of the checksum output corresponding to the aws_s3_checksum_algorithm enum value."] pub fn aws_get_digest_size_from_checksum_algorithm (algorithm : aws_s3_checksum_algorithm) -> usize ; } unsafe extern "C" { # [doc = " Get header name to use for algorithm (e.g. \"x-amz-checksum-crc32\")"] pub fn aws_get_http_header_name_from_checksum_algorithm (algorithm : aws_s3_checksum_algorithm) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get algorithm's name (e.g. \"CRC32\"), to be used as the value of headers like `x-amz-checksum-algorithm`"] pub fn aws_get_checksum_algorithm_name (algorithm : aws_s3_checksum_algorithm) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " Get the name of checksum algorithm to be used as the details of the parts were uploaded. Referring to\n https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompletedPart.html#AmazonS3-Type-CompletedPart"] pub fn aws_get_completed_part_name_from_checksum_algorithm (algorithm : aws_s3_checksum_algorithm) -> aws_byte_cursor ; } unsafe extern "C" { # [doc = " create a new aws_checksum corresponding to the aws_s3_checksum_algorithm enum value."] pub fn aws_checksum_new (allocator : * mut aws_allocator , algorithm : aws_s3_checksum_algorithm) -> * mut aws_s3_checksum ; } unsafe extern "C" { # [doc = " Compute an aws_checksum corresponding to the provided enum, passing a function pointer around instead of using a\n conditional would be faster, but would be a negligible improvement compared to the cost of processing data twice\n which would be the only time this function would be used, and would be harder to follow."] pub fn aws_checksum_compute (allocator : * mut aws_allocator , algorithm : aws_s3_checksum_algorithm , input : * const aws_byte_cursor , output : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Cleans up and deallocates checksum."] pub fn aws_checksum_destroy (checksum : * mut aws_s3_checksum) ; } unsafe extern "C" { # [doc = " Updates the running checksum with to_checksum. this can be called multiple times."] pub fn aws_checksum_update (checksum : * mut aws_s3_checksum , to_checksum : * const aws_byte_cursor) -> :: libc :: c_int ; } unsafe extern "C" { # [doc = " Completes the checksum computation and writes the final digest to output.\n Allocation of output is the caller's responsibility."] pub fn aws_checksum_finalize (checksum : * mut aws_s3_checksum , output : * mut aws_byte_buf) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_meta_request_checksum_config_storage_init (allocator : * mut aws_allocator , internal_config : * mut aws_s3_meta_request_checksum_config_storage , config : * const aws_s3_checksum_config , message : * const aws_http_message , log_id : * const :: libc :: c_void) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_meta_request_checksum_config_storage_cleanup (internal_config : * mut aws_s3_meta_request_checksum_config_storage) ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_request_flags { AWS_S3_REQUEST_FLAG_RECORD_RESPONSE_HEADERS = 1 , AWS_S3_REQUEST_FLAG_ALWAYS_SEND = 2 , AWS_S3_REQUEST_FLAG_ALLOCATE_BUFFER_FROM_POOL = 4 , } # [doc = " Information sent in the telemetry_callback after each aws_s3_request finished/retried from meta request."] # [repr (C)] pub struct aws_s3_request_metrics { pub allocator : * mut aws_allocator , pub time_metrics : aws_s3_request_metrics__bindgen_ty_1 , pub req_resp_info_metrics : aws_s3_request_metrics__bindgen_ty_2 , pub crt_info_metrics : aws_s3_request_metrics__bindgen_ty_3 , pub part_info_metrics : aws_s3_request_metrics__bindgen_ty_4 , pub ref_count : aws_ref_count , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_request_metrics__bindgen_ty_1 { pub s3_request_first_attempt_start_timestamp_ns : i64 , pub s3_request_last_attempt_end_timestamp_ns : i64 , pub s3_request_total_duration_ns : i64 , pub start_timestamp_ns : i64 , pub end_timestamp_ns : i64 , pub total_duration_ns : i64 , pub send_start_timestamp_ns : i64 , pub send_end_timestamp_ns : i64 , pub sending_duration_ns : i64 , pub receive_start_timestamp_ns : i64 , pub receive_end_timestamp_ns : i64 , pub receiving_duration_ns : i64 , pub sign_start_timestamp_ns : i64 , pub sign_end_timestamp_ns : i64 , pub signing_duration_ns : i64 , pub mem_acquire_start_timestamp_ns : i64 , pub mem_acquire_end_timestamp_ns : i64 , pub mem_acquire_duration_ns : i64 , pub deliver_start_timestamp_ns : i64 , pub deliver_end_timestamp_ns : i64 , pub deliver_duration_ns : i64 , pub conn_acquire_start_timestamp_ns : i64 , pub conn_acquire_end_timestamp_ns : i64 , pub conn_acquire_duration_ns : i64 , pub retry_delay_start_timestamp_ns : i64 , pub retry_delay_end_timestamp_ns : i64 , pub retry_delay_duration_ns : i64 , pub service_call_duration_ns : i64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_request_metrics__bindgen_ty_1 > () - 224usize] ; ["Alignment of aws_s3_request_metrics__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_request_metrics__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::s3_request_first_attempt_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , s3_request_first_attempt_start_timestamp_ns) - 0usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::s3_request_last_attempt_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , s3_request_last_attempt_end_timestamp_ns) - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::s3_request_total_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , s3_request_total_duration_ns) - 16usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , start_timestamp_ns) - 24usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , end_timestamp_ns) - 32usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::total_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , total_duration_ns) - 40usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::send_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , send_start_timestamp_ns) - 48usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::send_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , send_end_timestamp_ns) - 56usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::sending_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , sending_duration_ns) - 64usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::receive_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , receive_start_timestamp_ns) - 72usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::receive_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , receive_end_timestamp_ns) - 80usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::receiving_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , receiving_duration_ns) - 88usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::sign_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , sign_start_timestamp_ns) - 96usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::sign_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , sign_end_timestamp_ns) - 104usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::signing_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , signing_duration_ns) - 112usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::mem_acquire_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , mem_acquire_start_timestamp_ns) - 120usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::mem_acquire_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , mem_acquire_end_timestamp_ns) - 128usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::mem_acquire_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , mem_acquire_duration_ns) - 136usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::deliver_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , deliver_start_timestamp_ns) - 144usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::deliver_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , deliver_end_timestamp_ns) - 152usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::deliver_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , deliver_duration_ns) - 160usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::conn_acquire_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , conn_acquire_start_timestamp_ns) - 168usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::conn_acquire_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , conn_acquire_end_timestamp_ns) - 176usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::conn_acquire_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , conn_acquire_duration_ns) - 184usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::retry_delay_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , retry_delay_start_timestamp_ns) - 192usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::retry_delay_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , retry_delay_end_timestamp_ns) - 200usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::retry_delay_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , retry_delay_duration_ns) - 208usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_1::service_call_duration_ns"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_1 , service_call_duration_ns) - 216usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_request_metrics__bindgen_ty_2 { pub response_status : :: libc :: c_int , pub response_headers : * mut aws_http_headers , pub request_path_query : * mut aws_string , pub host_address : * mut aws_string , pub request_id : * mut aws_string , pub extended_request_id : * mut aws_string , pub operation_name : * mut aws_string , pub request_type : aws_s3_request_type , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_request_metrics__bindgen_ty_2 > () - 64usize] ; ["Alignment of aws_s3_request_metrics__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_request_metrics__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::response_status"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , response_status) - 0usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::response_headers"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , response_headers) - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::request_path_query"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , request_path_query) - 16usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::host_address"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , host_address) - 24usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::request_id"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , request_id) - 32usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::extended_request_id"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , extended_request_id) - 40usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::operation_name"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , operation_name) - 48usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_2::request_type"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_2 , request_type) - 56usize] ; } ; impl Default for aws_s3_request_metrics__bindgen_ty_2 { 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)] pub struct aws_s3_request_metrics__bindgen_ty_3 { pub ip_address : * mut aws_string , pub connection_ptr : * mut :: libc :: c_void , pub request_ptr : * mut :: libc :: c_void , pub thread_id : aws_thread_id_t , pub stream_id : u32 , pub error_code : :: libc :: c_int , pub retry_attempt : u32 , pub memory_allocated_from_pool : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_request_metrics__bindgen_ty_3 > () - 48usize] ; ["Alignment of aws_s3_request_metrics__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_request_metrics__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::ip_address"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , ip_address) - 0usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::connection_ptr"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , connection_ptr) - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::request_ptr"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , request_ptr) - 16usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::thread_id"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , thread_id) - 24usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::stream_id"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , stream_id) - 32usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::error_code"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , error_code) - 36usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::retry_attempt"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , retry_attempt) - 40usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_3::memory_allocated_from_pool"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_3 , memory_allocated_from_pool) - 44usize] ; } ; impl Default for aws_s3_request_metrics__bindgen_ty_3 { 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)] pub struct aws_s3_request_metrics__bindgen_ty_4 { pub part_range_start : u64 , pub part_range_end : u64 , pub part_number : u32 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics__bindgen_ty_4"] [:: std :: mem :: size_of :: < aws_s3_request_metrics__bindgen_ty_4 > () - 24usize] ; ["Alignment of aws_s3_request_metrics__bindgen_ty_4"] [:: std :: mem :: align_of :: < aws_s3_request_metrics__bindgen_ty_4 > () - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_4::part_range_start"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_4 , part_range_start) - 0usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_4::part_range_end"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_4 , part_range_end) - 8usize] ; ["Offset of field: aws_s3_request_metrics__bindgen_ty_4::part_number"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics__bindgen_ty_4 , part_number) - 16usize] ; } ; # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request_metrics"] [:: std :: mem :: size_of :: < aws_s3_request_metrics > () - 392usize] ; ["Alignment of aws_s3_request_metrics"] [:: std :: mem :: align_of :: < aws_s3_request_metrics > () - 8usize] ; ["Offset of field: aws_s3_request_metrics::allocator"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , allocator) - 0usize] ; ["Offset of field: aws_s3_request_metrics::time_metrics"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , time_metrics) - 8usize] ; ["Offset of field: aws_s3_request_metrics::req_resp_info_metrics"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , req_resp_info_metrics) - 232usize] ; ["Offset of field: aws_s3_request_metrics::crt_info_metrics"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , crt_info_metrics) - 296usize] ; ["Offset of field: aws_s3_request_metrics::part_info_metrics"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , part_info_metrics) - 344usize] ; ["Offset of field: aws_s3_request_metrics::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_request_metrics , ref_count) - 368usize] ; } ; impl Default for aws_s3_request_metrics { 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)] pub struct aws_s3_request { pub node : aws_linked_list_node , pub retry_start_timestamp_ns : i64 , pub retry_end_timestamp_ns : i64 , pub cancellable_http_streams_list_node : aws_linked_list_node , pub pending_buffer_future_list_node : aws_linked_list_node , pub synced_data : aws_s3_request__bindgen_ty_1 , pub ref_count : aws_ref_count , pub allocator : * mut aws_allocator , pub meta_request : * mut aws_s3_meta_request , pub buffer_size : usize , pub request_body : aws_byte_buf , pub fio_streaming : bool , pub request_body_stream : * mut aws_input_stream , pub content_length : u64 , # [doc = " Ticket to acquire the buffer."] pub ticket : * mut aws_s3_buffer_ticket , pub part_range_start : u64 , pub part_range_end : u64 , pub part_number : u32 , pub upload_timeout_ms : usize , pub num_times_prepared : u32 , pub request_level_response_header_checksum : aws_byte_buf , pub request_level_running_response_sum : * mut aws_s3_checksum , pub validation_algorithm : aws_s3_checksum_algorithm , pub did_validate : bool , pub checksum_match : bool , pub request_tag : :: libc :: c_int , pub request_type : aws_s3_request_type , pub operation_name : * mut aws_string , pub send_data : aws_s3_request__bindgen_ty_2 , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub __bindgen_padding_0 : [u8 ; 7usize] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_request__bindgen_ty_1 { pub cancellable_http_stream : * mut aws_http_stream , pub buffer_future : * mut aws_future_s3_buffer_ticket , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_request__bindgen_ty_1 > () - 16usize] ; ["Alignment of aws_s3_request__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_request__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_request__bindgen_ty_1::cancellable_http_stream"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_1 , cancellable_http_stream) - 0usize] ; ["Offset of field: aws_s3_request__bindgen_ty_1::buffer_future"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_1 , buffer_future) - 8usize] ; } ; impl Default for aws_s3_request__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 () } } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_request__bindgen_ty_2 { pub message : * mut aws_http_message , pub signable : * mut aws_signable , pub response_headers : * mut aws_http_headers , pub response_body : aws_byte_buf , pub response_status : :: libc :: c_int , pub request_id : * mut aws_string , pub amz_id_2 : * mut aws_string , pub metrics : * mut aws_s3_request_metrics , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub __bindgen_padding_0 : [u8 ; 7usize] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_request__bindgen_ty_2 > () - 96usize] ; ["Alignment of aws_s3_request__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_request__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::message"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , message) - 0usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::signable"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , signable) - 8usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::response_headers"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , response_headers) - 16usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::response_body"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , response_body) - 24usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::response_status"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , response_status) - 56usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::request_id"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , request_id) - 64usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::amz_id_2"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , amz_id_2) - 72usize] ; ["Offset of field: aws_s3_request__bindgen_ty_2::metrics"] [:: std :: mem :: offset_of ! (aws_s3_request__bindgen_ty_2 , metrics) - 80usize] ; } ; impl Default for aws_s3_request__bindgen_ty_2 { 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 () } } } impl aws_s3_request__bindgen_ty_2 { # [inline] pub fn require_streaming_unsigned_payload_header (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_require_streaming_unsigned_payload_header (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn require_streaming_unsigned_payload_header_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_require_streaming_unsigned_payload_header_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (require_streaming_unsigned_payload_header : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let require_streaming_unsigned_payload_header : u32 = unsafe { :: std :: mem :: transmute (require_streaming_unsigned_payload_header) } ; require_streaming_unsigned_payload_header as u64 }) ; __bindgen_bitfield_unit } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_request"] [:: std :: mem :: size_of :: < aws_s3_request > () - 400usize] ; ["Alignment of aws_s3_request"] [:: std :: mem :: align_of :: < aws_s3_request > () - 8usize] ; ["Offset of field: aws_s3_request::node"] [:: std :: mem :: offset_of ! (aws_s3_request , node) - 0usize] ; ["Offset of field: aws_s3_request::retry_start_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request , retry_start_timestamp_ns) - 16usize] ; ["Offset of field: aws_s3_request::retry_end_timestamp_ns"] [:: std :: mem :: offset_of ! (aws_s3_request , retry_end_timestamp_ns) - 24usize] ; ["Offset of field: aws_s3_request::cancellable_http_streams_list_node"] [:: std :: mem :: offset_of ! (aws_s3_request , cancellable_http_streams_list_node) - 32usize] ; ["Offset of field: aws_s3_request::pending_buffer_future_list_node"] [:: std :: mem :: offset_of ! (aws_s3_request , pending_buffer_future_list_node) - 48usize] ; ["Offset of field: aws_s3_request::synced_data"] [:: std :: mem :: offset_of ! (aws_s3_request , synced_data) - 64usize] ; ["Offset of field: aws_s3_request::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_request , ref_count) - 80usize] ; ["Offset of field: aws_s3_request::allocator"] [:: std :: mem :: offset_of ! (aws_s3_request , allocator) - 104usize] ; ["Offset of field: aws_s3_request::meta_request"] [:: std :: mem :: offset_of ! (aws_s3_request , meta_request) - 112usize] ; ["Offset of field: aws_s3_request::buffer_size"] [:: std :: mem :: offset_of ! (aws_s3_request , buffer_size) - 120usize] ; ["Offset of field: aws_s3_request::request_body"] [:: std :: mem :: offset_of ! (aws_s3_request , request_body) - 128usize] ; ["Offset of field: aws_s3_request::fio_streaming"] [:: std :: mem :: offset_of ! (aws_s3_request , fio_streaming) - 160usize] ; ["Offset of field: aws_s3_request::request_body_stream"] [:: std :: mem :: offset_of ! (aws_s3_request , request_body_stream) - 168usize] ; ["Offset of field: aws_s3_request::content_length"] [:: std :: mem :: offset_of ! (aws_s3_request , content_length) - 176usize] ; ["Offset of field: aws_s3_request::ticket"] [:: std :: mem :: offset_of ! (aws_s3_request , ticket) - 184usize] ; ["Offset of field: aws_s3_request::part_range_start"] [:: std :: mem :: offset_of ! (aws_s3_request , part_range_start) - 192usize] ; ["Offset of field: aws_s3_request::part_range_end"] [:: std :: mem :: offset_of ! (aws_s3_request , part_range_end) - 200usize] ; ["Offset of field: aws_s3_request::part_number"] [:: std :: mem :: offset_of ! (aws_s3_request , part_number) - 208usize] ; ["Offset of field: aws_s3_request::upload_timeout_ms"] [:: std :: mem :: offset_of ! (aws_s3_request , upload_timeout_ms) - 216usize] ; ["Offset of field: aws_s3_request::num_times_prepared"] [:: std :: mem :: offset_of ! (aws_s3_request , num_times_prepared) - 224usize] ; ["Offset of field: aws_s3_request::request_level_response_header_checksum"] [:: std :: mem :: offset_of ! (aws_s3_request , request_level_response_header_checksum) - 232usize] ; ["Offset of field: aws_s3_request::request_level_running_response_sum"] [:: std :: mem :: offset_of ! (aws_s3_request , request_level_running_response_sum) - 264usize] ; ["Offset of field: aws_s3_request::validation_algorithm"] [:: std :: mem :: offset_of ! (aws_s3_request , validation_algorithm) - 272usize] ; ["Offset of field: aws_s3_request::did_validate"] [:: std :: mem :: offset_of ! (aws_s3_request , did_validate) - 276usize] ; ["Offset of field: aws_s3_request::checksum_match"] [:: std :: mem :: offset_of ! (aws_s3_request , checksum_match) - 277usize] ; ["Offset of field: aws_s3_request::request_tag"] [:: std :: mem :: offset_of ! (aws_s3_request , request_tag) - 280usize] ; ["Offset of field: aws_s3_request::request_type"] [:: std :: mem :: offset_of ! (aws_s3_request , request_type) - 284usize] ; ["Offset of field: aws_s3_request::operation_name"] [:: std :: mem :: offset_of ! (aws_s3_request , operation_name) - 288usize] ; ["Offset of field: aws_s3_request::send_data"] [:: std :: mem :: offset_of ! (aws_s3_request , send_data) - 296usize] ; } ; impl Default for aws_s3_request { 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 () } } } impl aws_s3_request { # [inline] pub fn record_response_headers (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_record_response_headers (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn record_response_headers_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_record_response_headers_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn should_allocate_buffer_from_pool (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_should_allocate_buffer_from_pool (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub unsafe fn should_allocate_buffer_from_pool_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 1usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_should_allocate_buffer_from_pool_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 1usize , 1u8 , val as u64 ,) } } # [inline] pub fn tracked_by_client (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_tracked_by_client (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub unsafe fn tracked_by_client_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 2usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_tracked_by_client_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 2usize , 1u8 , val as u64 ,) } } # [inline] pub fn always_send (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_always_send (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (3usize , 1u8 , val as u64) } } # [inline] pub unsafe fn always_send_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 3usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_always_send_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 3usize , 1u8 , val as u64 ,) } } # [inline] pub fn discovers_object_size (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (4usize , 1u8) as u32) } } # [inline] pub fn set_discovers_object_size (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (4usize , 1u8 , val as u64) } } # [inline] pub unsafe fn discovers_object_size_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 4usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_discovers_object_size_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 4usize , 1u8 , val as u64 ,) } } # [inline] pub fn is_noop (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (5usize , 1u8) as u32) } } # [inline] pub fn set_is_noop (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (5usize , 1u8 , val as u64) } } # [inline] pub unsafe fn is_noop_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 5usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_is_noop_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 5usize , 1u8 , val as u64 ,) } } # [inline] pub fn was_previously_uploaded (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 1u8) as u32) } } # [inline] pub fn set_was_previously_uploaded (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (6usize , 1u8 , val as u64) } } # [inline] pub unsafe fn was_previously_uploaded_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 6usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_was_previously_uploaded_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 6usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (record_response_headers : u32 , should_allocate_buffer_from_pool : u32 , tracked_by_client : u32 , always_send : u32 , discovers_object_size : u32 , is_noop : u32 , was_previously_uploaded : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let record_response_headers : u32 = unsafe { :: std :: mem :: transmute (record_response_headers) } ; record_response_headers as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let should_allocate_buffer_from_pool : u32 = unsafe { :: std :: mem :: transmute (should_allocate_buffer_from_pool) } ; should_allocate_buffer_from_pool as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let tracked_by_client : u32 = unsafe { :: std :: mem :: transmute (tracked_by_client) } ; tracked_by_client as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let always_send : u32 = unsafe { :: std :: mem :: transmute (always_send) } ; always_send as u64 }) ; __bindgen_bitfield_unit . set (4usize , 1u8 , { let discovers_object_size : u32 = unsafe { :: std :: mem :: transmute (discovers_object_size) } ; discovers_object_size as u64 }) ; __bindgen_bitfield_unit . set (5usize , 1u8 , { let is_noop : u32 = unsafe { :: std :: mem :: transmute (is_noop) } ; is_noop as u64 }) ; __bindgen_bitfield_unit . set (6usize , 1u8 , { let was_previously_uploaded : u32 = unsafe { :: std :: mem :: transmute (was_previously_uploaded) } ; was_previously_uploaded as u64 }) ; __bindgen_bitfield_unit } } unsafe extern "C" { pub fn aws_s3_request_new (meta_request : * mut aws_s3_meta_request , request_tag : :: libc :: c_int , request_type : aws_s3_request_type , part_number : u32 , flags : u32) -> * mut aws_s3_request ; } unsafe extern "C" { pub fn aws_s3_request_setup_send_data (request : * mut aws_s3_request , message : * mut aws_http_message) ; } unsafe extern "C" { pub fn aws_s3_request_clean_up_send_data (request : * mut aws_s3_request) ; } unsafe extern "C" { pub fn aws_s3_request_acquire (request : * mut aws_s3_request) -> * mut aws_s3_request ; } unsafe extern "C" { pub fn aws_s3_request_release (request : * mut aws_s3_request) -> * mut aws_s3_request ; } unsafe extern "C" { pub fn aws_s3_request_metrics_new (allocator : * mut aws_allocator) -> * mut aws_s3_request_metrics ; } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_state { AWS_S3_META_REQUEST_STATE_ACTIVE = 0 , AWS_S3_META_REQUEST_STATE_FINISHED = 1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_update_flags { AWS_S3_META_REQUEST_UPDATE_FLAG_CONSERVATIVE = 2 , } pub type aws_s3_meta_request_prepare_request_callback_fn = :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , error_code : :: libc :: c_int , user_data : * mut :: libc :: c_void) > ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_s3_prepare_request_payload { pub allocator : * mut aws_allocator , pub request : * mut aws_s3_request , pub task : aws_task , pub asyncstep_prepare_request : * mut aws_future_void , pub callback : aws_s3_meta_request_prepare_request_callback_fn , pub user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_prepare_request_payload"] [:: std :: mem :: size_of :: < aws_s3_prepare_request_payload > () - 104usize] ; ["Alignment of aws_s3_prepare_request_payload"] [:: std :: mem :: align_of :: < aws_s3_prepare_request_payload > () - 8usize] ; ["Offset of field: aws_s3_prepare_request_payload::allocator"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , allocator) - 0usize] ; ["Offset of field: aws_s3_prepare_request_payload::request"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , request) - 8usize] ; ["Offset of field: aws_s3_prepare_request_payload::task"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , task) - 16usize] ; ["Offset of field: aws_s3_prepare_request_payload::asyncstep_prepare_request"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , asyncstep_prepare_request) - 80usize] ; ["Offset of field: aws_s3_prepare_request_payload::callback"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , callback) - 88usize] ; ["Offset of field: aws_s3_prepare_request_payload::user_data"] [:: std :: mem :: offset_of ! (aws_s3_prepare_request_payload , user_data) - 96usize] ; } ; impl Default for aws_s3_prepare_request_payload { 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 (Copy , Clone)] pub struct aws_s3_meta_request_event { pub type_ : aws_s3_meta_request_event_aws_s3_meta_request_event_type , pub u : aws_s3_meta_request_event__bindgen_ty_1 , } # [repr (u32)] # [non_exhaustive] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum aws_s3_meta_request_event_aws_s3_meta_request_event_type { AWS_S3_META_REQUEST_EVENT_RESPONSE_BODY = 0 , AWS_S3_META_REQUEST_EVENT_PROGRESS = 1 , AWS_S3_META_REQUEST_EVENT_TELEMETRY = 2 , } # [repr (C)] # [derive (Copy , Clone)] pub union aws_s3_meta_request_event__bindgen_ty_1 { pub response_body : aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 , pub progress : aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 , pub telemetry : aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 { pub completed_request : * mut aws_s3_request , pub bytes_delivered : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 > () - 16usize] ; ["Alignment of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1::completed_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 , completed_request) - 0usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1::bytes_delivered"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_1 , bytes_delivered) - 8usize] ; } ; impl Default for aws_s3_meta_request_event__bindgen_ty_1__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 () } } } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 { pub info : aws_s3_meta_request_progress , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 > () - 16usize] ; ["Alignment of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2::info"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_2 , info) - 0usize] ; } ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 { pub metrics : * mut aws_s3_request_metrics , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 > () - 8usize] ; ["Alignment of aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3::metrics"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 , metrics) - 0usize] ; } ; impl Default for aws_s3_meta_request_event__bindgen_ty_1__bindgen_ty_3 { 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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event__bindgen_ty_1 > () - 16usize] ; ["Alignment of aws_s3_meta_request_event__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1::response_body"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1 , response_body) - 0usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1::progress"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1 , progress) - 0usize] ; ["Offset of field: aws_s3_meta_request_event__bindgen_ty_1::telemetry"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event__bindgen_ty_1 , telemetry) - 0usize] ; } ; impl Default for aws_s3_meta_request_event__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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_event"] [:: std :: mem :: size_of :: < aws_s3_meta_request_event > () - 24usize] ; ["Alignment of aws_s3_meta_request_event"] [:: std :: mem :: align_of :: < aws_s3_meta_request_event > () - 8usize] ; ["Offset of field: aws_s3_meta_request_event::type_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event , type_) - 0usize] ; ["Offset of field: aws_s3_meta_request_event::u"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_event , u) - 8usize] ; } ; impl Default for aws_s3_meta_request_event { 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)] pub struct aws_s3_meta_request_vtable { pub update : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , flags : u32 , out_request : * mut * mut aws_s3_request) -> bool > , pub schedule_prepare_request : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , callback : aws_s3_meta_request_prepare_request_callback_fn , user_data : * mut :: libc :: c_void) > , pub prepare_request : :: std :: option :: Option < unsafe extern "C" fn (request : * mut aws_s3_request) -> * mut aws_future_void > , pub init_signing_date_time : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , date_time : * mut aws_date_time) > , pub sign_request : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , on_signing_complete : aws_signing_complete_fn , user_data : * mut :: libc :: c_void) > , pub send_request_finish : :: std :: option :: Option < unsafe extern "C" fn (connection : * mut aws_s3_connection , stream : * mut aws_http_stream , error_code : :: libc :: c_int) > , pub finished_request : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , error_code : :: libc :: c_int) > , pub finish : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request) > , pub destroy : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut aws_s3_meta_request) > , pub pause : :: std :: option :: Option < unsafe extern "C" fn (meta_request : * mut aws_s3_meta_request , resume_token : * mut * mut aws_s3_meta_request_resume_token) -> :: libc :: c_int > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request_vtable"] [:: std :: mem :: size_of :: < aws_s3_meta_request_vtable > () - 80usize] ; ["Alignment of aws_s3_meta_request_vtable"] [:: std :: mem :: align_of :: < aws_s3_meta_request_vtable > () - 8usize] ; ["Offset of field: aws_s3_meta_request_vtable::update"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , update) - 0usize] ; ["Offset of field: aws_s3_meta_request_vtable::schedule_prepare_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , schedule_prepare_request) - 8usize] ; ["Offset of field: aws_s3_meta_request_vtable::prepare_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , prepare_request) - 16usize] ; ["Offset of field: aws_s3_meta_request_vtable::init_signing_date_time"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , init_signing_date_time) - 24usize] ; ["Offset of field: aws_s3_meta_request_vtable::sign_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , sign_request) - 32usize] ; ["Offset of field: aws_s3_meta_request_vtable::send_request_finish"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , send_request_finish) - 40usize] ; ["Offset of field: aws_s3_meta_request_vtable::finished_request"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , finished_request) - 48usize] ; ["Offset of field: aws_s3_meta_request_vtable::finish"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , finish) - 56usize] ; ["Offset of field: aws_s3_meta_request_vtable::destroy"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , destroy) - 64usize] ; ["Offset of field: aws_s3_meta_request_vtable::pause"] [:: std :: mem :: offset_of ! (aws_s3_meta_request_vtable , pause) - 72usize] ; } ; # [doc = " This represents one meta request, ie, one accelerated file transfer.  One S3 meta request can represent multiple S3\n requests."] # [repr (C)] pub struct aws_s3_meta_request { pub allocator : * mut aws_allocator , pub ref_count : aws_ref_count , pub impl_ : * mut :: libc :: c_void , pub vtable : * mut aws_s3_meta_request_vtable , pub initial_request_message : * mut aws_http_message , pub request_body_async_stream : * mut aws_async_input_stream , pub request_body_parallel_stream : * mut aws_parallel_input_stream , pub request_body_using_async_writes : bool , pub part_size : usize , pub max_active_connections_override : u32 , pub cached_signing_config : * mut aws_cached_signing_config_aws , pub client : * mut aws_s3_client , pub endpoint : * mut aws_s3_endpoint , pub num_requests_network : aws_atomic_var , pub io_event_loop : * mut aws_event_loop , pub user_data : * mut :: libc :: c_void , pub headers_callback : aws_s3_meta_request_headers_callback_fn , pub body_callback : aws_s3_meta_request_receive_body_callback_fn , pub body_callback_ex : aws_s3_meta_request_receive_body_callback_ex_fn , pub finish_callback : aws_s3_meta_request_finish_fn , pub shutdown_callback : aws_s3_meta_request_shutdown_fn , pub progress_callback : aws_s3_meta_request_progress_fn , pub telemetry_callback : aws_s3_meta_request_telemetry_fn , pub upload_review_callback : aws_s3_meta_request_upload_review_fn , pub type_ : aws_s3_meta_request_type , pub s3express_session_host : * mut aws_string , pub is_express : bool , pub buffer_pool_optimized : bool , pub num_request_being_prepared : aws_atomic_var , pub synced_data : aws_s3_meta_request__bindgen_ty_1 , pub client_process_work_threaded_data : aws_s3_meta_request__bindgen_ty_2 , pub io_threaded_data : aws_s3_meta_request__bindgen_ty_3 , pub should_compute_content_md5 : bool , pub checksum_config : aws_s3_meta_request_checksum_config_storage , pub meta_request_level_response_header_checksum : aws_byte_buf , pub meta_request_level_running_response_sum : * mut aws_s3_checksum , pub recv_file : * mut FILE , pub recv_filepath : * mut aws_string , pub recv_file_delete_on_failure : bool , pub fio_opts : aws_s3_file_io_options , } # [repr (C)] pub struct aws_s3_meta_request__bindgen_ty_1 { pub lock : aws_mutex , pub pending_body_streaming_requests : aws_priority_queue , pub state : aws_s3_meta_request_state , pub read_window_running_total : u64 , pub next_streaming_part : u32 , pub num_parts_delivery_sent : u32 , pub num_parts_delivery_completed : u32 , pub event_delivery_task : aws_task , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub event_delivery_array : aws_array_list , pub event_delivery_active : bool , pub finish_result : aws_s3_meta_request_result , pub _bitfield_align_2 : [u8 ; 0] , pub _bitfield_2 : __BindgenBitfieldUnit < [u8 ; 1usize] > , pub cancellable_http_streams_list : aws_linked_list , pub pending_buffer_futures : aws_linked_list , pub async_write : aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data { pub ready_to_send : bool , pub eof : bool , pub buffered_data : aws_byte_buf , pub buffered_data_ticket : * mut aws_s3_buffer_ticket , pub waker : aws_simple_completion_callback , pub waker_user_data : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data"] [:: std :: mem :: size_of :: < aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data > () - 64usize] ; ["Alignment of aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data"] [:: std :: mem :: align_of :: < aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data > () - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::ready_to_send"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , ready_to_send) - 0usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::eof"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , eof) - 1usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::buffered_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , buffered_data) - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::buffered_data_ticket"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , buffered_data_ticket) - 40usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::waker"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , waker) - 48usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data::waker_user_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_data , waker_user_data) - 56usize] ; } ; impl Default for aws_s3_meta_request__bindgen_ty_1_aws_s3_async_write_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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request__bindgen_ty_1"] [:: std :: mem :: size_of :: < aws_s3_meta_request__bindgen_ty_1 > () - 464usize] ; ["Alignment of aws_s3_meta_request__bindgen_ty_1"] [:: std :: mem :: align_of :: < aws_s3_meta_request__bindgen_ty_1 > () - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::lock"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , lock) - 0usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::pending_body_streaming_requests"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , pending_body_streaming_requests) - 48usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::state"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , state) - 136usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::read_window_running_total"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , read_window_running_total) - 144usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::next_streaming_part"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , next_streaming_part) - 152usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::num_parts_delivery_sent"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , num_parts_delivery_sent) - 156usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::num_parts_delivery_completed"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , num_parts_delivery_completed) - 160usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::event_delivery_task"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , event_delivery_task) - 168usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::event_delivery_array"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , event_delivery_array) - 240usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::event_delivery_active"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , event_delivery_active) - 280usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::finish_result"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , finish_result) - 288usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::cancellable_http_streams_list"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , cancellable_http_streams_list) - 336usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::pending_buffer_futures"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , pending_buffer_futures) - 368usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_1::async_write"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_1 , async_write) - 400usize] ; } ; impl Default for aws_s3_meta_request__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 () } } } impl aws_s3_meta_request__bindgen_ty_1 { # [inline] pub fn event_delivery_task_scheduled (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_event_delivery_task_scheduled (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn event_delivery_task_scheduled_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_event_delivery_task_scheduled_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (event_delivery_task_scheduled : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let event_delivery_task_scheduled : u32 = unsafe { :: std :: mem :: transmute (event_delivery_task_scheduled) } ; event_delivery_task_scheduled as u64 }) ; __bindgen_bitfield_unit } # [inline] pub fn finish_result_set (& self) -> u32 { unsafe { :: std :: mem :: transmute (self . _bitfield_2 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_finish_result_set (& mut self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_2 . set (0usize , 1u8 , val as u64) } } # [inline] pub unsafe fn finish_result_set_raw (this : * const Self) -> u32 { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_2) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_finish_result_set_raw (this : * mut Self , val : u32) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 1usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_2) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_2 (finish_result_set : u32) -> __BindgenBitfieldUnit < [u8 ; 1usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 1usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let finish_result_set : u32 = unsafe { :: std :: mem :: transmute (finish_result_set) } ; finish_result_set as u64 }) ; __bindgen_bitfield_unit } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_s3_meta_request__bindgen_ty_2 { pub node : aws_linked_list_node , pub scheduled : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request__bindgen_ty_2"] [:: std :: mem :: size_of :: < aws_s3_meta_request__bindgen_ty_2 > () - 24usize] ; ["Alignment of aws_s3_meta_request__bindgen_ty_2"] [:: std :: mem :: align_of :: < aws_s3_meta_request__bindgen_ty_2 > () - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_2::node"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_2 , node) - 0usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_2::scheduled"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_2 , scheduled) - 16usize] ; } ; impl Default for aws_s3_meta_request__bindgen_ty_2 { 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)] pub struct aws_s3_meta_request__bindgen_ty_3 { pub event_delivery_array : aws_array_list , pub next_deliver_range_start : u64 , pub num_bytes_delivery_completed : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request__bindgen_ty_3"] [:: std :: mem :: size_of :: < aws_s3_meta_request__bindgen_ty_3 > () - 56usize] ; ["Alignment of aws_s3_meta_request__bindgen_ty_3"] [:: std :: mem :: align_of :: < aws_s3_meta_request__bindgen_ty_3 > () - 8usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_3::event_delivery_array"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_3 , event_delivery_array) - 0usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_3::next_deliver_range_start"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_3 , next_deliver_range_start) - 40usize] ; ["Offset of field: aws_s3_meta_request__bindgen_ty_3::num_bytes_delivery_completed"] [:: std :: mem :: offset_of ! (aws_s3_meta_request__bindgen_ty_3 , num_bytes_delivery_completed) - 48usize] ; } ; impl Default for aws_s3_meta_request__bindgen_ty_3 { 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 () } } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_meta_request"] [:: std :: mem :: size_of :: < aws_s3_meta_request > () - 960usize] ; ["Alignment of aws_s3_meta_request"] [:: std :: mem :: align_of :: < aws_s3_meta_request > () - 8usize] ; ["Offset of field: aws_s3_meta_request::allocator"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , allocator) - 0usize] ; ["Offset of field: aws_s3_meta_request::ref_count"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , ref_count) - 8usize] ; ["Offset of field: aws_s3_meta_request::impl_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , impl_) - 32usize] ; ["Offset of field: aws_s3_meta_request::vtable"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , vtable) - 40usize] ; ["Offset of field: aws_s3_meta_request::initial_request_message"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , initial_request_message) - 48usize] ; ["Offset of field: aws_s3_meta_request::request_body_async_stream"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , request_body_async_stream) - 56usize] ; ["Offset of field: aws_s3_meta_request::request_body_parallel_stream"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , request_body_parallel_stream) - 64usize] ; ["Offset of field: aws_s3_meta_request::request_body_using_async_writes"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , request_body_using_async_writes) - 72usize] ; ["Offset of field: aws_s3_meta_request::part_size"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , part_size) - 80usize] ; ["Offset of field: aws_s3_meta_request::max_active_connections_override"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , max_active_connections_override) - 88usize] ; ["Offset of field: aws_s3_meta_request::cached_signing_config"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , cached_signing_config) - 96usize] ; ["Offset of field: aws_s3_meta_request::client"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , client) - 104usize] ; ["Offset of field: aws_s3_meta_request::endpoint"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , endpoint) - 112usize] ; ["Offset of field: aws_s3_meta_request::num_requests_network"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , num_requests_network) - 120usize] ; ["Offset of field: aws_s3_meta_request::io_event_loop"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , io_event_loop) - 128usize] ; ["Offset of field: aws_s3_meta_request::user_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , user_data) - 136usize] ; ["Offset of field: aws_s3_meta_request::headers_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , headers_callback) - 144usize] ; ["Offset of field: aws_s3_meta_request::body_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , body_callback) - 152usize] ; ["Offset of field: aws_s3_meta_request::body_callback_ex"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , body_callback_ex) - 160usize] ; ["Offset of field: aws_s3_meta_request::finish_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , finish_callback) - 168usize] ; ["Offset of field: aws_s3_meta_request::shutdown_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , shutdown_callback) - 176usize] ; ["Offset of field: aws_s3_meta_request::progress_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , progress_callback) - 184usize] ; ["Offset of field: aws_s3_meta_request::telemetry_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , telemetry_callback) - 192usize] ; ["Offset of field: aws_s3_meta_request::upload_review_callback"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , upload_review_callback) - 200usize] ; ["Offset of field: aws_s3_meta_request::type_"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , type_) - 208usize] ; ["Offset of field: aws_s3_meta_request::s3express_session_host"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , s3express_session_host) - 216usize] ; ["Offset of field: aws_s3_meta_request::is_express"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , is_express) - 224usize] ; ["Offset of field: aws_s3_meta_request::buffer_pool_optimized"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , buffer_pool_optimized) - 225usize] ; ["Offset of field: aws_s3_meta_request::num_request_being_prepared"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , num_request_being_prepared) - 232usize] ; ["Offset of field: aws_s3_meta_request::synced_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , synced_data) - 240usize] ; ["Offset of field: aws_s3_meta_request::client_process_work_threaded_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , client_process_work_threaded_data) - 704usize] ; ["Offset of field: aws_s3_meta_request::io_threaded_data"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , io_threaded_data) - 728usize] ; ["Offset of field: aws_s3_meta_request::should_compute_content_md5"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , should_compute_content_md5) - 784usize] ; ["Offset of field: aws_s3_meta_request::checksum_config"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , checksum_config) - 792usize] ; ["Offset of field: aws_s3_meta_request::meta_request_level_response_header_checksum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , meta_request_level_response_header_checksum) - 872usize] ; ["Offset of field: aws_s3_meta_request::meta_request_level_running_response_sum"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , meta_request_level_running_response_sum) - 904usize] ; ["Offset of field: aws_s3_meta_request::recv_file"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , recv_file) - 912usize] ; ["Offset of field: aws_s3_meta_request::recv_filepath"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , recv_filepath) - 920usize] ; ["Offset of field: aws_s3_meta_request::recv_file_delete_on_failure"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , recv_file_delete_on_failure) - 928usize] ; ["Offset of field: aws_s3_meta_request::fio_opts"] [:: std :: mem :: offset_of ! (aws_s3_meta_request , fio_opts) - 936usize] ; } ; impl Default for aws_s3_meta_request { 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)] pub struct aws_s3_mpu_part_info { pub size : u64 , pub etag : * mut aws_string , pub checksum_context : * mut aws_s3_upload_request_checksum_context , pub was_previously_uploaded : bool , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of aws_s3_mpu_part_info"] [:: std :: mem :: size_of :: < aws_s3_mpu_part_info > () - 32usize] ; ["Alignment of aws_s3_mpu_part_info"] [:: std :: mem :: align_of :: < aws_s3_mpu_part_info > () - 8usize] ; ["Offset of field: aws_s3_mpu_part_info::size"] [:: std :: mem :: offset_of ! (aws_s3_mpu_part_info , size) - 0usize] ; ["Offset of field: aws_s3_mpu_part_info::etag"] [:: std :: mem :: offset_of ! (aws_s3_mpu_part_info , etag) - 8usize] ; ["Offset of field: aws_s3_mpu_part_info::checksum_context"] [:: std :: mem :: offset_of ! (aws_s3_mpu_part_info , checksum_context) - 16usize] ; ["Offset of field: aws_s3_mpu_part_info::was_previously_uploaded"] [:: std :: mem :: offset_of ! (aws_s3_mpu_part_info , was_previously_uploaded) - 24usize] ; } ; impl Default for aws_s3_mpu_part_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 () } } } unsafe extern "C" { pub fn aws_s3_meta_request_init_base (allocator : * mut aws_allocator , client : * mut aws_s3_client , part_size : usize , should_compute_content_md5 : bool , should_default_streaming : bool , options : * const aws_s3_meta_request_options , impl_ : * mut :: libc :: c_void , vtable : * mut aws_s3_meta_request_vtable , base_type : * mut aws_s3_meta_request) -> :: libc :: c_int ; } unsafe extern "C" { pub fn aws_s3_meta_request_is_active (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_is_finished (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_has_finish_result (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_lock_synced_data (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_unlock_synced_data (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_update (meta_request : * mut aws_s3_meta_request , flags : u32 , out_request : * mut * mut aws_s3_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_prepare_request (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , callback : aws_s3_meta_request_prepare_request_callback_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_s3_meta_request_send_request (meta_request : * mut aws_s3_meta_request , connection : * mut aws_s3_connection) ; } unsafe extern "C" { pub fn aws_s3_meta_request_init_signing_date_time_default (meta_request : * mut aws_s3_meta_request , date_time : * mut aws_date_time) ; } unsafe extern "C" { pub fn aws_s3_meta_request_sign_request_default_impl (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , on_signing_complete : aws_signing_complete_fn , user_data : * mut :: libc :: c_void , disable_s3_express_signing : bool) ; } unsafe extern "C" { pub fn aws_s3_meta_request_sign_request_default (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , on_signing_complete : aws_signing_complete_fn , user_data : * mut :: libc :: c_void) ; } unsafe extern "C" { pub fn aws_s3_meta_request_send_request_finish_default (connection : * mut aws_s3_connection , stream : * mut aws_http_stream , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_finished_request (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_stream_response_body_synced (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_add_event_for_delivery_synced (meta_request : * mut aws_s3_meta_request , event : * const aws_s3_meta_request_event) ; } unsafe extern "C" { pub fn aws_s3_meta_request_are_events_out_for_delivery_synced (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_cancel_cancellable_requests_synced (meta_request : * mut aws_s3_meta_request , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_cancel_pending_buffer_futures_synced (meta_request : * mut aws_s3_meta_request , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_read_body (meta_request : * mut aws_s3_meta_request , offset : u64 , buffer : * mut aws_byte_buf) -> * mut aws_future_bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_set_fail_synced (meta_request : * mut aws_s3_meta_request , failed_request : * mut aws_s3_request , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_set_success_synced (meta_request : * mut aws_s3_meta_request , response_status : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_has_finish_result_synced (meta_request : * mut aws_s3_meta_request) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_finish (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_finish_default (meta_request : * mut aws_s3_meta_request) ; } unsafe extern "C" { pub fn aws_s3_meta_request_result_setup (meta_request : * mut aws_s3_meta_request , result : * mut aws_s3_meta_request_result , failed_request : * mut aws_s3_request , response_status : :: libc :: c_int , error_code : :: libc :: c_int) ; } unsafe extern "C" { pub fn aws_s3_meta_request_result_clean_up (meta_request : * mut aws_s3_meta_request , result : * mut aws_s3_meta_request_result) ; } unsafe extern "C" { pub fn aws_s3_meta_request_checksum_config_has_algorithm (meta_request : * mut aws_s3_meta_request , algorithm : aws_s3_checksum_algorithm) -> bool ; } unsafe extern "C" { pub fn aws_s3_meta_request_schedule_prepare_request_default_impl (meta_request : * mut aws_s3_meta_request , request : * mut aws_s3_request , parallel : bool , callback : aws_s3_meta_request_prepare_request_callback_fn , user_data : * mut :: libc :: c_void) ; } pub type __builtin_va_list = [__va_list_tag ; 1usize] ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct __va_list_tag { pub gp_offset : :: libc :: c_uint , pub fp_offset : :: libc :: c_uint , pub overflow_arg_area : * mut :: libc :: c_void , pub reg_save_area : * mut :: libc :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of __va_list_tag"] [:: std :: mem :: size_of :: < __va_list_tag > () - 24usize] ; ["Alignment of __va_list_tag"] [:: std :: mem :: align_of :: < __va_list_tag > () - 8usize] ; ["Offset of field: __va_list_tag::gp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , gp_offset) - 0usize] ; ["Offset of field: __va_list_tag::fp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , fp_offset) - 4usize] ; ["Offset of field: __va_list_tag::overflow_arg_area"] [:: std :: mem :: offset_of ! (__va_list_tag , overflow_arg_area) - 8usize] ; ["Offset of field: __va_list_tag::reg_save_area"] [:: std :: mem :: offset_of ! (__va_list_tag , reg_save_area) - 16usize] ; } ; impl Default for __va_list_tag { 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 = " (Optional)\n Use a cached merged profile collection. A merge collection has both config file\n (~/.aws/config) and credentials file based profile collection (~/.aws/credentials) using\n `aws_profile_collection_new_from_merge`.\n If this option is provided, `config_file_name_override` and `credentials_file_name_override` will be ignored."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_profile_collection { pub _address : u8 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_tls_ctx { pub _address : u8 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_parallel_input_stream { pub _address : u8 , } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct aws_cached_signing_config_aws { pub _address : u8 , }
[WARN] too much data in the log, truncating it
