Struct stellar_client::endpoint::account::Transactions [−][src]
pub struct Transactions { /* fields omitted */ }Represents the transaction for account endpoint on the stellar horizon server. The endpoint will return all the transactions that have effected a specific account
https://www.stellar.org/developers/horizon/reference/endpoints/transactions-for-account.html
Example
use stellar_client::sync::Client; use stellar_client::endpoint::{account, transaction, Limit}; let client = Client::horizon_test().unwrap(); // Grab transaction and associated account to ensure an account populated with transactions let transaction_ep = transaction::All::default().with_limit(1); let all_txns = client.request(transaction_ep).unwrap(); let txn = &all_txns.records()[0]; let account_id = txn.source_account(); // Now we issue a request for that account's transactions let endpoint = account::Transactions::new(account_id); let acct_txns = client.request(endpoint).unwrap(); assert!(acct_txns.records().len() > 0);
Methods
impl Transactions[src]
impl Transactionspub fn new(account_id: &str) -> Self[src]
pub fn new(account_id: &str) -> SelfCreates a new account::Transactions endpoint struct. Hand this to the client in order to request transactions for a specific account.
use stellar_client::endpoint::account; let txns = account::Transactions::new("abc123");
Trait Implementations
impl Debug for Transactions[src]
impl Debug for Transactionsfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for Transactions[src]
impl Clone for Transactionsfn clone(&self) -> Transactions[src]
fn clone(&self) -> TransactionsReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Cursor for Transactions[src]
impl Cursor for Transactionsfn with_cursor(self, cursor: &str) -> Transactions[src]
fn with_cursor(self, cursor: &str) -> TransactionsSets a cursor on the struct and returns an owned version.
fn cursor(&self) -> Option<&str>[src]
fn cursor(&self) -> Option<&str>Returns the cursor that has been set, if it has been set.
impl Limit for Transactions[src]
impl Limit for Transactionsfn with_limit(self, limit: u32) -> Transactions[src]
fn with_limit(self, limit: u32) -> TransactionsSets a limit on the struct and returns an owned version.
fn limit(&self) -> Option<u32>[src]
fn limit(&self) -> Option<u32>Returns the limit or None.
impl Order for Transactions[src]
impl Order for Transactionsfn with_order(self, order: Direction) -> Transactions[src]
fn with_order(self, order: Direction) -> TransactionsSets the order on the struct and returns an owned version.
fn order(&self) -> Option<Direction>[src]
fn order(&self) -> Option<Direction>Returns the order that has been set, if it has been set.
impl IntoRequest for Transactions[src]
impl IntoRequest for Transactionstype Response = Records<Transaction>
The deserializable type that is expected to come back from the stellar server.
fn into_request(self, host: &str) -> Result<Request<Body>>[src]
fn into_request(self, host: &str) -> Result<Request<Body>>The request body to be sent to stellar. Generally this is just a () unit. Converts the implementing struct into an http request. Read more
Auto Trait Implementations
impl Send for Transactions
impl Send for Transactionsimpl Sync for Transactions
impl Sync for Transactions