pub struct RgHttpClient {
pub url: String,
pub port: u16,
pub timeout: Duration,
pub http_proxy: Option<String>,
pub auth: Option<Box<dyn RequestResponseAuth>>,
}Fields§
§url: String§port: u16§timeout: Duration§http_proxy: Option<String>§auth: Option<Box<dyn RequestResponseAuth>>Implementations§
Source§impl RgHttpClient
impl RgHttpClient
pub async fn address_info_for_pk(&self, p0: &PublicKey) -> RgResult<AddressInfo>
Source§impl RgHttpClient
impl RgHttpClient
pub fn new( url: String, port: u16, signer: Option<Box<dyn RequestResponseAuth>>, ) -> Self
pub fn with_http_proxy(self, http_proxy: String) -> Self
pub async fn address_info( &self, address: Address, ) -> Result<AddressInfo, ErrorInfo>
pub async fn send_transaction( &self, t: &Transaction, sync: bool, ) -> Result<SubmitTransactionResponse, ErrorInfo>
pub async fn balance(&self, address: &Address) -> Result<i64, ErrorInfo>
pub fn url(&self) -> String
pub fn from_env( url: String, network_environment: &NetworkEnvironment, signer: Option<Box<dyn RequestResponseAuth>>, ) -> Self
pub async fn metrics(&self) -> RgResult<Vec<(String, String)>>
pub async fn table_sizes(&self) -> RgResult<Vec<(String, i64)>>
pub async fn explorer_public_address( &self, pk: &PublicKey, ) -> RgResult<Vec<DetailedAddress>>
pub async fn table_sizes_map(&self) -> RgResult<HashMap<String, i64>>
pub async fn metrics_map(&self) -> RgResult<HashMap<String, String>>
pub async fn json_post<Req: Serialize + ?Sized, Resp: DeserializeOwned>( &self, r: &Req, endpoint: String, ) -> Result<Resp, ErrorInfo>
pub fn client(&self) -> RgResult<Client>
pub async fn json_get<Resp: DeserializeOwned>( &self, endpoint: impl Into<String>, ) -> RgResult<Resp>
pub async fn proto_post<Req: Sized + ProtoSerde>( &self, r: &Req, endpoint: String, ) -> Result<Response, ErrorInfo>
pub async fn proto_post_request( &self, r: Request, nmd: Option<NodeMetadata>, intended_pk: Option<&PublicKey>, ) -> Result<Response, ErrorInfo>
pub async fn get_peers(&self) -> Result<Response, ErrorInfo>
pub async fn contract_state( &self, address: &Address, ) -> RgResult<ContractStateMarker>
pub async fn about(&self) -> RgResult<AboutNodeResponse>
pub async fn seeds(&self) -> RgResult<Vec<Seed>>
pub async fn active_party_key(&self) -> RgResult<PublicKey>
pub async fn balance_pk(&self, pk: &PublicKey) -> RgResult<CurrencyAmount>
pub async fn party_data( &self, ) -> RgResult<HashMap<PublicKey, PartyInternalData>>
pub async fn enriched_party_data(&self) -> HashMap<PublicKey, PartyInternalData>
pub async fn executable_checksum(&self) -> RgResult<String>
pub async fn resolve_code( &self, address: &Address, ) -> RgResult<ResolveCodeResponse>
pub async fn genesis(&self) -> RgResult<Transaction>
pub async fn query_hash( &self, input: String, ) -> Result<HashSearchResponse, ErrorInfo>
Trait Implementations§
Source§impl Clone for RgHttpClient
impl Clone for RgHttpClient
Source§fn clone(&self) -> RgHttpClient
fn clone(&self) -> RgHttpClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RgHttpClient
impl !RefUnwindSafe for RgHttpClient
impl Send for RgHttpClient
impl Sync for RgHttpClient
impl Unpin for RgHttpClient
impl !UnwindSafe for RgHttpClient
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