pub struct ScopeCheck {
pub ok: bool,
pub granted_scopes: Vec<String>,
pub missing_scopes: Vec<String>,
}Expand description
Scope compatibility check result
Fields§
§ok: boolWhether all required scopes are present
granted_scopes: Vec<String>Scopes that are present in the token
missing_scopes: Vec<String>Required scopes that are missing
Implementations§
Source§impl ScopeCheck
impl ScopeCheck
Sourcepub fn evaluate(granted_scopes: &[String]) -> Self
pub fn evaluate(granted_scopes: &[String]) -> Self
Evaluate scope compatibility from the granted scopes list
Sourcepub fn unauthenticated() -> Self
pub fn unauthenticated() -> Self
Return a scope check for an unauthenticated user (all required scopes missing)
Trait Implementations§
Source§impl Clone for ScopeCheck
impl Clone for ScopeCheck
Source§fn clone(&self) -> ScopeCheck
fn clone(&self) -> ScopeCheck
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScopeCheck
impl Debug for ScopeCheck
Source§impl<'de> Deserialize<'de> for ScopeCheck
impl<'de> Deserialize<'de> for ScopeCheck
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ScopeCheck
impl RefUnwindSafe for ScopeCheck
impl Send for ScopeCheck
impl Sync for ScopeCheck
impl Unpin for ScopeCheck
impl UnsafeUnpin for ScopeCheck
impl UnwindSafe for ScopeCheck
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