Struct stellar_client::endpoint::account::Details [−][src]
pub struct Details { /* fields omitted */ }Represents the account details on the stellar horizon server. The endpoint will return information relating to a specific account.
https://www.stellar.org/developers/horizon/reference/endpoints/accounts-single.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::Details::new(account_id); let details = client.request(endpoint).unwrap(); assert_eq!(details.id(), account_id);
Methods
impl Details[src]
impl Detailspub fn new(account_id: &str) -> Self[src]
pub fn new(account_id: &str) -> SelfCreates a new account::Details endpoint struct. Hand this to the client in order to request information relating to a specific account
use stellar_client::endpoint::account; let details = account::Details::new("abc123");
Trait Implementations
impl Debug for Details[src]
impl Debug for Detailsfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl IntoRequest for Details[src]
impl IntoRequest for Detailstype Response = Account
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