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

pub struct Offers { /* fields omitted */ }

Represents the offers for account endpoint on the stellar horizon server. The endpoint will return all the Offers that a specific account makes.

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

Example

use stellar_client::sync::Client;
use stellar_client::endpoint::{account, trade, Order, Direction::Desc, Limit};

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

// Grab trades and associated base account to ensure an account with offers
let trades      = trade::All::default().with_order(Desc).with_limit(1);
let trades      = client.request(trades).unwrap();
let trade       = &trades.records()[0];
let account_id  = trade.base_account();

// Now we issue a request for that account's offers
let endpoint = account::Offers::new(account_id);
let offers   = client.request(endpoint).unwrap();

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

Methods

impl Offers
[src]

Creates a new account::Offers endpoint struct. Hand this to the client in order to request offers made by a specific account.

use stellar_client::endpoint::account;

let offers = account::Offers::new("abc123");

Trait Implementations

impl Debug for Offers
[src]

Formats the value using the given formatter. Read more

impl Clone for Offers
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Cursor for Offers
[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 Offers
[src]

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

Returns the limit or None.

impl Order for Offers
[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 Offers
[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 Offers

impl Sync for Offers