pub struct RestClient { /* private fields */ }Implementations§
Source§impl RestClient
impl RestClient
pub fn new(api_key_pair: ApiKeyPair, base_url: String) -> RestClient
Sourcepub fn with_rate_limiter(self, limiter: RateLimiter) -> Self
pub fn with_rate_limiter(self, limiter: RateLimiter) -> Self
Set a rate limiter for this client.
Bybit limits: 50 req/s for both public and private endpoints.
Use RateLimiter::public_rest() or RateLimiter::private_rest().
pub fn with_recv_window(self, recv_window: impl Into<String>) -> Self
pub async fn get<A: DeserializeOwned>( &self, endpoint: &str, query: Value, sec_type: SecType, ) -> BybitResult<ServerResponse<A>>
pub async fn post<A: DeserializeOwned>( &self, endpoint: &str, body: Value, sec_type: SecType, ) -> BybitResult<ServerResponse<A>>
Trait Implementations§
Source§impl Clone for RestClient
impl Clone for RestClient
Source§fn clone(&self) -> RestClient
fn clone(&self) -> RestClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RestClient
impl !RefUnwindSafe for RestClient
impl Send for RestClient
impl Sync for RestClient
impl Unpin for RestClient
impl UnsafeUnpin for RestClient
impl !UnwindSafe for RestClient
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