Struct relay_quotas::Scoping
source · pub struct Scoping {
pub organization_id: u64,
pub project_id: ProjectId,
pub project_key: ProjectKey,
pub key_id: Option<u64>,
}
Expand description
Data scoping information.
This structure holds information of all scopes required for attributing an item to quotas.
Fields§
§organization_id: u64
The organization id.
project_id: ProjectId
The project id.
project_key: ProjectKey
The DSN public key.
key_id: Option<u64>
The public key’s internal id.
Implementations§
source§impl Scoping
impl Scoping
sourcepub fn item(&self, category: DataCategory) -> ItemScoping<'_>
pub fn item(&self, category: DataCategory) -> ItemScoping<'_>
Returns an ItemScoping
for this scope.
The item scoping will contain a reference to this scope and the information passed to this function. This is a cheap operation to allow rate limiting for an individual item.
sourcepub fn metric_bucket(&self, namespace: MetricNamespace) -> ItemScoping<'_>
pub fn metric_bucket(&self, namespace: MetricNamespace) -> ItemScoping<'_>
Returns an ItemScoping
for metric buckets in this scope.
The item scoping will contain a reference to this scope, the category `MetricBucket, and the information passed to this function. This is a cheap operation to allow rate limiting for an individual item.
Trait Implementations§
source§impl AsRef<Scoping> for ItemScoping<'_>
impl AsRef<Scoping> for ItemScoping<'_>
source§impl Ord for Scoping
impl Ord for Scoping
source§impl PartialEq for Scoping
impl PartialEq for Scoping
source§impl PartialOrd for Scoping
impl PartialOrd for Scoping
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Scoping
impl Eq for Scoping
impl StructuralPartialEq for Scoping
Auto Trait Implementations§
impl Freeze for Scoping
impl RefUnwindSafe for Scoping
impl Send for Scoping
impl Sync for Scoping
impl Unpin for Scoping
impl UnwindSafe for Scoping
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.