pub struct Profile {
pub provider: &'static str,
pub uid: String,
pub email: Option<String>,
pub name: Option<String>,
}Expand description
The user a provider signed in: its id there, and its email when verified.
§Examples
let profile = ocre::oauth::Profile {
provider: "github",
uid: "583231".into(),
email: Some("octocat@github.com".into()),
name: Some("The Octocat".into()),
};
assert_eq!(profile.email.as_deref(), Some("octocat@github.com"));Fields§
§provider: &'static strThe provider’s Provider::name.
uid: StringThe user’s stable id at the provider (GitHub’s numeric id, Google’s sub).
email: Option<String>The user’s email, only when the provider says it is verified; lowercased.
name: Option<String>The display name, when the user has one.
Trait Implementations§
impl Eq for Profile
impl StructuralPartialEq for Profile
Auto Trait Implementations§
impl Freeze for Profile
impl RefUnwindSafe for Profile
impl Send for Profile
impl Sync for Profile
impl Unpin for Profile
impl UnsafeUnpin for Profile
impl UnwindSafe for Profile
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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.