pub struct BitcoinTransport { /* private fields */ }Expand description
Bitcoin RPC transport wrapper.
Implementations§
Source§impl BitcoinTransport
impl BitcoinTransport
pub fn new(inner: Arc<dyn RpcTransport>) -> Self
pub fn inner(&self) -> &Arc<dyn RpcTransport>
Trait Implementations§
Source§impl RpcTransport for BitcoinTransport
impl RpcTransport for BitcoinTransport
Source§fn send<'life0, 'async_trait>(
&'life0 self,
req: JsonRpcRequest,
) -> Pin<Box<dyn Future<Output = Result<JsonRpcResponse, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 self,
req: JsonRpcRequest,
) -> Pin<Box<dyn Future<Output = Result<JsonRpcResponse, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a single JSON-RPC request and return the response.
Source§fn send_batch<'life0, 'async_trait>(
&'life0 self,
reqs: Vec<JsonRpcRequest>,
) -> Pin<Box<dyn Future<Output = Result<Vec<JsonRpcResponse>, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_batch<'life0, 'async_trait>(
&'life0 self,
reqs: Vec<JsonRpcRequest>,
) -> Pin<Box<dyn Future<Output = Result<Vec<JsonRpcResponse>, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a batch of JSON-RPC requests. Read more
Source§fn health(&self) -> HealthStatus
fn health(&self) -> HealthStatus
Return the current health status of this transport.
Source§fn call<'life0, 'life1, 'async_trait, T>(
&'life0 self,
id: u64,
method: &'life1 str,
params: Vec<Value>,
) -> Pin<Box<dyn Future<Output = Result<T, TransportError>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: 'async_trait + DeserializeOwned,
'life0: 'async_trait,
'life1: 'async_trait,
fn call<'life0, 'life1, 'async_trait, T>(
&'life0 self,
id: u64,
method: &'life1 str,
params: Vec<Value>,
) -> Pin<Box<dyn Future<Output = Result<T, TransportError>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: 'async_trait + DeserializeOwned,
'life0: 'async_trait,
'life1: 'async_trait,
Convenience: call a method and deserialize the result.
Auto Trait Implementations§
impl Freeze for BitcoinTransport
impl !RefUnwindSafe for BitcoinTransport
impl Send for BitcoinTransport
impl Sync for BitcoinTransport
impl Unpin for BitcoinTransport
impl UnsafeUnpin for BitcoinTransport
impl !UnwindSafe for BitcoinTransport
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