pub struct Scoping {
pub organization_id: OrganizationId,
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: OrganizationId
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 PartialOrd for Scoping
impl PartialOrd for Scoping
impl 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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
Compare self to
key
and return true
if they are equal.§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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more