pub struct Client { /* private fields */ }Implementations§
source§impl Client
impl Client
pub fn new( api_key: Option<String>, secret_key: Option<String>, host: String ) -> Self
pub async fn get<T: DeserializeOwned + Send + 'static>( &self, endpoint: API, request: Option<String> ) -> Result<T>
sourcepub async fn get_signed<T: DeserializeOwned + Send + 'static>(
&self,
endpoint: API,
recv_window: u128,
request: Option<String>
) -> Result<T>
pub async fn get_signed<T: DeserializeOwned + Send + 'static>( &self, endpoint: API, recv_window: u128, request: Option<String> ) -> Result<T>
Makes a signed HTTP GET request to the specified endpoint.
pub async fn post<T: DeserializeOwned + Send + 'static>( &self, endpoint: API, request: Option<String> ) -> Result<T>
sourcepub async fn post_signed<T: DeserializeOwned + Send + 'static>(
&self,
endpoint: API,
recv_window: u128,
raw_request_body: Option<String>
) -> Result<T>
pub async fn post_signed<T: DeserializeOwned + Send + 'static>( &self, endpoint: API, recv_window: u128, raw_request_body: Option<String> ) -> Result<T>
Makes a signed HTTP POST request to the specified endpoint
pub async fn wss_connect( &self, endpoint: WebsocketAPI, request_body: Option<String>, private: bool, alive_dur: Option<u64> ) -> Result<WebSocketStream<MaybeTlsStream<TcpStream>>>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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