Struct stellar_client::endpoint::transaction::Payments [−][src]
pub struct Payments { /* fields omitted */ }Returns the payments associated with a singular transactions.
https://www.stellar.org/developers/horizon/reference/endpoints/payments-for-transaction.html
Example
use stellar_client::sync::Client; use stellar_client::endpoint::{transaction, payment, Limit}; let client = Client::horizon_test().unwrap(); // Grab a payment from the all payments end point let payments = client.request(payment::All::default().with_limit(1)).unwrap(); let payment = &payments.records()[0]; // All "operations" have transaction hashes, and a payment is a type of operation let hash = payment.transaction(); let payments = client.request(transaction::Payments::new(hash)).unwrap(); assert!(payments.records().len() > 0); assert_eq!(payments.records()[0].transaction(), hash);
Methods
impl Payments[src]
impl Paymentspub fn new(hash: &str) -> Payments[src]
pub fn new(hash: &str) -> PaymentsCreates a new struct representing a request to the payments endpoint
Trait Implementations
impl Debug for Payments[src]
impl Debug for Paymentsfn 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 Payments[src]
impl Clone for Paymentsfn clone(&self) -> Payments[src]
fn clone(&self) -> PaymentsReturns 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 Payments[src]
impl Cursor for Paymentsfn with_cursor(self, cursor: &str) -> Payments[src]
fn with_cursor(self, cursor: &str) -> PaymentsSets 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 Payments[src]
impl Limit for Paymentsfn with_limit(self, limit: u32) -> Payments[src]
fn with_limit(self, limit: u32) -> PaymentsSets 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 Payments[src]
impl Order for Paymentsfn with_order(self, order: Direction) -> Payments[src]
fn with_order(self, order: Direction) -> PaymentsSets 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 Payments[src]
impl IntoRequest for Paymentstype Response = Records<Operation>
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