pub struct UserWithRoles {
pub avatar_url: Option<String>,
pub created_at: DateTime<Utc>,
pub email: String,
pub id: String,
pub name: String,
pub object: String,
pub role: Value,
pub roles: HashMap<String, UserWithRolesRolesValue>,
pub updated_at: DateTime<Utc>,
}
Expand description
UserWithRoles
JSON schema
{
"allOf": [
{
"$ref": "#/components/schemas/UserBase"
}
],
"properties": {
"roles": {
"description": "Roles of the user in multiple organizations. The keys are organization IDs, and values are roles ('admin', 'member').",
"type": "object",
"additionalProperties": {
"description": "The role of the user in each organization.",
"type": "string",
"enum": [
"admin",
"member"
]
}
}
}
}
Fields§
§avatar_url: Option<String>
Avatar of the user
created_at: DateTime<Utc>
Time at which the project was created
email: String
Email of the user
id: String
Unique identifier for the user
name: String
Name of the user
object: String
String representing the object’s type. Objects of the same type share the same value
role: Value
§roles: HashMap<String, UserWithRolesRolesValue>
Roles of the user in multiple organizations. The keys are organization IDs, and values are roles (‘admin’, ‘member’).
updated_at: DateTime<Utc>
Time at which the project was last updated
Implementations§
Source§impl UserWithRoles
impl UserWithRoles
pub fn builder() -> UserWithRoles
Trait Implementations§
Source§impl Clone for UserWithRoles
impl Clone for UserWithRoles
Source§fn clone(&self) -> UserWithRoles
fn clone(&self) -> UserWithRoles
Returns a duplicate 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 Debug for UserWithRoles
impl Debug for UserWithRoles
Source§impl<'de> Deserialize<'de> for UserWithRoles
impl<'de> Deserialize<'de> for UserWithRoles
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<&UserWithRoles> for UserWithRoles
impl From<&UserWithRoles> for UserWithRoles
Source§fn from(value: &UserWithRoles) -> Self
fn from(value: &UserWithRoles) -> Self
Converts to this type from the input type.
Source§impl From<UserWithRoles> for UserWithRoles
impl From<UserWithRoles> for UserWithRoles
Source§fn from(value: UserWithRoles) -> Self
fn from(value: UserWithRoles) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for UserWithRoles
impl JsonSchema for UserWithRoles
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl Serialize for UserWithRoles
impl Serialize for UserWithRoles
Source§impl TryFrom<UserWithRoles> for UserWithRoles
impl TryFrom<UserWithRoles> for UserWithRoles
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: UserWithRoles) -> Result<Self, ConversionError>
fn try_from(value: UserWithRoles) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for UserWithRoles
impl RefUnwindSafe for UserWithRoles
impl Send for UserWithRoles
impl Sync for UserWithRoles
impl Unpin for UserWithRoles
impl UnwindSafe for UserWithRoles
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