pub enum QuotaScope {
Global,
Organization,
Project,
Key,
Unknown,
}
Expand description
The scope at which a quota is applied.
Defines the granularity at which quotas are enforced, from global (affecting all data) down to individual project keys. This enum only defines the type of scope, not the specific instance.
This type is directly related to crate::rate_limit::RateLimitScope
, which
includes the specific scope identifiers.
Variants§
Global
Global scope, matching all data regardless of origin.
Organization
The organization level.
This is the top-level scope.
Project
The project level.
Projects are contained within organizations.
Key
The project key level (corresponds to a DSN).
This is the most specific scope level and is contained within projects.
Unknown
Any scope type not recognized by this Relay.
Implementations§
Source§impl QuotaScope
impl QuotaScope
Sourcepub fn from_name(string: &str) -> Self
pub fn from_name(string: &str) -> Self
Returns the quota scope corresponding to the given name string.
If the string doesn’t match any known scope, returns QuotaScope::Unknown
.
Trait Implementations§
Source§impl Clone for QuotaScope
impl Clone for QuotaScope
Source§fn clone(&self) -> QuotaScope
fn clone(&self) -> QuotaScope
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for QuotaScope
impl Debug for QuotaScope
Source§impl<'de> Deserialize<'de> for QuotaScope
impl<'de> Deserialize<'de> for QuotaScope
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for QuotaScope
impl Display for QuotaScope
Source§impl FromStr for QuotaScope
impl FromStr for QuotaScope
Source§impl Hash for QuotaScope
impl Hash for QuotaScope
Source§impl Ord for QuotaScope
impl Ord for QuotaScope
Source§fn cmp(&self, other: &QuotaScope) -> Ordering
fn cmp(&self, other: &QuotaScope) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for QuotaScope
impl PartialEq for QuotaScope
Source§impl PartialOrd for QuotaScope
impl PartialOrd for QuotaScope
Source§impl Serialize for QuotaScope
impl Serialize for QuotaScope
impl Copy for QuotaScope
impl Eq for QuotaScope
impl StructuralPartialEq for QuotaScope
Auto Trait Implementations§
impl Freeze for QuotaScope
impl RefUnwindSafe for QuotaScope
impl Send for QuotaScope
impl Sync for QuotaScope
impl Unpin for QuotaScope
impl UnwindSafe for QuotaScope
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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
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
§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>
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>
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