#[non_exhaustive]pub enum RateLimitSource {
Vta,
Vtc,
Mediator,
DidHost,
Upstream,
}Expand description
Which service’s rate limiter refused the request.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Vta
The VTA’s own limiter (labelled with SOURCE_HEADER: vta).
Vtc
A VTC’s limiter (labelled vtc). Kept distinct from Self::Vta: the
VTC is a different service with a different audience and different
knobs, and the SDK’s auth helpers are used against both.
Mediator
The DIDComm / TSP mediator.
DidHost
A DID host (e.g. did-hosting-control, or the host serving a
did:webvh log during resolution).
Upstream
Unattributable: the 429 carried no recognised SOURCE_HEADER. A
reverse proxy / load balancer in front of the service, or a service old
enough not to label its limits.
Implementations§
Source§impl RateLimitSource
impl RateLimitSource
Sourcepub fn from_source_header(value: Option<&str>) -> Self
pub fn from_source_header(value: Option<&str>) -> Self
Read SOURCE_HEADER. Absent or unrecognised is
Self::Upstream — the one answer that does not claim to know more
than the response said.
Trait Implementations§
Source§impl Clone for RateLimitSource
impl Clone for RateLimitSource
impl Copy for RateLimitSource
Source§impl Debug for RateLimitSource
impl Debug for RateLimitSource
Source§impl Display for RateLimitSource
impl Display for RateLimitSource
impl Eq for RateLimitSource
Source§impl Hash for RateLimitSource
impl Hash for RateLimitSource
Source§impl PartialEq for RateLimitSource
impl PartialEq for RateLimitSource
impl StructuralPartialEq for RateLimitSource
Auto Trait Implementations§
impl Freeze for RateLimitSource
impl RefUnwindSafe for RateLimitSource
impl Send for RateLimitSource
impl Sync for RateLimitSource
impl Unpin for RateLimitSource
impl UnsafeUnpin for RateLimitSource
impl UnwindSafe for RateLimitSource
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.