pub struct BinanceAuth { /* private fields */ }Expand description
Binance authenticator.
Credentials are automatically zeroed from memory when dropped.
Implementations§
Source§impl BinanceAuth
impl BinanceAuth
Sourcepub fn sign_params(
&self,
params: &BTreeMap<String, String>,
) -> Result<BTreeMap<String, String>>
pub fn sign_params( &self, params: &BTreeMap<String, String>, ) -> Result<BTreeMap<String, String>>
Sourcepub fn sign_with_timestamp(
&self,
params: &BTreeMap<String, String>,
timestamp: i64,
recv_window: Option<u64>,
) -> Result<BTreeMap<String, String>>
pub fn sign_with_timestamp( &self, params: &BTreeMap<String, String>, timestamp: i64, recv_window: Option<u64>, ) -> Result<BTreeMap<String, String>>
Signs parameters with timestamp and optional receive window.
§Arguments
params- Parameter maptimestamp- Timestamp in millisecondsrecv_window- Optional receive window in milliseconds
§Returns
Returns a new parameter map containing timestamp and signature.
§Errors
Returns an error if signature generation fails.
Sourcepub fn add_auth_headers(&self, headers: &mut HashMap<String, String>)
pub fn add_auth_headers(&self, headers: &mut HashMap<String, String>)
Sourcepub fn add_auth_headers_reqwest(&self, headers: &mut HeaderMap)
pub fn add_auth_headers_reqwest(&self, headers: &mut HeaderMap)
Trait Implementations§
Source§impl Clone for BinanceAuth
impl Clone for BinanceAuth
Source§fn clone(&self) -> BinanceAuth
fn clone(&self) -> BinanceAuth
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 BinanceAuth
impl RefUnwindSafe for BinanceAuth
impl Send for BinanceAuth
impl Sync for BinanceAuth
impl Unpin for BinanceAuth
impl UnwindSafe for BinanceAuth
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