Struct ethers_providers::Ipc
source · pub struct Ipc { /* private fields */ }
Available on crate feature
ipc
and (Unix or Windows) only.Expand description
A JSON-RPC Client over Unix IPC.
§Example
use ethers_providers::Ipc;
// the ipc's path
let path = "/home/user/.local/share/reth/reth.ipc";
let ipc = Ipc::connect(path).await?;
Implementations§
Trait Implementations§
source§impl JsonRpcClient for Ipc
impl JsonRpcClient for Ipc
source§fn request<'life0, 'life1, 'async_trait, T, R>(
&'life0 self,
method: &'life1 str,
params: T
) -> Pin<Box<dyn Future<Output = Result<R, IpcError>> + Send + 'async_trait>>where
T: 'async_trait + Serialize + Send + Sync,
R: 'async_trait + DeserializeOwned,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn request<'life0, 'life1, 'async_trait, T, R>(
&'life0 self,
method: &'life1 str,
params: T
) -> Pin<Box<dyn Future<Output = Result<R, IpcError>> + Send + 'async_trait>>where
T: 'async_trait + Serialize + Send + Sync,
R: 'async_trait + DeserializeOwned,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sends a request with the provided JSON-RPC and parameters serialized as JSON
source§impl PubsubClient for Ipc
impl PubsubClient for Ipc
§type NotificationStream = UnboundedReceiver<Box<RawValue>>
type NotificationStream = UnboundedReceiver<Box<RawValue>>
The type of stream this transport returns
Auto Trait Implementations§
impl !RefUnwindSafe for Ipc
impl Send for Ipc
impl Sync for Ipc
impl Unpin for Ipc
impl !UnwindSafe for Ipc
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more