fedimint_api_client::api

Trait JsonRpcClient

Source
pub trait JsonRpcClient:
    ClientT
    + Sized
    + MaybeSend
    + MaybeSync {
    // Required methods
    fn connect<'life0, 'async_trait>(
        url: &'life0 SafeUrl,
        api_secret: Option<String>,
    ) -> Pin<Box<dyn Future<Output = Result<Self, JsonRpcClientError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn connect_with_tor<'life0, 'async_trait>(
        url: &'life0 SafeUrl,
        api_secret: Option<String>,
    ) -> Pin<Box<dyn Future<Output = Result<Self, JsonRpcClientError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn is_connected(&self) -> bool;
}

Required Methods§

Source

fn connect<'life0, 'async_trait>( url: &'life0 SafeUrl, api_secret: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<Self, JsonRpcClientError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn connect_with_tor<'life0, 'async_trait>( url: &'life0 SafeUrl, api_secret: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<Self, JsonRpcClientError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn is_connected(&self) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl JsonRpcClient for WsClient

Source§

fn connect<'life0, 'async_trait>( url: &'life0 SafeUrl, api_secret: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<Self, JsonRpcClientError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn connect_with_tor<'life0, 'async_trait>( url: &'life0 SafeUrl, api_secret: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<Self, JsonRpcClientError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn is_connected(&self) -> bool

Implementors§