Enum jwt_simple::claims::Audiences
source · [−]Expand description
Depending on applications, the audiences property may be either a set or a string.
We support both.
Variants
AsSet(HashSet<String>)
AsString(String)
Implementations
sourceimpl Audiences
impl Audiences
sourcepub fn contains(&self, allowed_audiences: &HashSet<String>) -> bool
pub fn contains(&self, allowed_audiences: &HashSet<String>) -> bool
Return true if the audiences include any of the allowed_audiences entries
sourcepub fn into_string(self) -> Result<String, Error>
pub fn into_string(self) -> Result<String, Error>
Get the audiences as a string. If it was originally serialized as a set, it can be only converted to a string if it contains at most one element.
Trait Implementations
impl Eq for Audiences
impl StructuralEq for Audiences
impl StructuralPartialEq for Audiences
Auto Trait Implementations
impl RefUnwindSafe for Audiences
impl Send for Audiences
impl Sync for Audiences
impl Unpin for Audiences
impl UnwindSafe for Audiences
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more