pub struct Auth0User {
pub user_id: String,
pub email: String,
pub email_verified: bool,
pub name: Option<String>,
pub picture: Option<String>,
}Fields§
§user_id: String§email: String§email_verified: bool§name: Option<String>§picture: Option<String>Implementations§
Source§impl Auth0User
impl Auth0User
Sourcepub fn new(
user_id: String,
email: String,
email_verified: bool,
name: Option<String>,
picture: Option<String>,
) -> Self
pub fn new( user_id: String, email: String, email_verified: bool, name: Option<String>, picture: Option<String>, ) -> Self
Creates a new Auth0User.
This struct is typically deserialized from Auth0 API responses, but
new() is provided for convenience in tests or manual construction.
§Parameters
| Parameter | Type | Description |
|---|---|---|
user_id | String | Auth0 user ID (e.g. `“auth0 |
email | String | User’s email address |
email_verified | bool | Whether the email has been verified |
name | Option<String> | Full display name, if provided |
picture | Option<String> | URL of the user’s profile picture, if provided |
§Example
use auth0_integration::models::Auth0User;
let user = Auth0User::new(
"auth0|64a1b2c3d4e5f6".to_string(),
"jane@example.com".to_string(),
true,
Some("Jane Doe".to_string()),
None,
);Trait Implementations§
Source§impl<'de> Deserialize<'de> for Auth0User
impl<'de> Deserialize<'de> for Auth0User
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Auth0User
impl RefUnwindSafe for Auth0User
impl Send for Auth0User
impl Sync for Auth0User
impl Unpin for Auth0User
impl UnsafeUnpin for Auth0User
impl UnwindSafe for Auth0User
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