pub struct OkxRateLimitKey {
pub endpoint: String,
pub scope: OkxRateLimitScope,
}Fields§
§endpoint: String§scope: OkxRateLimitScopeImplementations§
Source§impl OkxRateLimitKey
impl OkxRateLimitKey
pub fn new_ip_based(endpoint: &str) -> Self
pub fn new_user_based(endpoint: &str) -> Self
pub fn new_user_and_instrument_type( endpoint: &str, instrument_type: OkxInstrumentType, ) -> Self
Trait Implementations§
Source§impl Clone for OkxRateLimitKey
impl Clone for OkxRateLimitKey
Source§fn clone(&self) -> OkxRateLimitKey
fn clone(&self) -> OkxRateLimitKey
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 moreSource§impl Debug for OkxRateLimitKey
impl Debug for OkxRateLimitKey
impl Eq for OkxRateLimitKey
Source§impl Hash for OkxRateLimitKey
impl Hash for OkxRateLimitKey
Source§impl PartialEq for OkxRateLimitKey
impl PartialEq for OkxRateLimitKey
fn get_client(&self) -> &Client
fn get_signer(&self) -> &dyn SharedSignerTrait
fn get_ratelimiter( &self, ) -> Arc<dyn SharedRatelimiterTrait<OkxRateLimitKey> + Sync + Send> ⓘ
fn call_with_no_payload<'life0, 'life1, 'async_trait, ResponseType, Err>(
&'life0 self,
limits: &'life1 [(RateLimitType, NonZero<u32>)],
signed: bool,
method: Method,
url: Url,
) -> Pin<Box<dyn Future<Output = Result<ResponseType, SharedRestError<Err>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
ResponseType: 'async_trait + SharedRestResponseTrait,
Err: 'async_trait + SharedRestClientErrorTrait,
Self: Sync + 'async_trait,
fn call_with_no_response<'life0, 'life1, 'life2, 'async_trait, PayloadType, Err>(
&'life0 self,
limits: &'life1 [(RateLimitType, NonZero<u32>)],
signed: bool,
method: Method,
url: Url,
payload: Option<&'life2 PayloadType>,
) -> Pin<Box<dyn Future<Output = Result<(), SharedRestError<Err>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PayloadType: 'async_trait + Sync + Send + SharedRestPayloadTrait,
Err: 'async_trait + SharedRestClientErrorTrait,
Self: Sync + 'async_trait,
fn call_with_no_payload_and_response<'life0, 'life1, 'async_trait, Err>(
&'life0 self,
limits: &'life1 [(RateLimitType, NonZero<u32>)],
signed: bool,
method: Method,
url: Url,
) -> Pin<Box<dyn Future<Output = Result<(), SharedRestError<Err>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Err: 'async_trait + SharedRestClientErrorTrait,
Self: Sync + 'async_trait,
fn call<'life0, 'life1, 'life2, 'async_trait, PayloadType, ResponseType, Err>(
&'life0 self,
limits: &'life1 [(RateLimitType, NonZero<u32>)],
signed: bool,
method: Method,
url: Url,
payload: Option<&'life2 PayloadType>,
) -> Pin<Box<dyn Future<Output = Result<ResponseType, SharedRestError<Err>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PayloadType: 'async_trait + Sync + Send + SharedRestPayloadTrait,
ResponseType: 'async_trait + SharedRestResponseTrait,
Err: 'async_trait + SharedRestClientErrorTrait,
Self: Sync + 'async_trait,
impl StructuralPartialEq for OkxRateLimitKey
Auto Trait Implementations§
impl Freeze for OkxRateLimitKey
impl RefUnwindSafe for OkxRateLimitKey
impl Send for OkxRateLimitKey
impl Sync for OkxRateLimitKey
impl Unpin for OkxRateLimitKey
impl UnsafeUnpin for OkxRateLimitKey
impl UnwindSafe for OkxRateLimitKey
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.