pub struct LightClientRpcAsyncClient { /* private fields */ }Implementations§
Source§impl LightClientRpcAsyncClient
impl LightClientRpcAsyncClient
pub fn new(uri: &str) -> Self
pub fn with_builder<F>(uri: &str, f: F) -> Result<Self, Error>
pub fn post<PARAM, RET>( &self, method: &str, params: PARAM, ) -> impl Future<Output = Result<RET, RpcError>> + Send + 'static
pub fn set_scripts( &self, scripts: Vec<ScriptStatus>, command: Option<SetScriptsCommand>, ) -> impl Future<Output = Result<(), RpcError>>
pub fn get_scripts( &self, ) -> impl Future<Output = Result<Vec<ScriptStatus>, RpcError>>
pub fn get_cells( &self, search_key: SearchKey, order: Order, limit: Uint32, after: Option<JsonBytes>, ) -> impl Future<Output = Result<Pagination<Cell>, RpcError>>
pub fn get_transactions( &self, search_key: SearchKey, order: Order, limit: Uint32, after: Option<JsonBytes>, ) -> impl Future<Output = Result<Pagination<Tx>, RpcError>>
pub fn get_cells_capacity( &self, search_key: SearchKey, ) -> impl Future<Output = Result<CellsCapacity, RpcError>>
pub fn send_transaction( &self, tx: Transaction, ) -> impl Future<Output = Result<H256, RpcError>>
pub fn get_tip_header( &self, ) -> impl Future<Output = Result<HeaderView, RpcError>>
pub fn get_genesis_block( &self, ) -> impl Future<Output = Result<BlockView, RpcError>>
pub fn get_header( &self, block_hash: H256, ) -> impl Future<Output = Result<Option<HeaderView>, RpcError>>
pub fn get_transaction( &self, tx_hash: H256, ) -> impl Future<Output = Result<Option<TransactionWithStatus>, RpcError>>
pub fn estimate_cycles( &self, tx: Transaction, ) -> impl Future<Output = Result<EstimateCycles, RpcError>>
Sourcepub fn fetch_header(
&self,
block_hash: H256,
) -> impl Future<Output = Result<FetchStatus<HeaderView>, RpcError>>
pub fn fetch_header( &self, block_hash: H256, ) -> impl Future<Output = Result<FetchStatus<HeaderView>, RpcError>>
Fetch a header from remote node. If return status is not_found will re-sent fetching request immediately.
Returns: FetchStatus
Sourcepub fn fetch_transaction(
&self,
tx_hash: H256,
) -> impl Future<Output = Result<FetchStatus<TransactionWithStatus>, RpcError>>
pub fn fetch_transaction( &self, tx_hash: H256, ) -> impl Future<Output = Result<FetchStatus<TransactionWithStatus>, RpcError>>
Fetch a transaction from remote node. If return status is not_found will re-sent fetching request immediately.
Returns: FetchStatus
pub fn get_peers( &self, ) -> impl Future<Output = Result<Vec<RemoteNode>, RpcError>>
pub fn local_node_info( &self, ) -> impl Future<Output = Result<LocalNode, RpcError>>
Trait Implementations§
Source§impl Clone for LightClientRpcAsyncClient
impl Clone for LightClientRpcAsyncClient
Source§impl From<&LightClientRpcClient> for LightClientRpcAsyncClient
Available on non-WebAssembly only.
impl From<&LightClientRpcClient> for LightClientRpcAsyncClient
Available on non-WebAssembly only.
Source§fn from(value: &LightClientRpcClient) -> Self
fn from(value: &LightClientRpcClient) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for LightClientRpcAsyncClient
impl !RefUnwindSafe for LightClientRpcAsyncClient
impl Send for LightClientRpcAsyncClient
impl Sync for LightClientRpcAsyncClient
impl Unpin for LightClientRpcAsyncClient
impl !UnwindSafe for LightClientRpcAsyncClient
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more