pub struct WithTimeout<T> { /* private fields */ }
Expand description
Wrapper type for any type implementing XandAPIClientTrait
that adds a timeout to all requests.
Implementations§
Trait Implementations§
Source§impl<T: Debug> Debug for WithTimeout<T>
impl<T: Debug> Debug for WithTimeout<T>
Source§impl<T: XandApiClientTrait> XandApiClientTrait for WithTimeout<T>
impl<T: XandApiClientTrait> XandApiClientTrait for WithTimeout<T>
Source§fn submit_transaction<'life0, 'async_trait>(
&'life0 self,
issuer: Address,
txn: XandTransaction,
) -> Pin<Box<dyn Future<Output = Result<TransactionStatusStream, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit_transaction<'life0, 'async_trait>(
&'life0 self,
issuer: Address,
txn: XandTransaction,
) -> Pin<Box<dyn Future<Output = Result<TransactionStatusStream, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Submit a transaction to the API, where it will be signed and then sent to the blockchain Read more
Source§fn submit_transaction_wait<'life0, 'async_trait>(
&'life0 self,
issuer: Address,
txn: XandTransaction,
) -> Pin<Box<dyn Future<Output = Result<TransactionUpdate, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit_transaction_wait<'life0, 'async_trait>(
&'life0 self,
issuer: Address,
txn: XandTransaction,
) -> Pin<Box<dyn Future<Output = Result<TransactionUpdate, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Like
submit_transaction
, but rather than returning a stream, returns a future that
completes once the the transaction has been committed or invalidated (not finalized).Source§fn submit_transaction_wait_final<'life0, 'async_trait>(
&'life0 self,
issuer: Address,
txn: XandTransaction,
) -> Pin<Box<dyn Future<Output = Result<TransactionUpdate, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit_transaction_wait_final<'life0, 'async_trait>(
&'life0 self,
issuer: Address,
txn: XandTransaction,
) -> Pin<Box<dyn Future<Output = Result<TransactionUpdate, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Submits a transaction and returns its final status (which, in the case of a valid
transaction, should eventually be
Finalized
). Read moreSource§fn get_transaction_details<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 TransactionId,
) -> Pin<Box<dyn Future<Output = Result<Transaction, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_transaction_details<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 TransactionId,
) -> Pin<Box<dyn Future<Output = Result<Transaction, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch the details of a particular transaction
Source§fn get_transaction_history<'life0, 'life1, 'async_trait>(
&'life0 self,
paging: Option<Paging>,
filter: &'life1 TransactionFilter,
) -> Pin<Box<dyn Future<Output = Result<Paginated<Vec<Transaction>>, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_transaction_history<'life0, 'life1, 'async_trait>(
&'life0 self,
paging: Option<Paging>,
filter: &'life1 TransactionFilter,
) -> Pin<Box<dyn Future<Output = Result<Paginated<Vec<Transaction>>, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Query transaction history
Source§fn get_balance<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<u128>, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_balance<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<u128>, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch the balance (in USD cents) held by an address Read more
fn get_total_issuance<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TotalIssuance, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn get_current_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Blockstamp, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_current_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Blockstamp, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the most current block and timestamp with a staleness indicator
Source§fn get_address_transactions<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
paging: Option<Paging>,
) -> Pin<Box<dyn Future<Output = Result<TransactionHistoryPage, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_address_transactions<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
paging: Option<Paging>,
) -> Pin<Box<dyn Future<Output = Result<TransactionHistoryPage, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch all transactions which are relevant to the provided address
Source§fn get_pending_create_requests<'life0, 'async_trait>(
&'life0 self,
paging: Option<Paging>,
) -> Pin<Box<dyn Future<Output = Result<Paginated<Vec<PendingCreateRequest>>, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_pending_create_requests<'life0, 'async_trait>(
&'life0 self,
paging: Option<Paging>,
) -> Pin<Box<dyn Future<Output = Result<Paginated<Vec<PendingCreateRequest>>, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Request the current pending create requests
Source§fn get_pending_redeem_requests<'life0, 'async_trait>(
&'life0 self,
paging: Option<Paging>,
) -> Pin<Box<dyn Future<Output = Result<Paginated<Vec<PendingRedeemRequest>>, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_pending_redeem_requests<'life0, 'async_trait>(
&'life0 self,
paging: Option<Paging>,
) -> Pin<Box<dyn Future<Output = Result<Paginated<Vec<PendingRedeemRequest>>, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Request the current pending redeem requests
Source§fn propose_action<'life0, 'async_trait>(
&'life0 self,
issuer: Address,
admin_txn: AdministrativeTransaction,
) -> Pin<Box<dyn Future<Output = Result<TransactionStatusStream, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn propose_action<'life0, 'async_trait>(
&'life0 self,
issuer: Address,
admin_txn: AdministrativeTransaction,
) -> Pin<Box<dyn Future<Output = Result<TransactionStatusStream, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Submit a proposal for an action to be voted on by network
Source§fn vote_on_proposal<'life0, 'async_trait>(
&'life0 self,
issuer: Address,
vote_proposal: VoteProposal,
) -> Pin<Box<dyn Future<Output = Result<TransactionStatusStream, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn vote_on_proposal<'life0, 'async_trait>(
&'life0 self,
issuer: Address,
vote_proposal: VoteProposal,
) -> Pin<Box<dyn Future<Output = Result<TransactionStatusStream, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Submit vote on specific proposal by id
Source§fn get_proposal<'life0, 'async_trait>(
&'life0 self,
id: u32,
) -> Pin<Box<dyn Future<Output = Result<Proposal, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_proposal<'life0, 'async_trait>(
&'life0 self,
id: u32,
) -> Pin<Box<dyn Future<Output = Result<Proposal, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get specific proposal by id
Source§fn get_all_proposals<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Proposal>, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_all_proposals<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Proposal>, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get all non-expired proposals
Source§fn get_members<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Address>, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_members<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Address>, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get list of members
Get list of validators
Source§fn get_trustee<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Address, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_trustee<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Address, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get trustee address
Source§fn get_allowlist<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Address, CidrBlock)>, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_allowlist<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Address, CidrBlock)>, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get allowlisted CIDR blocks per address
Source§fn get_limited_agent<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Address>, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_limited_agent<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Address>, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get Limited Agent address if one exists
Source§fn get_validator_emission_rate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ValidatorEmissionRate, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_validator_emission_rate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ValidatorEmissionRate, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get current Validator emission rate setting
Source§fn get_validator_emission_progress<'life0, 'async_trait>(
&'life0 self,
address: Address,
) -> Pin<Box<dyn Future<Output = Result<ValidatorEmissionProgress, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_validator_emission_progress<'life0, 'async_trait>(
&'life0 self,
address: Address,
) -> Pin<Box<dyn Future<Output = Result<ValidatorEmissionProgress, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the current progress of an individual validator toward an emission
Source§fn get_pending_create_request_expire_time<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_pending_create_request_expire_time<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the current pending create request expire time in milliseconds
Source§fn check_health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HealthResponse, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn check_health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HealthResponse, XandApiClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Health check
Source§fn with_timeout(self, timeout: Duration) -> WithTimeout<Self>where
Self: Sized,
fn with_timeout(self, timeout: Duration) -> WithTimeout<Self>where
Self: Sized,
Returns a client that behaves like
self
and applies the given timeout to every
asynchronous operation.Auto Trait Implementations§
impl<T> Freeze for WithTimeout<T>where
T: Freeze,
impl<T> RefUnwindSafe for WithTimeout<T>where
T: RefUnwindSafe,
impl<T> Send for WithTimeout<T>where
T: Send,
impl<T> Sync for WithTimeout<T>where
T: Sync,
impl<T> Unpin for WithTimeout<T>where
T: Unpin,
impl<T> UnwindSafe for WithTimeout<T>where
T: UnwindSafe,
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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request