[][src]Struct aliri_oauth2::Scopes

pub struct Scopes(_);

A set of scopes for defining access permissions

Implementations

impl Scopes[src]

pub fn empty() -> Self[src]

Produces an empty scope set

pub fn single<S>(scope: S) -> Self where
    S: Into<Scope>, 
[src]

Constructs a new scope set from a single scope

pub fn from_scopes<I, S>(scopes: I) -> Self where
    I: IntoIterator<Item = S>,
    S: Into<Scope>, 
[src]

Constructs a new scope set from a set of scopes

pub fn insert(&mut self, scope: Scope)[src]

Adds a scope to the scope set

pub fn iter(&self) -> impl Iterator<Item = &ScopeRef>[src]

Produces an iterator of the scopes in this set

pub fn contains_all(&self, subset: &Scopes) -> bool[src]

Checks to see whether this set of scopes contains all of the scopes required.

Trait Implementations

impl Clone for Scopes[src]

impl Debug for Scopes[src]

impl Default for Scopes[src]

impl<'de> Deserialize<'de> for Scopes[src]

impl Eq for Scopes[src]

impl<S> Extend<S> for Scopes where
    S: Into<Scope>, 
[src]

impl Extend<Scopes> for ScopesPolicy[src]

impl<'_> From<&'_ str> for Scopes[src]

impl From<Option<ScopesDto>> for Scopes[src]

impl From<String> for Scopes[src]

impl<S> FromIterator<S> for Scopes where
    S: Into<Scope>, 
[src]

impl FromIterator<Scopes> for ScopesPolicy[src]

impl FromStr for Scopes[src]

type Err = Infallible

The associated error which can be returned from parsing.

impl HasScopes for Scopes[src]

impl IntoIterator for Scopes[src]

type Item = Scope

The type of the elements being iterated over.

type IntoIter = <AHashSet<Scope> as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?

impl<'a> IntoIterator for &'a Scopes[src]

type Item = &'a ScopeRef

The type of the elements being iterated over.

type IntoIter = Iter<'a>

Which kind of iterator are we turning this into?

impl PartialEq<Scopes> for Scopes[src]

impl Serialize for Scopes[src]

impl StructuralEq for Scopes[src]

impl StructuralPartialEq for Scopes[src]

Auto Trait Implementations

impl RefUnwindSafe for Scopes

impl Send for Scopes

impl Sync for Scopes

impl Unpin for Scopes

impl UnwindSafe for Scopes

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithSubscriber for T[src]