Struct stellar_client::endpoint::account::Data [−][src]
pub struct Data { /* fields omitted */ }Represents the data for account endpoint on the stellar horizon server. The endpoint will return a single value for a key/value pair associated with an account.
https://www.stellar.org/developers/horizon/reference/endpoints/data-for-account.html
Example
use stellar_client::sync::Client; use stellar_client::endpoint::account; let client = Client::horizon_test().unwrap(); let endpoint = account::Data::new("GATLAI2D7SSH6PE3HXTDPTRM4RE5VRK6HGA63K5EWP75PSANCZRFDNB5", "Food"); let record = client.request(endpoint).unwrap();
Methods
impl Data[src]
impl Datapub fn new(account_id: &str, key: &str) -> Self[src]
pub fn new(account_id: &str, key: &str) -> SelfCreates a new account::Data endpoint struct. Hand this to the client in order to request a single value for a key/value pair for an account.
use stellar_client::endpoint::account; let data = account::Data::new("abc123", "Food");
Trait Implementations
impl Debug for Data[src]
impl Debug for Datafn 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 Data[src]
impl IntoRequest for Datatype Response = Datum
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