ic_web3_rs/transports/
mod.rs

1//! Supported Ethereum JSON-RPC transports.
2
3pub mod batch;
4
5pub use self::batch::Batch;
6pub mod either;
7pub use self::either::Either;
8
9#[cfg(any(feature = "http", feature = "http-rustls"))]
10pub mod http;
11#[cfg(any(feature = "http", feature = "http-rustls"))]
12pub use self::http::Http;
13
14pub mod ic_http_client;
15pub use self::ic_http_client::ICHttpClient;
16pub mod ic_http;
17pub use self::ic_http::ICHttp;
18
19#[cfg(any(feature = "ws-tokio", feature = "ws-async-std"))]
20pub mod ws;
21#[cfg(any(feature = "ws-tokio", feature = "ws-async-std"))]
22pub use self::ws::WebSocket;
23
24#[cfg(feature = "ipc-tokio")]
25pub mod ipc;
26#[cfg(feature = "ipc-tokio")]
27pub use self::ipc::Ipc;
28
29#[cfg(any(feature = "test", test))]
30pub mod test;
31
32#[cfg(feature = "url")]
33impl From<url::ParseError> for crate::Error {
34    fn from(err: url::ParseError) -> Self {
35        use crate::error::TransportError;
36        crate::Error::Transport(TransportError::Message(format!("failed to parse url: {}", err)))
37    }
38}
39
40#[cfg(feature = "async-native-tls")]
41impl From<async_native_tls::Error> for crate::Error {
42    fn from(err: async_native_tls::Error) -> Self {
43        use crate::error::TransportError;
44        crate::Error::Transport(TransportError::Message(format!("{:?}", err)))
45    }
46}
47
48#[cfg(feature = "eip-1193")]
49pub mod eip_1193;