Drop feature, move to nonblocking mod
This commit is contained in:
@@ -10,8 +10,6 @@ pub mod nonblocking;
|
||||
pub mod nonce_utils;
|
||||
pub mod perf_utils;
|
||||
pub mod pubsub_client;
|
||||
#[cfg(feature = "async")]
|
||||
pub mod pubsub_client_async;
|
||||
pub mod rpc_cache;
|
||||
pub mod rpc_client;
|
||||
pub mod rpc_config;
|
||||
|
@@ -1 +1,2 @@
|
||||
pub mod pubsub_client;
|
||||
pub mod rpc_client;
|
||||
|
@@ -48,13 +48,16 @@ pub enum PubsubClientError {
|
||||
|
||||
#[error("unable to connect to server")]
|
||||
ConnectionError(tokio_tungstenite::tungstenite::Error),
|
||||
|
||||
#[error("websocket error")]
|
||||
WsError(#[from] tokio_tungstenite::tungstenite::Error),
|
||||
|
||||
#[error("connection closed")]
|
||||
ConnectionClosed,
|
||||
|
||||
#[error("json parse error")]
|
||||
JsonParseError(#[from] serde_json::error::Error),
|
||||
|
||||
#[error("subscribe failed: {reason}")]
|
||||
SubscribeFailed {
|
||||
reason: &'static str,
|
||||
@@ -75,7 +78,7 @@ pub struct PubsubClient {
|
||||
}
|
||||
|
||||
impl PubsubClient {
|
||||
pub async fn connect(url: &str) -> PubsubClientResult<Self> {
|
||||
pub async fn new(url: &str) -> PubsubClientResult<Self> {
|
||||
let url = Url::parse(url)?;
|
||||
let (ws, _response) = connect_async(url)
|
||||
.await
|
Reference in New Issue
Block a user