Struct stellar_client::endpoint::transaction::Operations [−][src]
pub struct Operations { /* fields omitted */ }Returns the operations associated with a singular transactions.
https://www.stellar.org/developers/horizon/reference/endpoints/operations-for-transaction.html
Example
use stellar_client::sync::Client; use stellar_client::endpoint::{transaction, operation, Limit}; let client = Client::horizon_test().unwrap(); // Grab an operation from the all operations end point let operations = client.request(operation::All::default().with_limit(1)).unwrap(); let operation = &operations.records()[0]; // All "operations" have transaction hashes. let hash = operation.transaction(); let operations = client.request(transaction::Operations::new(hash)).unwrap(); assert!(operations.records().len() > 0); assert_eq!(operations.records()[0].transaction(), hash);
Methods
impl Operations[src]
impl Operationspub fn new(hash: &str) -> Operations[src]
pub fn new(hash: &str) -> OperationsCreates a new struct representing a request to the payments endpoint
Trait Implementations
impl Debug for Operations[src]
impl Debug for Operationsfn 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 Operations[src]
impl Clone for Operationsfn clone(&self) -> Operations[src]
fn clone(&self) -> OperationsReturns 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 Operations[src]
impl Cursor for Operationsfn with_cursor(self, cursor: &str) -> Operations[src]
fn with_cursor(self, cursor: &str) -> OperationsSets 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 Operations[src]
impl Limit for Operationsfn with_limit(self, limit: u32) -> Operations[src]
fn with_limit(self, limit: u32) -> OperationsSets 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 Operations[src]
impl Order for Operationsfn with_order(self, order: Direction) -> Operations[src]
fn with_order(self, order: Direction) -> OperationsSets 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 Operations[src]
impl IntoRequest for Operationstype 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
Auto Trait Implementations
impl Send for Operations
impl Send for Operationsimpl Sync for Operations
impl Sync for Operations