pub struct ApiClient {
pub id: String,
pub scopes: Vec<String>,
pub version: Option<String>,
pub rate_limit_tier: Option<String>,
pub idempotency_scope: String,
}Expand description
Who made a request.
Fields§
§id: StringStable and unique across ways of authenticating, such as api_key:42.
scopes: Vec<String>Granted scopes. * grants every scope, and orders:* every orders: scope.
version: Option<String>The pinned API version, used when a request has no Api-Version header.
rate_limit_tier: Option<String>The rate limit tier, or None for the default tier.
idempotency_scope: StringWho idempotency keys belong to. Defaults to the client ID.
Implementations§
Source§impl ApiClient
impl ApiClient
Sourcepub fn scopes<I: IntoIterator<Item = S>, S: Into<String>>(
self,
scopes: I,
) -> Self
pub fn scopes<I: IntoIterator<Item = S>, S: Into<String>>( self, scopes: I, ) -> Self
Grants scopes.
Sourcepub fn rate_limit_tier(self, tier: Option<impl Into<String>>) -> Self
pub fn rate_limit_tier(self, tier: Option<impl Into<String>>) -> Self
Puts the client in a rate limit tier.
Sourcepub fn idempotency_scope(self, scope: impl Into<String>) -> Self
pub fn idempotency_scope(self, scope: impl Into<String>) -> Self
Shares idempotency keys with other clients, such as every key of one account.
Trait Implementations§
impl Eq for ApiClient
impl StructuralPartialEq for ApiClient
Auto Trait Implementations§
impl Forget for ApiClient
impl Freeze for ApiClient
impl Move for ApiClient
impl RefUnwindSafe for ApiClient
impl Send for ApiClientwhere
RawVecInner: Send,
impl Sync for ApiClientwhere
RawVecInner: Sync,
impl Unpin for ApiClient
impl UnsafeUnpin for ApiClientwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for ApiClientwhere
RawVecInner: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.