Struct stellar_client::endpoint::account::Operations[][src]

pub struct Operations { /* fields omitted */ }

Represents the operations for account endpoint on the stellar horizon server. The endpoint will return all the operations for a single account on the networkd.

https://www.stellar.org/developers/horizon/reference/endpoints/operations-for-account.html

Example

use stellar_client::sync::Client;
use stellar_client::endpoint::{account, transaction, Limit};

let client   = Client::horizon_test().unwrap();

// Grab transactions and associated source account to ensure we query an account
// that has operations. We seek transactions because operations have no guaranteed
// reference to an account but transactions do. And by definition every transaction
// has at least one operation.
let txns = client.request(transaction::All::default().with_limit(1)).unwrap();
let txn = &txns.records()[0];
let account_id = txn.source_account();

// Now we issue a request for that accounts operations
let endpoint = account::Operations::new(account_id);
let account_operations = client.request(endpoint).unwrap();

assert!(account_operations.records().len() > 0);

Methods

impl Operations
[src]

Creates a new account::Operations endpoint struct.

use stellar_client::endpoint::account;

let txns = account::Operations::new("abc123");

Trait Implementations

impl Debug for Operations
[src]

Formats the value using the given formatter. Read more

impl Clone for Operations
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Cursor for Operations
[src]

Sets a cursor on the struct and returns an owned version.

Returns the cursor that has been set, if it has been set.

impl Limit for Operations
[src]

Sets a limit on the struct and returns an owned version.

Returns the limit or None.

impl Order for Operations
[src]

Sets the order on the struct and returns an owned version.

Returns the order that has been set, if it has been set.

impl IntoRequest for Operations
[src]

The deserializable type that is expected to come back from the stellar server.

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 Sync for Operations