// Generated by `wit-bindgen` 0.7.0. DO NOT EDIT! pub mod land { pub mod http { #[allow(clippy::all)] pub mod http_types { #[used] #[doc(hidden)] #[cfg(target_arch = "wasm32")] static __FORCE_SECTION_REF: fn() = super::super::super::__link_section; #[repr(u8)] #[derive(Clone, Copy, PartialEq, Eq)] pub enum RequestError { NetworkError, Timeout, InvalidUrl, DestinationNotAllowed, TooManyRequests, InvalidRequest, } impl RequestError { pub fn name(&self) -> &'static str { match self { RequestError::NetworkError => "network-error", RequestError::Timeout => "timeout", RequestError::InvalidUrl => "invalid-url", RequestError::DestinationNotAllowed => "destination-not-allowed", RequestError::TooManyRequests => "too-many-requests", RequestError::InvalidRequest => "invalid-request", } } pub fn message(&self) -> &'static str { match self { RequestError::NetworkError => "", RequestError::Timeout => "", RequestError::InvalidUrl => "", RequestError::DestinationNotAllowed => "", RequestError::TooManyRequests => "", RequestError::InvalidRequest => "", } } } impl ::core::fmt::Debug for RequestError { fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("RequestError") .field("code", &(*self as i32)) .field("name", &self.name()) .field("message", &self.message()) .finish() } } impl ::core::fmt::Display for RequestError { fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "{} (error {})", self.name(), *self as i32) } } impl std::error::Error for RequestError {} #[repr(u8)] #[derive(Clone, Copy, PartialEq, Eq)] pub enum RedirectPolicy { Follow, Error, Manual, } impl ::core::fmt::Debug for RedirectPolicy { fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { RedirectPolicy::Follow => f.debug_tuple("RedirectPolicy::Follow").finish(), RedirectPolicy::Error => f.debug_tuple("RedirectPolicy::Error").finish(), RedirectPolicy::Manual => f.debug_tuple("RedirectPolicy::Manual").finish(), } } } #[repr(C)] #[derive(Copy, Clone)] pub struct RequestOptions { pub timeout: u32, pub redirect: RedirectPolicy, } impl ::core::fmt::Debug for RequestOptions { fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("RequestOptions") .field("timeout", &self.timeout) .field("redirect", &self.redirect) .finish() } } pub type HttpUri = wit_bindgen::rt::string::String; pub type HttpStatusCode = u16; pub type HttpMethod = wit_bindgen::rt::string::String; pub type HttpHeaders = wit_bindgen::rt::vec::Vec<( wit_bindgen::rt::string::String, wit_bindgen::rt::string::String, )>; pub type HttpBodyHandle = u32; #[derive(Clone)] pub struct Response { pub status: HttpStatusCode, pub headers: HttpHeaders, pub body: Option, } impl ::core::fmt::Debug for Response { fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Response") .field("status", &self.status) .field("headers", &self.headers) .field("body", &self.body) .finish() } } #[derive(Clone)] pub struct Request { pub method: HttpMethod, pub uri: HttpUri, pub headers: HttpHeaders, pub body: Option, } impl ::core::fmt::Debug for Request { fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_struct("Request") .field("method", &self.method) .field("uri", &self.uri) .field("headers", &self.headers) .field("body", &self.body) .finish() } } } #[allow(clippy::all)] pub mod http_body { #[used] #[doc(hidden)] #[cfg(target_arch = "wasm32")] static __FORCE_SECTION_REF: fn() = super::super::super::__link_section; pub type HttpBodyHandle = super::super::super::land::http::http_types::HttpBodyHandle; /// an error type returned from a body operation. #[derive(Clone)] pub enum BodyError { /// The body is invalid InvalidHandle, /// The body is only readable ReadOnly, /// The body read failed ReadFailed(wit_bindgen::rt::string::String), /// The body write failed WriteFailed(wit_bindgen::rt::string::String), } impl ::core::fmt::Debug for BodyError { fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { match self { BodyError::InvalidHandle => { f.debug_tuple("BodyError::InvalidHandle").finish() } BodyError::ReadOnly => f.debug_tuple("BodyError::ReadOnly").finish(), BodyError::ReadFailed(e) => { f.debug_tuple("BodyError::ReadFailed").field(e).finish() } BodyError::WriteFailed(e) => { f.debug_tuple("BodyError::WriteFailed").field(e).finish() } } } } impl ::core::fmt::Display for BodyError { fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "{:?}", self) } } impl std::error::Error for BodyError {} #[allow(clippy::all)] /// Read http body bytes with size and eof flag pub fn http_body_read( handle: HttpBodyHandle, ) -> Result<(wit_bindgen::rt::vec::Vec, bool), BodyError> { #[allow(unused_imports)] use wit_bindgen::rt::{alloc, string::String, vec::Vec}; unsafe { #[repr(align(4))] struct RetArea([u8; 16]); let mut ret_area = ::core::mem::MaybeUninit::::uninit(); let ptr0 = ret_area.as_mut_ptr() as i32; #[link(wasm_import_module = "land:http/http-body")] extern "C" { #[cfg_attr(target_arch = "wasm32", link_name = "http-body-read")] #[cfg_attr( not(target_arch = "wasm32"), link_name = "land:http/http-body_http-body-read" )] fn wit_import(_: i32, _: i32); } wit_import(wit_bindgen::rt::as_i32(handle), ptr0); match i32::from(*((ptr0 + 0) as *const u8)) { 0 => Ok({ let len1 = *((ptr0 + 8) as *const i32) as usize; ( Vec::from_raw_parts( *((ptr0 + 4) as *const i32) as *mut _, len1, len1, ), { #[cfg(not(debug_assertions))] { ::core::mem::transmute::(i32::from( *((ptr0 + 12) as *const u8), ) as u8) } #[cfg(debug_assertions)] { match i32::from(*((ptr0 + 12) as *const u8)) { 0 => false, 1 => true, _ => panic!("invalid bool discriminant"), } } }, ) }), 1 => Err({ { match i32::from(*((ptr0 + 4) as *const u8)) { 0 => BodyError::InvalidHandle, 1 => BodyError::ReadOnly, 2 => BodyError::ReadFailed({ let len2 = *((ptr0 + 12) as *const i32) as usize; { #[cfg(not(debug_assertions))] { String::from_utf8_unchecked(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len2, len2, )) } #[cfg(debug_assertions)] { String::from_utf8(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len2, len2, )) .unwrap() } } }), #[cfg(debug_assertions)] 3 => BodyError::WriteFailed({ let len3 = *((ptr0 + 12) as *const i32) as usize; { #[cfg(not(debug_assertions))] { String::from_utf8_unchecked(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len3, len3, )) } #[cfg(debug_assertions)] { String::from_utf8(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len3, len3, )) .unwrap() } } }), #[cfg(not(debug_assertions))] _ => BodyError::WriteFailed({ let len3 = *((ptr0 + 12) as *const i32) as usize; { #[cfg(not(debug_assertions))] { String::from_utf8_unchecked(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len3, len3, )) } #[cfg(debug_assertions)] { String::from_utf8(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len3, len3, )) .unwrap() } } }), #[cfg(debug_assertions)] _ => panic!("invalid enum discriminant"), } } }), #[cfg(not(debug_assertions))] _ => ::core::hint::unreachable_unchecked(), #[cfg(debug_assertions)] _ => panic!("invalid enum discriminant"), } } } #[allow(clippy::all)] /// Readall http body bytes with size and eof flag pub fn http_body_read_all( handle: HttpBodyHandle, ) -> Result, BodyError> { #[allow(unused_imports)] use wit_bindgen::rt::{alloc, string::String, vec::Vec}; unsafe { #[repr(align(4))] struct RetArea([u8; 16]); let mut ret_area = ::core::mem::MaybeUninit::::uninit(); let ptr0 = ret_area.as_mut_ptr() as i32; #[link(wasm_import_module = "land:http/http-body")] extern "C" { #[cfg_attr(target_arch = "wasm32", link_name = "http-body-read-all")] #[cfg_attr( not(target_arch = "wasm32"), link_name = "land:http/http-body_http-body-read-all" )] fn wit_import(_: i32, _: i32); } wit_import(wit_bindgen::rt::as_i32(handle), ptr0); match i32::from(*((ptr0 + 0) as *const u8)) { 0 => Ok({ let len1 = *((ptr0 + 8) as *const i32) as usize; Vec::from_raw_parts(*((ptr0 + 4) as *const i32) as *mut _, len1, len1) }), 1 => Err({ { match i32::from(*((ptr0 + 4) as *const u8)) { 0 => BodyError::InvalidHandle, 1 => BodyError::ReadOnly, 2 => BodyError::ReadFailed({ let len2 = *((ptr0 + 12) as *const i32) as usize; { #[cfg(not(debug_assertions))] { String::from_utf8_unchecked(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len2, len2, )) } #[cfg(debug_assertions)] { String::from_utf8(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len2, len2, )) .unwrap() } } }), #[cfg(debug_assertions)] 3 => BodyError::WriteFailed({ let len3 = *((ptr0 + 12) as *const i32) as usize; { #[cfg(not(debug_assertions))] { String::from_utf8_unchecked(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len3, len3, )) } #[cfg(debug_assertions)] { String::from_utf8(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len3, len3, )) .unwrap() } } }), #[cfg(not(debug_assertions))] _ => BodyError::WriteFailed({ let len3 = *((ptr0 + 12) as *const i32) as usize; { #[cfg(not(debug_assertions))] { String::from_utf8_unchecked(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len3, len3, )) } #[cfg(debug_assertions)] { String::from_utf8(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len3, len3, )) .unwrap() } } }), #[cfg(debug_assertions)] _ => panic!("invalid enum discriminant"), } } }), #[cfg(not(debug_assertions))] _ => ::core::hint::unreachable_unchecked(), #[cfg(debug_assertions)] _ => panic!("invalid enum discriminant"), } } } #[allow(clippy::all)] /// Write http body bytes, return written bytes length pub fn http_body_write(handle: HttpBodyHandle, data: &[u8]) -> Result { #[allow(unused_imports)] use wit_bindgen::rt::{alloc, string::String, vec::Vec}; unsafe { #[repr(align(8))] struct RetArea([u8; 24]); let mut ret_area = ::core::mem::MaybeUninit::::uninit(); let vec0 = data; let ptr0 = vec0.as_ptr() as i32; let len0 = vec0.len() as i32; let ptr1 = ret_area.as_mut_ptr() as i32; #[link(wasm_import_module = "land:http/http-body")] extern "C" { #[cfg_attr(target_arch = "wasm32", link_name = "http-body-write")] #[cfg_attr( not(target_arch = "wasm32"), link_name = "land:http/http-body_http-body-write" )] fn wit_import(_: i32, _: i32, _: i32, _: i32); } wit_import(wit_bindgen::rt::as_i32(handle), ptr0, len0, ptr1); match i32::from(*((ptr1 + 0) as *const u8)) { 0 => Ok(*((ptr1 + 8) as *const i64) as u64), 1 => Err({ { match i32::from(*((ptr1 + 8) as *const u8)) { 0 => BodyError::InvalidHandle, 1 => BodyError::ReadOnly, 2 => BodyError::ReadFailed({ let len2 = *((ptr1 + 16) as *const i32) as usize; { #[cfg(not(debug_assertions))] { String::from_utf8_unchecked(Vec::from_raw_parts( *((ptr1 + 12) as *const i32) as *mut _, len2, len2, )) } #[cfg(debug_assertions)] { String::from_utf8(Vec::from_raw_parts( *((ptr1 + 12) as *const i32) as *mut _, len2, len2, )) .unwrap() } } }), #[cfg(debug_assertions)] 3 => BodyError::WriteFailed({ let len3 = *((ptr1 + 16) as *const i32) as usize; { #[cfg(not(debug_assertions))] { String::from_utf8_unchecked(Vec::from_raw_parts( *((ptr1 + 12) as *const i32) as *mut _, len3, len3, )) } #[cfg(debug_assertions)] { String::from_utf8(Vec::from_raw_parts( *((ptr1 + 12) as *const i32) as *mut _, len3, len3, )) .unwrap() } } }), #[cfg(not(debug_assertions))] _ => BodyError::WriteFailed({ let len3 = *((ptr1 + 16) as *const i32) as usize; { #[cfg(not(debug_assertions))] { String::from_utf8_unchecked(Vec::from_raw_parts( *((ptr1 + 12) as *const i32) as *mut _, len3, len3, )) } #[cfg(debug_assertions)] { String::from_utf8(Vec::from_raw_parts( *((ptr1 + 12) as *const i32) as *mut _, len3, len3, )) .unwrap() } } }), #[cfg(debug_assertions)] _ => panic!("invalid enum discriminant"), } } }), #[cfg(not(debug_assertions))] _ => ::core::hint::unreachable_unchecked(), #[cfg(debug_assertions)] _ => panic!("invalid enum discriminant"), } } } #[allow(clippy::all)] /// Accquire http body and get http body handle pub fn http_body_new() -> Result { #[allow(unused_imports)] use wit_bindgen::rt::{alloc, string::String, vec::Vec}; unsafe { #[repr(align(4))] struct RetArea([u8; 16]); let mut ret_area = ::core::mem::MaybeUninit::::uninit(); let ptr0 = ret_area.as_mut_ptr() as i32; #[link(wasm_import_module = "land:http/http-body")] extern "C" { #[cfg_attr(target_arch = "wasm32", link_name = "http-body-new")] #[cfg_attr( not(target_arch = "wasm32"), link_name = "land:http/http-body_http-body-new" )] fn wit_import(_: i32); } wit_import(ptr0); match i32::from(*((ptr0 + 0) as *const u8)) { 0 => Ok(*((ptr0 + 4) as *const i32) as u32), 1 => Err({ { match i32::from(*((ptr0 + 4) as *const u8)) { 0 => BodyError::InvalidHandle, 1 => BodyError::ReadOnly, 2 => BodyError::ReadFailed({ let len1 = *((ptr0 + 12) as *const i32) as usize; { #[cfg(not(debug_assertions))] { String::from_utf8_unchecked(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len1, len1, )) } #[cfg(debug_assertions)] { String::from_utf8(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len1, len1, )) .unwrap() } } }), #[cfg(debug_assertions)] 3 => BodyError::WriteFailed({ let len2 = *((ptr0 + 12) as *const i32) as usize; { #[cfg(not(debug_assertions))] { String::from_utf8_unchecked(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len2, len2, )) } #[cfg(debug_assertions)] { String::from_utf8(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len2, len2, )) .unwrap() } } }), #[cfg(not(debug_assertions))] _ => BodyError::WriteFailed({ let len2 = *((ptr0 + 12) as *const i32) as usize; { #[cfg(not(debug_assertions))] { String::from_utf8_unchecked(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len2, len2, )) } #[cfg(debug_assertions)] { String::from_utf8(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len2, len2, )) .unwrap() } } }), #[cfg(debug_assertions)] _ => panic!("invalid enum discriminant"), } } }), #[cfg(not(debug_assertions))] _ => ::core::hint::unreachable_unchecked(), #[cfg(debug_assertions)] _ => panic!("invalid enum discriminant"), } } } #[allow(clippy::all)] /// Accquire http body and get http body handle pub fn http_body_new_stream() -> Result { #[allow(unused_imports)] use wit_bindgen::rt::{alloc, string::String, vec::Vec}; unsafe { #[repr(align(4))] struct RetArea([u8; 16]); let mut ret_area = ::core::mem::MaybeUninit::::uninit(); let ptr0 = ret_area.as_mut_ptr() as i32; #[link(wasm_import_module = "land:http/http-body")] extern "C" { #[cfg_attr(target_arch = "wasm32", link_name = "http-body-new-stream")] #[cfg_attr( not(target_arch = "wasm32"), link_name = "land:http/http-body_http-body-new-stream" )] fn wit_import(_: i32); } wit_import(ptr0); match i32::from(*((ptr0 + 0) as *const u8)) { 0 => Ok(*((ptr0 + 4) as *const i32) as u32), 1 => Err({ { match i32::from(*((ptr0 + 4) as *const u8)) { 0 => BodyError::InvalidHandle, 1 => BodyError::ReadOnly, 2 => BodyError::ReadFailed({ let len1 = *((ptr0 + 12) as *const i32) as usize; { #[cfg(not(debug_assertions))] { String::from_utf8_unchecked(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len1, len1, )) } #[cfg(debug_assertions)] { String::from_utf8(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len1, len1, )) .unwrap() } } }), #[cfg(debug_assertions)] 3 => BodyError::WriteFailed({ let len2 = *((ptr0 + 12) as *const i32) as usize; { #[cfg(not(debug_assertions))] { String::from_utf8_unchecked(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len2, len2, )) } #[cfg(debug_assertions)] { String::from_utf8(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len2, len2, )) .unwrap() } } }), #[cfg(not(debug_assertions))] _ => BodyError::WriteFailed({ let len2 = *((ptr0 + 12) as *const i32) as usize; { #[cfg(not(debug_assertions))] { String::from_utf8_unchecked(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len2, len2, )) } #[cfg(debug_assertions)] { String::from_utf8(Vec::from_raw_parts( *((ptr0 + 8) as *const i32) as *mut _, len2, len2, )) .unwrap() } } }), #[cfg(debug_assertions)] _ => panic!("invalid enum discriminant"), } } }), #[cfg(not(debug_assertions))] _ => ::core::hint::unreachable_unchecked(), #[cfg(debug_assertions)] _ => panic!("invalid enum discriminant"), } } } } #[allow(clippy::all)] pub mod http_outgoing { #[used] #[doc(hidden)] #[cfg(target_arch = "wasm32")] static __FORCE_SECTION_REF: fn() = super::super::super::__link_section; pub type Request<'a> = &'a super::super::super::land::http::http_types::Request; pub type Response = super::super::super::land::http::http_types::Response; pub type RequestError = super::super::super::land::http::http_types::RequestError; pub type RequestOptions = super::super::super::land::http::http_types::RequestOptions; #[allow(clippy::all)] pub fn fetch_request( req: Request<'_>, options: RequestOptions, ) -> Result { #[allow(unused_imports)] use wit_bindgen::rt::{alloc, string::String, vec::Vec}; unsafe { #[repr(align(4))] struct RetArea([u8; 24]); let mut ret_area = ::core::mem::MaybeUninit::::uninit(); let super::super::super::land::http::http_types::Request { method: method0, uri: uri0, headers: headers0, body: body0, } = req; let vec1 = method0; let ptr1 = vec1.as_ptr() as i32; let len1 = vec1.len() as i32; let vec2 = uri0; let ptr2 = vec2.as_ptr() as i32; let len2 = vec2.len() as i32; let vec6 = headers0; let len6 = vec6.len() as i32; let layout6 = alloc::Layout::from_size_align_unchecked(vec6.len() * 16, 4); let result6 = if layout6.size() != 0 { let ptr = alloc::alloc(layout6); if ptr.is_null() { alloc::handle_alloc_error(layout6); } ptr } else { ::core::ptr::null_mut() }; for (i, e) in vec6.into_iter().enumerate() { let base = result6 as i32 + (i as i32) * 16; { let (t3_0, t3_1) = e; let vec4 = t3_0; let ptr4 = vec4.as_ptr() as i32; let len4 = vec4.len() as i32; *((base + 4) as *mut i32) = len4; *((base + 0) as *mut i32) = ptr4; let vec5 = t3_1; let ptr5 = vec5.as_ptr() as i32; let len5 = vec5.len() as i32; *((base + 12) as *mut i32) = len5; *((base + 8) as *mut i32) = ptr5; } } let (result7_0, result7_1) = match body0 { Some(e) => (1i32, wit_bindgen::rt::as_i32(e)), None => (0i32, 0i32), }; let super::super::super::land::http::http_types::RequestOptions { timeout: timeout8, redirect: redirect8, } = options; let ptr9 = ret_area.as_mut_ptr() as i32; #[link(wasm_import_module = "land:http/http-outgoing")] extern "C" { #[cfg_attr(target_arch = "wasm32", link_name = "fetch-request")] #[cfg_attr( not(target_arch = "wasm32"), link_name = "land:http/http-outgoing_fetch-request" )] fn wit_import( _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, ); } wit_import( ptr1, len1, ptr2, len2, result6 as i32, len6, result7_0, result7_1, wit_bindgen::rt::as_i32(timeout8), match redirect8 { super::super::super::land::http::http_types::RedirectPolicy::Follow => { 0 } super::super::super::land::http::http_types::RedirectPolicy::Error => 1, super::super::super::land::http::http_types::RedirectPolicy::Manual => { 2 } }, ptr9, ); if layout6.size() != 0 { alloc::dealloc(result6, layout6); } match i32::from(*((ptr9 + 0) as *const u8)) { 0 => Ok({ let base12 = *((ptr9 + 8) as *const i32); let len12 = *((ptr9 + 12) as *const i32); let mut result12 = Vec::with_capacity(len12 as usize); for i in 0..len12 { let base = base12 + i * 16; result12.push({ let len10 = *((base + 4) as *const i32) as usize; let len11 = *((base + 12) as *const i32) as usize; ( { #[cfg(not(debug_assertions))] { String::from_utf8_unchecked(Vec::from_raw_parts( *((base + 0) as *const i32) as *mut _, len10, len10, )) } #[cfg(debug_assertions)] { String::from_utf8(Vec::from_raw_parts( *((base + 0) as *const i32) as *mut _, len10, len10, )) .unwrap() } }, { #[cfg(not(debug_assertions))] { String::from_utf8_unchecked(Vec::from_raw_parts( *((base + 8) as *const i32) as *mut _, len11, len11, )) } #[cfg(debug_assertions)] { String::from_utf8(Vec::from_raw_parts( *((base + 8) as *const i32) as *mut _, len11, len11, )) .unwrap() } }, ) }); } wit_bindgen::rt::dealloc(base12, (len12 as usize) * 16, 4); super::super::super::land::http::http_types::Response { status: i32::from(*((ptr9 + 4) as *const u16)) as u16, headers: result12, body: match i32::from(*((ptr9 + 16) as *const u8)) { 0 => None, 1 => Some(*((ptr9 + 20) as *const i32) as u32), #[cfg(not(debug_assertions))] _ => ::core::hint::unreachable_unchecked(), #[cfg(debug_assertions)] _ => panic!("invalid enum discriminant"), }, } }), 1 => Err({ #[cfg(debug_assertions)] { match i32::from(*((ptr9 + 4) as *const u8)) { 0 => super::super::super::land::http::http_types::RequestError::NetworkError, 1 => super::super::super::land::http::http_types::RequestError::Timeout, 2 => super::super::super::land::http::http_types::RequestError::InvalidUrl, 3 => super::super::super::land::http::http_types::RequestError::DestinationNotAllowed, 4 => super::super::super::land::http::http_types::RequestError::TooManyRequests, 5 => super::super::super::land::http::http_types::RequestError::InvalidRequest, _ => panic!("invalid enum discriminant"), } } #[cfg(not(debug_assertions))] { ::core::mem::transmute::< _, super::super::super::land::http::http_types::RequestError, >(i32::from( *((ptr9 + 4) as *const u8), ) as u8) } }), #[cfg(not(debug_assertions))] _ => ::core::hint::unreachable_unchecked(), #[cfg(debug_assertions)] _ => panic!("invalid enum discriminant"), } } } } } } #[cfg(target_arch = "wasm32")] #[link_section = "component-type:http-service"] #[doc(hidden)] pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 1736] = [ 3, 0, 12, 104, 116, 116, 112, 45, 115, 101, 114, 118, 105, 99, 101, 0, 97, 115, 109, 13, 0, 1, 0, 7, 204, 12, 1, 65, 4, 1, 65, 6, 1, 66, 22, 1, 109, 6, 13, 110, 101, 116, 119, 111, 114, 107, 45, 101, 114, 114, 111, 114, 7, 116, 105, 109, 101, 111, 117, 116, 11, 105, 110, 118, 97, 108, 105, 100, 45, 117, 114, 108, 23, 100, 101, 115, 116, 105, 110, 97, 116, 105, 111, 110, 45, 110, 111, 116, 45, 97, 108, 108, 111, 119, 101, 100, 17, 116, 111, 111, 45, 109, 97, 110, 121, 45, 114, 101, 113, 117, 101, 115, 116, 115, 15, 105, 110, 118, 97, 108, 105, 100, 45, 114, 101, 113, 117, 101, 115, 116, 4, 0, 13, 114, 101, 113, 117, 101, 115, 116, 45, 101, 114, 114, 111, 114, 3, 0, 0, 1, 109, 3, 6, 102, 111, 108, 108, 111, 119, 5, 101, 114, 114, 111, 114, 6, 109, 97, 110, 117, 97, 108, 4, 0, 15, 114, 101, 100, 105, 114, 101, 99, 116, 45, 112, 111, 108, 105, 99, 121, 3, 0, 2, 1, 114, 2, 7, 116, 105, 109, 101, 111, 117, 116, 121, 8, 114, 101, 100, 105, 114, 101, 99, 116, 3, 4, 0, 15, 114, 101, 113, 117, 101, 115, 116, 45, 111, 112, 116, 105, 111, 110, 115, 3, 0, 4, 1, 115, 4, 0, 8, 104, 116, 116, 112, 45, 117, 114, 105, 3, 0, 6, 1, 123, 4, 0, 16, 104, 116, 116, 112, 45, 115, 116, 97, 116, 117, 115, 45, 99, 111, 100, 101, 3, 0, 8, 1, 115, 4, 0, 11, 104, 116, 116, 112, 45, 109, 101, 116, 104, 111, 100, 3, 0, 10, 1, 111, 2, 115, 115, 1, 112, 12, 4, 0, 12, 104, 116, 116, 112, 45, 104, 101, 97, 100, 101, 114, 115, 3, 0, 13, 1, 121, 4, 0, 16, 104, 116, 116, 112, 45, 98, 111, 100, 121, 45, 104, 97, 110, 100, 108, 101, 3, 0, 15, 1, 107, 16, 1, 114, 3, 6, 115, 116, 97, 116, 117, 115, 9, 7, 104, 101, 97, 100, 101, 114, 115, 14, 4, 98, 111, 100, 121, 17, 4, 0, 8, 114, 101, 115, 112, 111, 110, 115, 101, 3, 0, 18, 1, 114, 4, 6, 109, 101, 116, 104, 111, 100, 11, 3, 117, 114, 105, 7, 7, 104, 101, 97, 100, 101, 114, 115, 14, 4, 98, 111, 100, 121, 17, 4, 0, 7, 114, 101, 113, 117, 101, 115, 116, 3, 0, 20, 3, 1, 20, 108, 97, 110, 100, 58, 104, 116, 116, 112, 47, 104, 116, 116, 112, 45, 116, 121, 112, 101, 115, 5, 0, 2, 3, 0, 0, 7, 114, 101, 113, 117, 101, 115, 116, 2, 3, 0, 0, 8, 114, 101, 115, 112, 111, 110, 115, 101, 1, 66, 6, 2, 3, 2, 1, 1, 4, 0, 7, 114, 101, 113, 117, 101, 115, 116, 3, 0, 0, 2, 3, 2, 1, 2, 4, 0, 8, 114, 101, 115, 112, 111, 110, 115, 101, 3, 0, 2, 1, 64, 1, 3, 114, 101, 113, 1, 0, 3, 4, 0, 14, 104, 97, 110, 100, 108, 101, 45, 114, 101, 113, 117, 101, 115, 116, 1, 4, 4, 1, 23, 108, 97, 110, 100, 58, 104, 116, 116, 112, 47, 104, 116, 116, 112, 45, 105, 110, 99, 111, 109, 105, 110, 103, 5, 3, 4, 1, 28, 108, 97, 110, 100, 58, 115, 101, 114, 118, 101, 114, 108, 101, 115, 115, 47, 104, 116, 116, 112, 45, 104, 97, 110, 100, 108, 101, 114, 4, 0, 1, 65, 11, 1, 66, 22, 1, 109, 6, 13, 110, 101, 116, 119, 111, 114, 107, 45, 101, 114, 114, 111, 114, 7, 116, 105, 109, 101, 111, 117, 116, 11, 105, 110, 118, 97, 108, 105, 100, 45, 117, 114, 108, 23, 100, 101, 115, 116, 105, 110, 97, 116, 105, 111, 110, 45, 110, 111, 116, 45, 97, 108, 108, 111, 119, 101, 100, 17, 116, 111, 111, 45, 109, 97, 110, 121, 45, 114, 101, 113, 117, 101, 115, 116, 115, 15, 105, 110, 118, 97, 108, 105, 100, 45, 114, 101, 113, 117, 101, 115, 116, 4, 0, 13, 114, 101, 113, 117, 101, 115, 116, 45, 101, 114, 114, 111, 114, 3, 0, 0, 1, 109, 3, 6, 102, 111, 108, 108, 111, 119, 5, 101, 114, 114, 111, 114, 6, 109, 97, 110, 117, 97, 108, 4, 0, 15, 114, 101, 100, 105, 114, 101, 99, 116, 45, 112, 111, 108, 105, 99, 121, 3, 0, 2, 1, 114, 2, 7, 116, 105, 109, 101, 111, 117, 116, 121, 8, 114, 101, 100, 105, 114, 101, 99, 116, 3, 4, 0, 15, 114, 101, 113, 117, 101, 115, 116, 45, 111, 112, 116, 105, 111, 110, 115, 3, 0, 4, 1, 115, 4, 0, 8, 104, 116, 116, 112, 45, 117, 114, 105, 3, 0, 6, 1, 123, 4, 0, 16, 104, 116, 116, 112, 45, 115, 116, 97, 116, 117, 115, 45, 99, 111, 100, 101, 3, 0, 8, 1, 115, 4, 0, 11, 104, 116, 116, 112, 45, 109, 101, 116, 104, 111, 100, 3, 0, 10, 1, 111, 2, 115, 115, 1, 112, 12, 4, 0, 12, 104, 116, 116, 112, 45, 104, 101, 97, 100, 101, 114, 115, 3, 0, 13, 1, 121, 4, 0, 16, 104, 116, 116, 112, 45, 98, 111, 100, 121, 45, 104, 97, 110, 100, 108, 101, 3, 0, 15, 1, 107, 16, 1, 114, 3, 6, 115, 116, 97, 116, 117, 115, 9, 7, 104, 101, 97, 100, 101, 114, 115, 14, 4, 98, 111, 100, 121, 17, 4, 0, 8, 114, 101, 115, 112, 111, 110, 115, 101, 3, 0, 18, 1, 114, 4, 6, 109, 101, 116, 104, 111, 100, 11, 3, 117, 114, 105, 7, 7, 104, 101, 97, 100, 101, 114, 115, 14, 4, 98, 111, 100, 121, 17, 4, 0, 7, 114, 101, 113, 117, 101, 115, 116, 3, 0, 20, 3, 1, 20, 108, 97, 110, 100, 58, 104, 116, 116, 112, 47, 104, 116, 116, 112, 45, 116, 121, 112, 101, 115, 5, 0, 2, 3, 0, 0, 16, 104, 116, 116, 112, 45, 98, 111, 100, 121, 45, 104, 97, 110, 100, 108, 101, 1, 66, 19, 2, 3, 2, 1, 1, 4, 0, 16, 104, 116, 116, 112, 45, 98, 111, 100, 121, 45, 104, 97, 110, 100, 108, 101, 3, 0, 0, 1, 113, 4, 14, 105, 110, 118, 97, 108, 105, 100, 45, 104, 97, 110, 100, 108, 101, 0, 0, 9, 114, 101, 97, 100, 45, 111, 110, 108, 121, 0, 0, 11, 114, 101, 97, 100, 45, 102, 97, 105, 108, 101, 100, 1, 115, 0, 12, 119, 114, 105, 116, 101, 45, 102, 97, 105, 108, 101, 100, 1, 115, 0, 4, 0, 10, 98, 111, 100, 121, 45, 101, 114, 114, 111, 114, 3, 0, 2, 1, 112, 125, 1, 111, 2, 4, 127, 1, 106, 1, 5, 1, 3, 1, 64, 1, 6, 104, 97, 110, 100, 108, 101, 1, 0, 6, 4, 0, 14, 104, 116, 116, 112, 45, 98, 111, 100, 121, 45, 114, 101, 97, 100, 1, 7, 1, 106, 1, 4, 1, 3, 1, 64, 1, 6, 104, 97, 110, 100, 108, 101, 1, 0, 8, 4, 0, 18, 104, 116, 116, 112, 45, 98, 111, 100, 121, 45, 114, 101, 97, 100, 45, 97, 108, 108, 1, 9, 1, 106, 1, 119, 1, 3, 1, 64, 2, 6, 104, 97, 110, 100, 108, 101, 1, 4, 100, 97, 116, 97, 4, 0, 10, 4, 0, 15, 104, 116, 116, 112, 45, 98, 111, 100, 121, 45, 119, 114, 105, 116, 101, 1, 11, 1, 106, 1, 1, 1, 3, 1, 64, 0, 0, 12, 4, 0, 13, 104, 116, 116, 112, 45, 98, 111, 100, 121, 45, 110, 101, 119, 1, 13, 4, 0, 20, 104, 116, 116, 112, 45, 98, 111, 100, 121, 45, 110, 101, 119, 45, 115, 116, 114, 101, 97, 109, 1, 13, 3, 1, 19, 108, 97, 110, 100, 58, 104, 116, 116, 112, 47, 104, 116, 116, 112, 45, 98, 111, 100, 121, 5, 2, 2, 3, 0, 0, 7, 114, 101, 113, 117, 101, 115, 116, 2, 3, 0, 0, 8, 114, 101, 115, 112, 111, 110, 115, 101, 2, 3, 0, 0, 13, 114, 101, 113, 117, 101, 115, 116, 45, 101, 114, 114, 111, 114, 2, 3, 0, 0, 15, 114, 101, 113, 117, 101, 115, 116, 45, 111, 112, 116, 105, 111, 110, 115, 1, 66, 11, 2, 3, 2, 1, 3, 4, 0, 7, 114, 101, 113, 117, 101, 115, 116, 3, 0, 0, 2, 3, 2, 1, 4, 4, 0, 8, 114, 101, 115, 112, 111, 110, 115, 101, 3, 0, 2, 2, 3, 2, 1, 5, 4, 0, 13, 114, 101, 113, 117, 101, 115, 116, 45, 101, 114, 114, 111, 114, 3, 0, 4, 2, 3, 2, 1, 6, 4, 0, 15, 114, 101, 113, 117, 101, 115, 116, 45, 111, 112, 116, 105, 111, 110, 115, 3, 0, 6, 1, 106, 1, 3, 1, 5, 1, 64, 2, 3, 114, 101, 113, 1, 7, 111, 112, 116, 105, 111, 110, 115, 7, 0, 8, 4, 0, 13, 102, 101, 116, 99, 104, 45, 114, 101, 113, 117, 101, 115, 116, 1, 9, 3, 1, 23, 108, 97, 110, 100, 58, 104, 116, 116, 112, 47, 104, 116, 116, 112, 45, 111, 117, 116, 103, 111, 105, 110, 103, 5, 7, 4, 1, 28, 108, 97, 110, 100, 58, 115, 101, 114, 118, 101, 114, 108, 101, 115, 115, 47, 104, 116, 116, 112, 45, 115, 101, 114, 118, 105, 99, 101, 4, 1, 0, 69, 9, 112, 114, 111, 100, 117, 99, 101, 114, 115, 1, 12, 112, 114, 111, 99, 101, 115, 115, 101, 100, 45, 98, 121, 2, 13, 119, 105, 116, 45, 99, 111, 109, 112, 111, 110, 101, 110, 116, 6, 48, 46, 49, 49, 46, 48, 16, 119, 105, 116, 45, 98, 105, 110, 100, 103, 101, 110, 45, 114, 117, 115, 116, 5, 48, 46, 55, 46, 48, 11, 25, 1, 1, 19, 108, 97, 110, 100, 58, 115, 101, 114, 118, 101, 114, 108, 101, 115, 115, 47, 119, 105, 116, 3, 0, 0, ]; #[inline(never)] #[doc(hidden)] #[cfg(target_arch = "wasm32")] pub fn __link_section() {}