pub struct ProductionRpcClient { /* private fields */ }
Expand description
Production-ready RPC client with connection pooling, caching, and circuit breaker
Implementations§
Source§impl ProductionRpcClient
impl ProductionRpcClient
Sourcepub fn new(endpoint: String, config: ProductionClientConfig) -> Self
pub fn new(endpoint: String, config: ProductionClientConfig) -> Self
Create a new production RPC client
Sourcepub async fn call(&self, method: &str, params: Vec<Value>) -> Neo3Result<Value>
pub async fn call(&self, method: &str, params: Vec<Value>) -> Neo3Result<Value>
Execute an RPC call with full production features
Sourcepub async fn get_block_count(&self) -> Neo3Result<u64>
pub async fn get_block_count(&self) -> Neo3Result<u64>
Get current block count with caching
Sourcepub async fn get_block(&self, identifier: Value) -> Neo3Result<Value>
pub async fn get_block(&self, identifier: Value) -> Neo3Result<Value>
Get block by hash or index with long-term caching
Sourcepub async fn get_transaction(&self, tx_hash: String) -> Neo3Result<Value>
pub async fn get_transaction(&self, tx_hash: String) -> Neo3Result<Value>
Get transaction with long-term caching
Sourcepub async fn get_contract_state(
&self,
contract_hash: String,
) -> Neo3Result<Value>
pub async fn get_contract_state( &self, contract_hash: String, ) -> Neo3Result<Value>
Get contract state with short-term caching
Sourcepub async fn get_nep17_balances(&self, address: String) -> Neo3Result<Value>
pub async fn get_nep17_balances(&self, address: String) -> Neo3Result<Value>
Get balance with very short-term caching
Sourcepub async fn send_raw_transaction(
&self,
transaction_hex: String,
) -> Neo3Result<Value>
pub async fn send_raw_transaction( &self, transaction_hex: String, ) -> Neo3Result<Value>
Send raw transaction (not cached)
Sourcepub async fn get_stats(&self) -> ProductionClientStats
pub async fn get_stats(&self) -> ProductionClientStats
Get production client statistics
Sourcepub async fn get_health(&self) -> Value
pub async fn get_health(&self) -> Value
Get detailed health information
Sourcepub async fn health_check(&self) -> Neo3Result<bool>
pub async fn health_check(&self) -> Neo3Result<bool>
Perform health check by calling a simple RPC method
Auto Trait Implementations§
impl !Freeze for ProductionRpcClient
impl !RefUnwindSafe for ProductionRpcClient
impl Send for ProductionRpcClient
impl Sync for ProductionRpcClient
impl Unpin for ProductionRpcClient
impl !UnwindSafe for ProductionRpcClient
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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