#[non_exhaustive]pub struct Role {
pub attributes: Option<RoleAttributes>,
pub id: Option<String>,
pub relationships: Option<RoleResponseRelationships>,
pub type_: RolesType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Role object returned by the API.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.attributes: Option<RoleAttributes>
Attributes of the role.
id: Option<String>
The unique identifier of the role.
relationships: Option<RoleResponseRelationships>
Relationships of the role object returned by the API.
type_: RolesType
Roles type.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl Role
impl Role
pub fn new(type_: RolesType) -> Role
pub fn attributes(self, value: RoleAttributes) -> Self
pub fn id(self, value: String) -> Self
pub fn relationships(self, value: RoleResponseRelationships) -> Self
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Role
impl<'de> Deserialize<'de> for Role
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
impl StructuralPartialEq for Role
Auto Trait Implementations§
impl Freeze for Role
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnwindSafe for Role
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