pub struct StandardClaims<GC>where
GC: GenderClaim,{ /* private fields */ }
Expand description
Standard Claims defined by OpenID Connect Core.
Implementations§
Source§impl<GC> StandardClaims<GC>where
GC: GenderClaim,
impl<GC> StandardClaims<GC>where
GC: GenderClaim,
Sourcepub fn new(subject: SubjectIdentifier) -> Self
pub fn new(subject: SubjectIdentifier) -> Self
Initializes a set of Standard Claims.
The Subject (sub
) claim is the only required Standard Claim.
Sourcepub fn subject(&self) -> &SubjectIdentifier
pub fn subject(&self) -> &SubjectIdentifier
Returns the Subject (sub
) claim.
Sourcepub fn set_subject(self, subject: SubjectIdentifier) -> Self
pub fn set_subject(self, subject: SubjectIdentifier) -> Self
Sets the Subject (sub
) claim.
Sourcepub fn name(&self) -> Option<&LocalizedClaim<EndUserName>>
pub fn name(&self) -> Option<&LocalizedClaim<EndUserName>>
Returns the name
claim.
Sourcepub fn set_name(self, name: Option<LocalizedClaim<EndUserName>>) -> Self
pub fn set_name(self, name: Option<LocalizedClaim<EndUserName>>) -> Self
Sets the name
claim.
Sourcepub fn given_name(&self) -> Option<&LocalizedClaim<EndUserGivenName>>
pub fn given_name(&self) -> Option<&LocalizedClaim<EndUserGivenName>>
Returns the given_name
claim.
Sourcepub fn set_given_name(
self,
given_name: Option<LocalizedClaim<EndUserGivenName>>,
) -> Self
pub fn set_given_name( self, given_name: Option<LocalizedClaim<EndUserGivenName>>, ) -> Self
Sets the given_name
claim.
Sourcepub fn family_name(&self) -> Option<&LocalizedClaim<EndUserFamilyName>>
pub fn family_name(&self) -> Option<&LocalizedClaim<EndUserFamilyName>>
Returns the family_name
claim.
Sourcepub fn set_family_name(
self,
family_name: Option<LocalizedClaim<EndUserFamilyName>>,
) -> Self
pub fn set_family_name( self, family_name: Option<LocalizedClaim<EndUserFamilyName>>, ) -> Self
Sets the family_name
claim.
Sourcepub fn middle_name(&self) -> Option<&LocalizedClaim<EndUserMiddleName>>
pub fn middle_name(&self) -> Option<&LocalizedClaim<EndUserMiddleName>>
Returns the middle_name
claim.
Sourcepub fn set_middle_name(
self,
middle_name: Option<LocalizedClaim<EndUserMiddleName>>,
) -> Self
pub fn set_middle_name( self, middle_name: Option<LocalizedClaim<EndUserMiddleName>>, ) -> Self
Sets the middle_name
claim.
Sourcepub fn nickname(&self) -> Option<&LocalizedClaim<EndUserNickname>>
pub fn nickname(&self) -> Option<&LocalizedClaim<EndUserNickname>>
Returns the nickname
claim.
Sourcepub fn set_nickname(
self,
nickname: Option<LocalizedClaim<EndUserNickname>>,
) -> Self
pub fn set_nickname( self, nickname: Option<LocalizedClaim<EndUserNickname>>, ) -> Self
Sets the nickname
claim.
Sourcepub fn preferred_username(&self) -> Option<&EndUserUsername>
pub fn preferred_username(&self) -> Option<&EndUserUsername>
Returns the preferred_username
claim.
Sourcepub fn set_preferred_username(
self,
preferred_username: Option<EndUserUsername>,
) -> Self
pub fn set_preferred_username( self, preferred_username: Option<EndUserUsername>, ) -> Self
Sets the preferred_username
claim.
Sourcepub fn profile(&self) -> Option<&LocalizedClaim<EndUserProfileUrl>>
pub fn profile(&self) -> Option<&LocalizedClaim<EndUserProfileUrl>>
Returns the profile
claim.
Sourcepub fn set_profile(
self,
profile: Option<LocalizedClaim<EndUserProfileUrl>>,
) -> Self
pub fn set_profile( self, profile: Option<LocalizedClaim<EndUserProfileUrl>>, ) -> Self
Sets the profile
claim.
Sourcepub fn picture(&self) -> Option<&LocalizedClaim<EndUserPictureUrl>>
pub fn picture(&self) -> Option<&LocalizedClaim<EndUserPictureUrl>>
Returns the picture
claim.
Sourcepub fn set_picture(
self,
picture: Option<LocalizedClaim<EndUserPictureUrl>>,
) -> Self
pub fn set_picture( self, picture: Option<LocalizedClaim<EndUserPictureUrl>>, ) -> Self
Sets the picture
claim.
Sourcepub fn website(&self) -> Option<&LocalizedClaim<EndUserWebsiteUrl>>
pub fn website(&self) -> Option<&LocalizedClaim<EndUserWebsiteUrl>>
Returns the website
claim.
Sourcepub fn set_website(
self,
website: Option<LocalizedClaim<EndUserWebsiteUrl>>,
) -> Self
pub fn set_website( self, website: Option<LocalizedClaim<EndUserWebsiteUrl>>, ) -> Self
Sets the website
claim.
Sourcepub fn email(&self) -> Option<&EndUserEmail>
pub fn email(&self) -> Option<&EndUserEmail>
Returns the email
claim.
Sourcepub fn set_email(self, email: Option<EndUserEmail>) -> Self
pub fn set_email(self, email: Option<EndUserEmail>) -> Self
Sets the email
claim.
Sourcepub fn email_verified(&self) -> Option<bool>
pub fn email_verified(&self) -> Option<bool>
Returns the email_verified
claim.
Sourcepub fn set_email_verified(self, email_verified: Option<bool>) -> Self
pub fn set_email_verified(self, email_verified: Option<bool>) -> Self
Sets the email_verified
claim.
Sourcepub fn set_gender(self, gender: Option<GC>) -> Self
pub fn set_gender(self, gender: Option<GC>) -> Self
Sets the gender
claim.
Sourcepub fn birthday(&self) -> Option<&EndUserBirthday>
pub fn birthday(&self) -> Option<&EndUserBirthday>
Returns the birthday
claim.
Sourcepub fn set_birthday(self, birthday: Option<EndUserBirthday>) -> Self
pub fn set_birthday(self, birthday: Option<EndUserBirthday>) -> Self
Sets the birthday
claim.
Sourcepub fn zoneinfo(&self) -> Option<&EndUserTimezone>
pub fn zoneinfo(&self) -> Option<&EndUserTimezone>
Returns the zoneinfo
claim.
Sourcepub fn set_zoneinfo(self, zoneinfo: Option<EndUserTimezone>) -> Self
pub fn set_zoneinfo(self, zoneinfo: Option<EndUserTimezone>) -> Self
Sets the zoneinfo
claim.
Sourcepub fn locale(&self) -> Option<&LanguageTag>
pub fn locale(&self) -> Option<&LanguageTag>
Returns the locale
claim.
Sourcepub fn set_locale(self, locale: Option<LanguageTag>) -> Self
pub fn set_locale(self, locale: Option<LanguageTag>) -> Self
Sets the locale
claim.
Sourcepub fn phone_number(&self) -> Option<&EndUserPhoneNumber>
pub fn phone_number(&self) -> Option<&EndUserPhoneNumber>
Returns the phone_number
claim.
Sourcepub fn set_phone_number(self, phone_number: Option<EndUserPhoneNumber>) -> Self
pub fn set_phone_number(self, phone_number: Option<EndUserPhoneNumber>) -> Self
Sets the phone_number
claim.
Sourcepub fn phone_number_verified(&self) -> Option<bool>
pub fn phone_number_verified(&self) -> Option<bool>
Returns the phone_number_verified
claim.
Sourcepub fn set_phone_number_verified(
self,
phone_number_verified: Option<bool>,
) -> Self
pub fn set_phone_number_verified( self, phone_number_verified: Option<bool>, ) -> Self
Sets the phone_number_verified
claim.
Sourcepub fn address(&self) -> Option<&AddressClaim>
pub fn address(&self) -> Option<&AddressClaim>
Returns the address
claim.
Sourcepub fn set_address(self, address: Option<AddressClaim>) -> Self
pub fn set_address(self, address: Option<AddressClaim>) -> Self
Sets the address
claim.
Sourcepub fn updated_at(&self) -> Option<DateTime<Utc>>
pub fn updated_at(&self) -> Option<DateTime<Utc>>
Returns the updated_at
claim.
Sourcepub fn set_updated_at(self, updated_at: Option<DateTime<Utc>>) -> Self
pub fn set_updated_at(self, updated_at: Option<DateTime<Utc>>) -> Self
Sets the updated_at
claim.
Trait Implementations§
Source§impl<GC> Clone for StandardClaims<GC>where
GC: GenderClaim + Clone,
impl<GC> Clone for StandardClaims<GC>where
GC: GenderClaim + Clone,
Source§fn clone(&self) -> StandardClaims<GC>
fn clone(&self) -> StandardClaims<GC>
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<GC> Debug for StandardClaims<GC>where
GC: GenderClaim + Debug,
impl<GC> Debug for StandardClaims<GC>where
GC: GenderClaim + Debug,
Source§impl<'de, GC> Deserialize<'de> for StandardClaims<GC>where
GC: GenderClaim,
impl<'de, GC> Deserialize<'de> for StandardClaims<GC>where
GC: GenderClaim,
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>,
Special deserializer that supports RFC 5646 language tags associated with human-readable client metadata fields.
Source§impl<GC> PartialEq for StandardClaims<GC>where
GC: GenderClaim + PartialEq,
impl<GC> PartialEq for StandardClaims<GC>where
GC: GenderClaim + PartialEq,
Source§impl<GC> Serialize for StandardClaims<GC>where
GC: GenderClaim,
impl<GC> Serialize for StandardClaims<GC>where
GC: GenderClaim,
impl<GC> StructuralPartialEq for StandardClaims<GC>where
GC: GenderClaim,
Auto Trait Implementations§
impl<GC> Freeze for StandardClaims<GC>where
GC: Freeze,
impl<GC> RefUnwindSafe for StandardClaims<GC>where
GC: RefUnwindSafe,
impl<GC> Send for StandardClaims<GC>where
GC: Send,
impl<GC> Sync for StandardClaims<GC>where
GC: Sync,
impl<GC> Unpin for StandardClaims<GC>where
GC: Unpin,
impl<GC> UnwindSafe for StandardClaims<GC>where
GC: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more