pub struct UserMembership {
pub name: String,
pub role: Role,
pub tenant_id: TenantId,
}Expand description
One tenant a user may act in, as surfaced to that user (e.g. in the session payload that drives the web console’s tenant switcher).
JSON schema
{
"description": "One tenant a user may act in, as surfaced to that user (e.g. in the\nsession payload that drives the web console's tenant switcher).",
"type": "object",
"required": [
"name",
"role",
"tenant_id"
],
"properties": {
"name": {
"description": "The tenant's name.",
"type": "string"
},
"role": {
"$ref": "#/components/schemas/Role"
},
"tenant_id": {
"$ref": "#/components/schemas/TenantId"
}
}
}Fields§
§name: StringThe tenant’s name.
role: Role§tenant_id: TenantIdImplementations§
Source§impl UserMembership
impl UserMembership
pub fn builder() -> UserMembership
Trait Implementations§
Source§impl Clone for UserMembership
impl Clone for UserMembership
Source§fn clone(&self) -> UserMembership
fn clone(&self) -> UserMembership
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 UserMembership
impl Debug for UserMembership
Source§impl<'de> Deserialize<'de> for UserMembership
impl<'de> Deserialize<'de> for UserMembership
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<&UserMembership> for UserMembership
impl From<&UserMembership> for UserMembership
Source§fn from(value: &UserMembership) -> Self
fn from(value: &UserMembership) -> Self
Converts to this type from the input type.
Source§impl From<UserMembership> for UserMembership
impl From<UserMembership> for UserMembership
Source§fn from(value: UserMembership) -> Self
fn from(value: UserMembership) -> Self
Converts to this type from the input type.
Source§impl Serialize for UserMembership
impl Serialize for UserMembership
Source§impl TryFrom<UserMembership> for UserMembership
impl TryFrom<UserMembership> for UserMembership
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: UserMembership) -> Result<Self, ConversionError>
fn try_from(value: UserMembership) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for UserMembership
impl RefUnwindSafe for UserMembership
impl Send for UserMembership
impl Sync for UserMembership
impl Unpin for UserMembership
impl UnsafeUnpin for UserMembership
impl UnwindSafe for UserMembership
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