Struct stellar_client::endpoint::ledger::Details [−][src]
pub struct Details { /* fields omitted */ }Represents the ledger details endpoint for the stellar horizon server. The endpoint will return a single ledger's details.
https://www.stellar.org/developers/horizon/reference/endpoints/ledgers-single.html
Example
use stellar_client::sync::Client; use stellar_client::endpoint::ledger; let client = Client::horizon_test().unwrap(); let endpoint = ledger::Details::new(12345); let record = client.request(endpoint).unwrap();
Methods
impl Details[src]
impl Detailspub fn new(sequence: u32) -> Self[src]
pub fn new(sequence: u32) -> SelfReturns a new endpoint for ledger details. Hand this to the client in order to request details about a ledger.
In Stellar, the sequence number is the equivalent of Bitcoin's block height. Thus, by specifying a sequence number of 12345, we are specifying the 12345th ledger in the Stellar ledger chain (Stellar's blockchain is called a ledger chain).
Trait Implementations
impl Debug for Details[src]
impl Debug for Detailsfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Default for Details[src]
impl Default for Detailsimpl IntoRequest for Details[src]
impl IntoRequest for Detailstype Response = Ledger
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