pub struct UserResponse {
pub created_at: DateTime<Utc>,
pub email: String,
pub id: Uuid,
pub is_admin: bool,
pub updated_at: DateTime<Utc>,
pub username: String,
}Expand description
Response DTO for a user (never exposes password hash).
JSON schema
{
"description": "Response DTO for a user (never exposes password hash).",
"type": "object",
"required": [
"created_at",
"email",
"id",
"is_admin",
"updated_at",
"username"
],
"properties": {
"created_at": {
"description": "Creation timestamp.",
"type": "string",
"format": "date-time"
},
"email": {
"description": "Email address.",
"type": "string"
},
"id": {
"description": "User ID.",
"type": "string",
"format": "uuid"
},
"is_admin": {
"description": "Whether the user is an admin.",
"type": "boolean"
},
"updated_at": {
"description": "Last update timestamp.",
"type": "string",
"format": "date-time"
},
"username": {
"description": "Display username.",
"type": "string"
}
}
}
```ignore
</details>Fields§
§created_at: DateTime<Utc>Creation timestamp.
email: StringEmail address.
id: UuidUser ID.
is_admin: boolWhether the user is an admin.
updated_at: DateTime<Utc>Last update timestamp.
username: StringDisplay username.
Implementations§
Source§impl UserResponse
impl UserResponse
pub fn builder() -> UserResponse
Trait Implementations§
Source§impl Clone for UserResponse
impl Clone for UserResponse
Source§impl Debug for UserResponse
impl Debug for UserResponse
Source§impl<'de> Deserialize<'de> for UserResponse
impl<'de> Deserialize<'de> for UserResponse
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
Source§impl From<UserResponse> for UserResponse
impl From<UserResponse> for UserResponse
Source§fn from(value: UserResponse) -> Self
fn from(value: UserResponse) -> Self
Converts to this type from the input type.
Source§impl Serialize for UserResponse
impl Serialize for UserResponse
Source§impl TryFrom<UserResponse> for UserResponse
impl TryFrom<UserResponse> for UserResponse
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: UserResponse) -> Result<Self, ConversionError>
fn try_from(value: UserResponse) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for UserResponse
impl RefUnwindSafe for UserResponse
impl Send for UserResponse
impl Sync for UserResponse
impl Unpin for UserResponse
impl UnsafeUnpin for UserResponse
impl UnwindSafe for UserResponse
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