Struct openidconnect::LocalizedClaim
source · pub struct LocalizedClaim<T>(/* private fields */);
Expand description
A locale-aware claim.
This structure associates one more Option<LanguageTag>
locales with the corresponding
claims values.
Implementations§
source§impl<T> LocalizedClaim<T>
impl<T> LocalizedClaim<T>
sourcepub fn contains_key(&self, locale: Option<&LanguageTag>) -> bool
pub fn contains_key(&self, locale: Option<&LanguageTag>) -> bool
Returns true if the claim contains a value for the specified locale.
sourcepub fn get(&self, locale: Option<&LanguageTag>) -> Option<&T>
pub fn get(&self, locale: Option<&LanguageTag>) -> Option<&T>
Returns the entry for the specified locale or None
if there is no such entry.
sourcepub fn iter(&self) -> impl Iterator<Item = (Option<&LanguageTag>, &T)>
pub fn iter(&self) -> impl Iterator<Item = (Option<&LanguageTag>, &T)>
Returns an iterator over the locales and claim value entries.
sourcepub fn insert(&mut self, locale: Option<LanguageTag>, value: T) -> Option<T>
pub fn insert(&mut self, locale: Option<LanguageTag>, value: T) -> Option<T>
Inserts or updates an entry for the specified locale.
Returns the current value associated with the given locale, or None
if there is no
such entry.
sourcepub fn remove(&mut self, locale: Option<&LanguageTag>) -> Option<T>
pub fn remove(&mut self, locale: Option<&LanguageTag>) -> Option<T>
Removes an entry for the specified locale.
Returns the current value associated with the given locale, or None
if there is no
such entry.
Trait Implementations§
source§impl<T: Clone> Clone for LocalizedClaim<T>
impl<T: Clone> Clone for LocalizedClaim<T>
source§fn clone(&self) -> LocalizedClaim<T>
fn clone(&self) -> LocalizedClaim<T>
Returns a copy 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<T: Debug> Debug for LocalizedClaim<T>
impl<T: Debug> Debug for LocalizedClaim<T>
source§impl<T> Default for LocalizedClaim<T>
impl<T> Default for LocalizedClaim<T>
source§impl<T> From<T> for LocalizedClaim<T>
impl<T> From<T> for LocalizedClaim<T>
source§impl<T> FromIterator<(Option<LanguageTag>, T)> for LocalizedClaim<T>
impl<T> FromIterator<(Option<LanguageTag>, T)> for LocalizedClaim<T>
source§fn from_iter<I: IntoIterator<Item = (Option<LanguageTag>, T)>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = (Option<LanguageTag>, T)>>(iter: I) -> Self
Creates a value from an iterator. Read more
source§impl<T> IntoIterator for LocalizedClaim<T>where
T: 'static,
impl<T> IntoIterator for LocalizedClaim<T>where
T: 'static,
source§impl<T: PartialEq> PartialEq for LocalizedClaim<T>
impl<T: PartialEq> PartialEq for LocalizedClaim<T>
source§fn eq(&self, other: &LocalizedClaim<T>) -> bool
fn eq(&self, other: &LocalizedClaim<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<T: Eq> Eq for LocalizedClaim<T>
impl<T> StructuralPartialEq for LocalizedClaim<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for LocalizedClaim<T>where
T: RefUnwindSafe,
impl<T> Send for LocalizedClaim<T>where
T: Send,
impl<T> Sync for LocalizedClaim<T>where
T: Sync,
impl<T> Unpin for LocalizedClaim<T>where
T: Unpin,
impl<T> UnwindSafe for LocalizedClaim<T>where
T: UnwindSafe,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.