| /wasmtime-44.0.1/crates/wasi/src/p2/host/ |
| H A D | network.rs | 22 return Ok(Some(ErrorCode::from(err))); in network_error_code() 37 impl From<io::Error> for ErrorCode { implementation 43 impl From<&io::Error> for ErrorCode { implementation 67 ErrorCode::Unknown in from() 73 impl From<Errno> for ErrorCode { implementation 79 impl From<&Errno> for ErrorCode { implementation 87 Errno::AGAIN => ErrorCode::WouldBlock, in from() 88 Errno::INTR => ErrorCode::WouldBlock, in from() 90 Errno::PERM => ErrorCode::AccessDenied, in from() 95 Errno::TIMEDOUT => ErrorCode::Timeout, in from() [all …]
|
| H A D | filesystem.rs | 29 ) -> wasmtime::Result<Option<ErrorCode>> { in filesystem_error_code() argument 585 type Error = ErrorCode; 596 ) -> Result<Self, ErrorCode> { 634 RustixErrno::IO => ErrorCode::Io, in from_raw_os_error() 695 impl From<std::io::Error> for ErrorCode { implementation 697 ErrorCode::from(&err) in from() 712 _ => ErrorCode::Io, in from() 719 impl From<cap_rand::Error> for ErrorCode { implementation 728 ErrorCode::Overflow in from() 753 .ok_or(ErrorCode::Overflow) in systemtime_from() [all …]
|
| /wasmtime-44.0.1/crates/wasi/src/p2/ |
| H A D | network.rs | 2 use crate::p2::bindings::sockets::network::ErrorCode; 8 pub type SocketError = TrappableError<ErrorCode>; 18 ErrorCode::from(error).into() in from() 24 ErrorCode::from(error).into() in from() 28 impl From<crate::sockets::util::ErrorCode> for SocketError { 29 fn from(error: crate::sockets::util::ErrorCode) -> Self { in from() 30 ErrorCode::from(error).into() in from() 34 impl From<crate::sockets::util::ErrorCode> for ErrorCode { implementation 35 fn from(error: crate::sockets::util::ErrorCode) -> Self { in from() 37 crate::sockets::util::ErrorCode::Unknown => Self::Unknown, in from() [all …]
|
| H A D | filesystem.rs | 13 pub type FsError = TrappableError<types::ErrorCode>; 15 impl From<crate::filesystem::ErrorCode> for types::ErrorCode { implementation 16 fn from(error: crate::filesystem::ErrorCode) -> Self { in from() 21 crate::filesystem::ErrorCode::Busy => Self::Busy, in from() 22 crate::filesystem::ErrorCode::Exist => Self::Exist, in from() 28 crate::filesystem::ErrorCode::Io => Self::Io, in from() 30 crate::filesystem::ErrorCode::Loop => Self::Loop, in from() 47 impl From<crate::filesystem::ErrorCode> for FsError { 48 fn from(error: crate::filesystem::ErrorCode) -> Self { in from() 49 types::ErrorCode::from(error).into() in from() [all …]
|
| /wasmtime-44.0.1/crates/wasi/src/ |
| H A D | filesystem.rs | 182 pub(crate) enum ErrorCode { enum 364 RustixErrno::IO => ErrorCode::Io, in from_raw_os_error() 435 _ => ErrorCode::Io, in from() 442 impl From<std::io::Error> for ErrorCode { implementation 444 ErrorCode::from(&err) in from() 567 ) -> Result<(), ErrorCode> { in set_times() argument 751 ) -> Result<(), ErrorCode> { in advise() argument 874 ) -> Result<(), ErrorCode> { in set_times_at() argument 908 ) -> Result<(), ErrorCode> { in link_at() argument 1094 ) -> Result<(), ErrorCode> { in rename_at() argument [all …]
|
| /wasmtime-44.0.1/crates/wasi/src/p3/filesystem/ |
| H A D | mod.rs | 9 pub type FilesystemError = TrappableError<types::ErrorCode>; 71 impl<'a> From<&'a std::io::Error> for types::ErrorCode { implementation 73 crate::filesystem::ErrorCode::from(err).into() in from() 77 impl From<std::io::Error> for types::ErrorCode { implementation 85 types::ErrorCode::from(error).into() in from() 89 impl From<crate::filesystem::ErrorCode> for types::ErrorCode { implementation 90 fn from(error: crate::filesystem::ErrorCode) -> Self { in from() 95 crate::filesystem::ErrorCode::Busy => Self::Busy, in from() 102 crate::filesystem::ErrorCode::Io => Self::Io, in from() 122 fn from(error: crate::filesystem::ErrorCode) -> Self { in from() [all …]
|
| /wasmtime-44.0.1/crates/wasi/src/sockets/ |
| H A D | udp.rs | 94 return Err(ErrorCode::InvalidState); in bind() 97 return Err(ErrorCode::InvalidArgument); in bind() 110 _ => Err(ErrorCode::NotInProgress), in finish_bind() 124 return Err(ErrorCode::InvalidState); in disconnect() 154 return Err(ErrorCode::InvalidArgument); in connect_common() 171 ErrorCode::Unknown in connect_common() 270 return Err(ErrorCode::InvalidState); in local_address() 281 return Err(ErrorCode::InvalidState); in remote_address() 346 Err(ErrorCode::Unknown) in send() 357 ) -> Result<(), ErrorCode> { in send_to() argument [all …]
|
| H A D | tcp.rs | 160 ) -> Result<Self, ErrorCode> { in new() argument 248 Err(ErrorCode::InvalidState) in as_std_view() 272 Err(ErrorCode::InvalidState) in start_bind() 286 Err(ErrorCode::NotInProgress) in finish_bind() 324 ) -> Result<(), ErrorCode> { in set_pending_connect() argument 359 Err(ErrorCode::NotInProgress) in take_pending_connect() 367 ) -> Result<(), ErrorCode> { in finish_connect() argument 378 Err(ErrorCode::from(err)) in finish_connect() 392 Err(ErrorCode::InvalidState) in start_listen_p2() 729 ) -> Result<(), ErrorCode> { in set_p2_streaming_state() argument [all …]
|
| H A D | util.rs | 15 pub enum ErrorCode { enum 34 impl fmt::Display for ErrorCode { implementation 40 impl std::error::Error for ErrorCode {} implementation 114 impl From<std::io::Error> for ErrorCode { implementation 120 impl From<&std::io::Error> for ErrorCode { implementation 147 impl From<Errno> for ErrorCode { implementation 153 impl From<&Errno> for ErrorCode { implementation 199 return Err(ErrorCode::NotSupported); in get_ip_ttl() 220 ) -> Result<(), ErrorCode> { in set_unicast_hop_limit() argument 227 return Err(ErrorCode::InvalidArgument); in set_unicast_hop_limit() [all …]
|
| /wasmtime-44.0.1/crates/wasi-http/src/p2/ |
| H A D | error.rs | 2 use crate::p2::bindings::http::types::{self, ErrorCode}; 31 pub fn downcast_ref(&self) -> Option<&ErrorCode> { in downcast_ref() argument 36 impl From<ErrorCode> for HttpError { 37 fn from(error: ErrorCode) -> Self { in from() 146 ErrorCode::InternalError(Some(msg)) in internal_error() 152 return ErrorCode::HttpRequestUriInvalid; in http_request_error() 157 ErrorCode::HttpProtocolError in http_request_error() 171 ErrorCode::HttpProtocolError in hyper_request_error() 177 return ErrorCode::HttpResponseTimeout; in hyper_response_error() 189 ErrorCode::HttpProtocolError in hyper_response_error() [all …]
|
| /wasmtime-44.0.1/crates/test-programs/src/bin/ |
| H A D | p2_tcp_states.rs | 15 Err(ErrorCode::NotInProgress) in test_tcp_unbound_state_invariants() 23 Err(ErrorCode::NotInProgress) in test_tcp_unbound_state_invariants() 28 Err(ErrorCode::InvalidState) in test_tcp_unbound_state_invariants() 34 Err(ErrorCode::InvalidState) in test_tcp_unbound_state_invariants() 63 Err(ErrorCode::InvalidState) in test_tcp_bound_state_invariants() 69 Err(ErrorCode::NotInProgress) in test_tcp_bound_state_invariants() 74 Err(ErrorCode::NotInProgress) in test_tcp_bound_state_invariants() 79 Err(ErrorCode::InvalidState) in test_tcp_bound_state_invariants() 85 Err(ErrorCode::InvalidState) in test_tcp_bound_state_invariants() 115 Err(ErrorCode::InvalidState) in test_tcp_listening_state_invariants() [all …]
|
| H A D | p2_ip_name_lookup.rs | 2 use test_programs::wasi::sockets::network::{ErrorCode, IpAddress}; 48 assert_eq!(resolve("").unwrap_err(), ErrorCode::InvalidArgument); in main() 49 assert_eq!(resolve(" ").unwrap_err(), ErrorCode::InvalidArgument); in main() 50 assert_eq!(resolve("a.b<&>").unwrap_err(), ErrorCode::InvalidArgument); in main() 53 ErrorCode::InvalidArgument in main() 55 assert_eq!(resolve("[::]:80").unwrap_err(), ErrorCode::InvalidArgument); in main() 58 ErrorCode::InvalidArgument in main() 76 fn resolve(name: &str) -> Result<Vec<IpAddress>, ErrorCode> { in resolve() argument 80 fn resolve_one(name: &str) -> Result<IpAddress, ErrorCode> { in resolve_one() argument
|
| H A D | p3_sockets_ip_name_lookup.rs | 1 use test_programs::p3::wasi::sockets::ip_name_lookup::{ErrorCode, resolve_addresses}; 8 async fn resolve_one(name: &str) -> Result<IpAddress, ErrorCode> { in resolve_one() argument 90 ErrorCode::InvalidArgument in run() 94 ErrorCode::InvalidArgument in run() 98 ErrorCode::InvalidArgument in run() 102 ErrorCode::InvalidArgument in run() 106 ErrorCode::InvalidArgument in run() 112 ErrorCode::InvalidArgument in run()
|
| H A D | p2_udp_states.rs | 3 ErrorCode, IpAddress, IpAddressFamily, IpSocketAddress, Network, 11 assert!(matches!(sock.finish_bind(), Err(ErrorCode::NotInProgress))); in test_udp_unbound_state_invariants() 13 assert!(matches!(sock.stream(None), Err(ErrorCode::InvalidState))); in test_udp_unbound_state_invariants() 15 assert!(matches!(sock.local_address(), Err(ErrorCode::InvalidState))); in test_udp_unbound_state_invariants() 18 Err(ErrorCode::InvalidState) in test_udp_unbound_state_invariants() 37 Err(ErrorCode::InvalidState) in test_udp_bound_state_invariants() 39 assert!(matches!(sock.finish_bind(), Err(ErrorCode::NotInProgress))); in test_udp_bound_state_invariants() 45 Err(ErrorCode::InvalidState) in test_udp_bound_state_invariants() 66 Err(ErrorCode::InvalidState) in test_udp_connected_state_invariants() 68 assert!(matches!(sock.finish_bind(), Err(ErrorCode::NotInProgress))); in test_udp_connected_state_invariants()
|
| H A D | p2_tcp_connect.rs | 3 ErrorCode, IpAddress, IpAddressFamily, IpSocketAddress, Network, 16 Err(ErrorCode::InvalidArgument) in test_tcp_connect_unspec() 27 Err(ErrorCode::InvalidArgument) in test_tcp_connect_port_0() 43 Err(ErrorCode::InvalidArgument) in test_tcp_connect_wrong_family() 59 Err(ErrorCode::InvalidArgument) in test_tcp_connect_non_unicast() 63 Err(ErrorCode::InvalidArgument) in test_tcp_connect_non_unicast() 67 Err(ErrorCode::InvalidArgument) in test_tcp_connect_non_unicast() 90 Err(ErrorCode::InvalidArgument) in test_tcp_connect_dual_stack() 95 Err(ErrorCode::InvalidArgument) in test_tcp_connect_dual_stack()
|
| H A D | p3_sockets_tcp_states.rs | 3 ErrorCode, IpAddress, IpAddressFamily, IpSocketAddress, TcpSocket, 21 Err(ErrorCode::InvalidState) in test_tcp_unbound_state_invariants() 25 Err(ErrorCode::InvalidState) in test_tcp_unbound_state_invariants() 63 Err(ErrorCode::InvalidState) in test_tcp_bound_state_invariants() 74 Err(ErrorCode::InvalidState) in test_tcp_bound_state_invariants() 113 Err(ErrorCode::InvalidState) in test_tcp_listening_state_invariants() 118 Err(ErrorCode::InvalidState) in test_tcp_listening_state_invariants() 131 Err(ErrorCode::InvalidState) in test_tcp_listening_state_invariants() 138 Ok(_) | Err(ErrorCode::NotSupported) in test_tcp_listening_state_invariants() 183 Err(ErrorCode::InvalidState) in test_tcp_connected_state_invariants() [all …]
|
| H A D | p2_udp_connect.rs | 2 ErrorCode, IpAddress, IpAddressFamily, IpSocketAddress, Network, 17 assert_eq!(client.remote_address(), Err(ErrorCode::InvalidState)); in test_udp_connect_disconnect_reconnect() 20 assert_eq!(client.remote_address(), Err(ErrorCode::InvalidState)); in test_udp_connect_disconnect_reconnect() 32 assert_eq!(client.remote_address(), Err(ErrorCode::InvalidState)); in test_udp_connect_disconnect_reconnect() 46 Err(ErrorCode::InvalidArgument) in test_udp_connect_unspec() 58 Err(ErrorCode::InvalidArgument) in test_udp_connect_port_0() 75 Err(ErrorCode::InvalidArgument) in test_udp_connect_wrong_family() 87 Err(ErrorCode::InvalidState) in test_udp_connect_without_bind() 110 Err(ErrorCode::InvalidArgument) in test_udp_connect_dual_stack() 116 Err(ErrorCode::InvalidArgument) in test_udp_connect_dual_stack()
|
| H A D | p2_http_outbound_request_invalid_dnsname.rs | 1 use test_programs::wasi::http::types::{ErrorCode, Method, Scheme}; 19 e.downcast_ref::<ErrorCode>() in main() 21 ErrorCode::DnsError(_) | ErrorCode::ConnectionRefused, in main()
|
| H A D | p3_sockets_udp_states.rs | 2 ErrorCode, IpAddress, IpAddressFamily, IpSocketAddress, UdpSocket, 17 Err(ErrorCode::InvalidArgument) in test_udp_unbound_state_invariants() 19 assert!(matches!(sock.disconnect(), Err(ErrorCode::InvalidState))); in test_udp_unbound_state_invariants() 22 Err(ErrorCode::InvalidState) in test_udp_unbound_state_invariants() 26 Err(ErrorCode::InvalidState) in test_udp_unbound_state_invariants() 45 Err(ErrorCode::InvalidState) in test_udp_bound_state_invariants() 52 Err(ErrorCode::InvalidState) in test_udp_bound_state_invariants() 72 Err(ErrorCode::InvalidState) in test_udp_connected_state_invariants()
|
| /wasmtime-44.0.1/crates/wasi/src/p2/host/filesystem/ |
| H A D | sync.rs | 325 impl From<async_filesystem::ErrorCode> for sync_filesystem::ErrorCode { implementation 327 use async_filesystem::ErrorCode; in from() 329 ErrorCode::Access => Self::Access, in from() 333 ErrorCode::Busy => Self::Busy, in from() 335 ErrorCode::Quota => Self::Quota, in from() 336 ErrorCode::Exist => Self::Exist, in from() 342 ErrorCode::Io => Self::Io, in from() 344 ErrorCode::Loop => Self::Loop, in from() 350 ErrorCode::NoLock => Self::NoLock, in from() 357 ErrorCode::NoTty => Self::NoTty, in from() [all …]
|
| /wasmtime-44.0.1/crates/test-programs/src/ |
| H A D | sockets.rs | 30 1 => Err(ErrorCode::Timeout), in block_until() 94 Err(ErrorCode::WouldBlock) => { in blocking_resolve_addresses() 110 ) -> Result<Vec<IpAddress>, ErrorCode> { in permissive_blocking_resolve_addresses() argument 112 Err(ErrorCode::NameUnresolvable | ErrorCode::TemporaryResolverFailure) => Ok(vec![]), in permissive_blocking_resolve_addresses() 127 ) -> Result<(), ErrorCode> { in blocking_bind() argument 141 pub fn blocking_listen(&self) -> Result<(), ErrorCode> { in blocking_listen() argument 159 ) -> Result<(InputStream, OutputStream), ErrorCode> { in blocking_connect() argument 195 ) -> Result<(), ErrorCode> { in blocking_bind() argument 391 ) -> Result<IpSocketAddress, ErrorCode> in attempt_random_port() argument 393 F: FnMut(IpSocketAddress) -> Result<(), ErrorCode>, in attempt_random_port() [all …]
|
| /wasmtime-44.0.1/crates/wasi/src/p3/sockets/ |
| H A D | conv.rs | 143 impl From<std::io::Error> for types::ErrorCode { implementation 149 impl From<&std::io::Error> for types::ErrorCode { implementation 176 impl From<Errno> for types::ErrorCode { implementation 182 impl From<&Errno> for types::ErrorCode { implementation 225 impl From<crate::sockets::util::ErrorCode> for types::ErrorCode { implementation 226 fn from(code: crate::sockets::util::ErrorCode) -> Self { in from() 228 crate::sockets::util::ErrorCode::Unknown => Self::Other(None), in from() 233 crate::sockets::util::ErrorCode::Timeout => Self::Timeout, in from() 248 impl From<crate::sockets::util::ErrorCode> for SocketError { 249 fn from(code: crate::sockets::util::ErrorCode) -> Self { in from() [all …]
|
| /wasmtime-44.0.1/crates/wasi-http/src/p3/ |
| H A D | request.rs | 1 use crate::p3::bindings::http::types::ErrorCode; 100 T::Error: Into<ErrorCode>, in from_http() argument 138 http::Request<UnsyncBoxBody<Bytes, ErrorCode>>, in into_http() 188 ErrorCode::HttpRequestBodySize, in into_http_with_getter() 236 ErrorCode::HttpRequestUriInvalid in into_http_with_getter() 270 ErrorCode, in default_send_request() 369 ErrorCode::TlsProtocolError in default_send_request() 381 .map_err(|_| ErrorCode::ConnectionTimeout)? in default_send_request() 382 .map_err(ErrorCode::from_hyper_request_error)?; in default_send_request() 408 type Error = ErrorCode; in default_send_request() [all …]
|
| H A D | mod.rs | 24 use crate::p3::bindings::http::types::ErrorCode; 37 pub(crate) type HttpError = TrappableError<types::ErrorCode>; 110 request: http::Request<UnsyncBoxBody<Bytes, ErrorCode>>, in send_request() argument 112 fut: Box<dyn Future<Output = Result<(), ErrorCode>> + Send>, in send_request() 116 http::Response<UnsyncBoxBody<Bytes, ErrorCode>>, in send_request() 117 Box<dyn Future<Output = Result<(), ErrorCode>> + Send>, in send_request() 152 request: http::Request<UnsyncBoxBody<Bytes, ErrorCode>>, in send_request() argument 154 fut: Box<dyn Future<Output = Result<(), ErrorCode>> + Send>, in send_request() 158 http::Response<UnsyncBoxBody<Bytes, ErrorCode>>, in send_request() 159 Box<dyn Future<Output = Result<(), ErrorCode>> + Send>, in send_request()
|
| /wasmtime-44.0.1/crates/wasi-nn/src/ |
| H A D | wit.rs | 61 code: ErrorCode, 87 code: ErrorCode::Trap, in from() 96 pub enum ErrorCode { enum 191 ErrorCode::InvalidEncoding, in load() 211 ErrorCode::NotFound, in load_by_name() 328 ErrorCode::InvalidArgument => Ok(generated::errors::ErrorCode::InvalidArgument), in code() 329 ErrorCode::InvalidEncoding => Ok(generated::errors::ErrorCode::InvalidEncoding), in code() 330 ErrorCode::Timeout => Ok(generated::errors::ErrorCode::Timeout), in code() 331 ErrorCode::RuntimeError => Ok(generated::errors::ErrorCode::RuntimeError), in code() 335 ErrorCode::TooLarge => Ok(generated::errors::ErrorCode::TooLarge), in code() [all …]
|