pub struct Role {
pub object: String,
pub id: String,
pub name: String,
pub description: Option<String>,
pub permissions: Vec<String>,
pub resource_type: String,
pub predefined_role: bool,
}Expand description
Details about a role that can be assigned through the public Roles API.
Fields§
§object: StringThe object type, which is always role.
id: StringIdentifier for the role.
name: StringUnique name for the role.
description: Option<String>Optional description of the role.
permissions: Vec<String>Permissions granted by the role.
resource_type: StringResource type the role is bound to (for example api.organization or api.project).
predefined_role: boolWhether the role is predefined and managed by OpenAI.
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