pub struct BitcoinRest { /* private fields */ }Implementations§
Source§impl BitcoinRest
impl BitcoinRest
pub fn new(rest_endpoint: String) -> Self
pub async fn fetch( &self, path: &[&str], ext: &str, query: Option<&str>, ) -> Result<Response, Error>
pub async fn fetch_hex( &self, path: &[&str], query: Option<&str>, ) -> Result<String, BitcoinRestError>
pub async fn fetch_bin( &self, path: &[&str], query: Option<&str>, ) -> Result<Bytes, BitcoinRestError>
pub async fn get_block(&self, hash: [u8; 32]) -> Result<Bytes, BitcoinRestError>
pub async fn get_blockhashbyheight( &self, height: u32, ) -> Result<[u8; 32], BitcoinRestError>
pub async fn get_headers( &self, hash: [u8; 32], count: u32, ) -> Result<Vec<[u8; 80]>, BitcoinRestError>
pub async fn get_all_headers( &self, hash: [u8; 32], count: Option<u32>, ) -> Result<Vec<[u8; 80]>, BitcoinRestError>
Trait Implementations§
Source§impl Clone for BitcoinRest
impl Clone for BitcoinRest
Source§fn clone(&self) -> BitcoinRest
fn clone(&self) -> BitcoinRest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BitcoinRest
impl !RefUnwindSafe for BitcoinRest
impl Send for BitcoinRest
impl Sync for BitcoinRest
impl Unpin for BitcoinRest
impl !UnwindSafe for BitcoinRest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more