pub enum AuthScope {
InvalidToken,
WrongAccountScope,
WorkersAiPermission,
GenericAuth,
}Expand description
The scope classification of an authentication/authorization rejection, derived from the Cloudflare error envelope (feedback 01: invalid token vs wrong account scope vs Workers AI permission are distinct, actionable failures, never collapsed into a generic auth error).
Variants§
InvalidToken
The API token is invalid, expired, or otherwise not a valid credential (Cloudflare envelope code 9109).
WrongAccountScope
The token is valid but not scoped to this account (envelope code 9103 “Account not found”).
WorkersAiPermission
The token is valid and account-scoped but lacks the Workers AI permission (envelope code 10000 “insufficient permission”).
GenericAuth
Any auth rejection we could not classify further.
Trait Implementations§
impl Copy for AuthScope
impl Eq for AuthScope
impl StructuralPartialEq for AuthScope
Auto Trait Implementations§
impl Freeze for AuthScope
impl RefUnwindSafe for AuthScope
impl Send for AuthScope
impl Sync for AuthScope
impl Unpin for AuthScope
impl UnsafeUnpin for AuthScope
impl UnwindSafe for AuthScope
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§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.